Giter Site home page Giter Site logo

angelmunoz / perla-templates Goto Github PK

View Code? Open in Web Editor NEW
8.0 3.0 2.0 159 KB

A repository with samples showcasing what can the perla dev server do today

Home Page: https://github.com/AngelMunoz/Perla

HTML 22.01% JavaScript 35.51% CSS 14.39% TypeScript 4.50% F# 23.59%
jsx tsx javascript typescript lit-element react preact fsharp devtools devserver

perla-templates's Introduction

Getting Started

If you need to install perla check the Installation instructions

This repository is now part of Perla's scaffolding features!

usage example:

# Running perla commands for the first time ask or ensure templates are currently installed
perla new sample -t flit # fable-lit
cd sample && perla serve

perla-templates's People

Contributors

angelmunoz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

perla-templates's Issues

Cannot get Fable-lit samples running.

Hi. I've been trying to use Perla in my own project, and thought I would run the samples first to see how it works. However I can't get fable-sutil or fable-lit examples to work after simply running dotnet tool restore and dotnet perla serve with following error message in the browser console: Uncaught TypeError: Error resolving module specifier “lit”. Relative module specifiers must start with “./”, “../” or “/”. I was also getting the same error when trying out my own fable bindings library that I managed to get working with Vite.

If I understood correctly, this is the reason the es-module-shim is needed. However there still seems to be some issue.

Thanks,

Some feedback while playing around with this.

Hello, I'm currently on a machine where I refuse to install Node.Js, so it was an opportune moment to try out Perla.
I've played around with the fable-feliz sample.

I'm going to write down some findings I had:

  • This works pretty decently, I'm hooked enough to circle back this project in the future.
  • I like how fable is used as a local tool, which gives me control over the version. I can upgrade at my own pace in the future.
  • After running perla serve, I had to run go and look at the docs on which port the thing was running. It would be nice to have something printed to the output window that the devServer is ready at what address.
  • It would be nice if Fable compilation errors were highlighted in red in the output.
    Example:
.\src\Components.fs(9,5): (9,7) error FSHARP: The value or constructor 'h1' is not defined. (code 39)
  • I noticed the template is using Feliz.Router, but when I entered http://localhost:7331/hello directly in my browser I got a 404. I suspect it might be configurable to have 404 URLs serve the index.html. The SPA fallback thing. It might be interesting to have this out of the box.

A bit later I realized that I actually needed to use http://localhost:7331/#/hello, the routing is configured using # but I believe my remark still stands.

  • Changes to the index.html do not reload the page. I changed the title of the page and was expecting a reload.
  • I tried to add react-snowfall. dotnet perla add -p react-snowfall.
    On the first try I got an exception, Exception of type 'Perla.Types+PackageNotFoundException' was thrown., at.
    The second time it worked and it added "react-snowfall": "https://cdn.skypack.devreact-snowfall" to my perla.jsonc.
    What confuses me here a bit is that the other URLs are optimized ones, example "react": "https://cdn.skypack.dev/pin/[email protected]/mode=imports/optimized/react.js". As a user, this is a bit confusing. I was able to add the package, but it looks different.

Upon trying out the component, I got GET https://cdn.skypack.devreact-snowfall/ net::ERR_NAME_NOT_RESOLVED in the browser and this looks like a bug while resolving react-snowfall from the CDN. It seems to be missing a slash somewhere.

  • Would it not be possible to merge perla.jsonc.importmap into a node in perla,jsonc? I'm not sure how relevant it is to have two files. Although on the other hand, most package managers have two files as well, where the second is a lock file.
  • If my project would start to grow, I would miss HMR pretty fast I believe. But I understand it is a very tricky thing to implement.

My findings all might sound a bit negative but I really see the potential of this project. It is impressive what you have so far and I'm curious to see where this goes.
The best of luck!

What is the `dotnet` cli tool?

I see dotnet used as a cli tool to install things and make a local server of some kind. Do I need Microsoft .NET to use Perla?

Context: I'm coming from a nodejs / webdev background but haven't heard of dotnet and don't know why I would use it to try Perla.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.