READMEThis extension can help with the scaffolding out of applications based on Fable and the Elmish pattern. The code it generates is based on the minimal sample that can be found in the Fable sample set. Available on the Visual Studio Code Marketplace Features
How to UseThe recommended way to use this scaffolder is from an empty Fable application - a good way to get started is by creating the default SAFE application and removing the boilerplate Fable app source by deleting the files: Version.fs Client.fs From then you can use the Scaffold Fable-Elmish Application Components command to create assets that the extension understands how to modify - you can then create routes for resources and the scaffolder will wire everything up for you. You will also need to add the following NuGet package: Fable.Elmish.Browser Now to add a resource, for example routes to create, list, view and edit a Product entity run the command Scaffold Fable-Elmish Resource and enter the resource name. This will create the resource, routing for it, boilerplate views, and Elmish message patterns. SettingsSettings are maintained in a file called .elmish-scaffold-settings which will be located by walking up the folder structure from the location in which you run a command enabling you to have multiple settings in a solution. You can export a settings file at the current location by running the command Export Fable-Elmish Scaffold Settings which will create a .elmish-scaffold-settings file with the default values. Setings are described below:
Customising the Generated CodeThe scaffolder makes use of a set of Handlelbars templates. If you want to customise the generated code you can "eject" the shipped templates and modify them. To do this run the command Eject Fable-Elmish Scaffold Templates. This will place the templates in a folder called .fable-elmish-templates at the current location. When generating code the scaffolder will walk back up the folder tree from the location you are inserting the code and look for this folder. If it finds it it will use your custom templates, if it doesn't it will use the defaults. This allows you to use different templates in different parts of a solution. Release Notes0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1
|