This is now one of my testing repositories for Perla the .NET dev server for frontend development :)
This codebase was created to demonstrate a fully fledged fullstack application built with Fable, Elmish and F# including CRUD operations, authentication, routing, pagination, and more.
We've gone to great lengths to adhere to the Fable, Elmish and F# community styleguides & best practices.
dotnet tool restore
- `dotnet perla serve
And open a browser tab on http://localhost:7331
This repository is configured to use only CDN dependencies.
you can inspect the pela.json
to see which dependencies and versions are used in this project.
The dependencies and versions are the ones that direct how the resolutions are made every time you call perla install
, the perla.json.importmap
is the resulting import map from that command and you can actually grab that and copy paste it in a browser to work.
In perla this is more of a "lock file" rather than an import map as every time you call install or add a dependency that map will change.
Since we're using fable in this repository we don't need to call install before starting the project since the importmap already works and the dependencies will be resolved from CDN.
If you want to explore a few of the newer Perla features try setting "useLocalPkgs": true,
in the perla.json
file
This time though you will need to call install after setting the repository
perla install
perla serve
Install will re-create the import map and then download the sources specified by the JSMP API, then we'll create a node_modules
directory with the downloaded sources this directory layout mimicks the npm file layout so the tooling that relies on those conventions should work for the most part.
While not necessary, the benefit is that dependencies can be bundled together with the source code (like some other bundlers do) if you enable the esbuild plugin ("plugins": ["perla-esbuild-plugin"]
) otherwise the dependencies together with the source code will be moved to the output directory you can choose to manually use a bundler on them or serve them as is.
You're going to need a few things installed:
dotnet perla build
Pending...