https://github.com/fable-compiler/fable-templates
Templates for Fable projects maintained by fable-compiler org
https://github.com/fable-compiler/fable-templates
Last synced: about 8 hours ago
JSON representation
Templates for Fable projects maintained by fable-compiler org
- Host: GitHub
- URL: https://github.com/fable-compiler/fable-templates
- Owner: fable-compiler
- License: mit
- Created: 2017-08-27T14:34:37.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-05-17T04:18:39.000Z (almost 2 years ago)
- Last Synced: 2025-04-14T12:53:15.586Z (13 days ago)
- Language: F#
- Size: 1.77 MB
- Stars: 26
- Watchers: 5
- Forks: 15
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fable-templates
[](https://gitpod.io/#https://github.com/fable-compiler/fable-templates/)
Templates for Fable projects maintained by fable-compiler org
## Quick install
To create a new minimal Fable project:
```sh
dotnet new -i Fable.Template
dotnet new fable -n
```## List of templates
| Name | Short Name | Description |
|---|---|---|
| Fable.Template | fable | Small Fable app project with Webpack, with the only dependency on Fable.Browser.Dom |
| Fable.Snowpack.Template | fable-snowpack | Small Fable app project with Snowpack, with the only dependency on Fable.Browser.Dom |## How to test the template before publishing?
1. Restore nuget package `dotnet restore minimal`
2. Package the template by running `dotnet pack -c Release minimal/Fable.Template.proj`
3. Install the new version of the template: `dotnet new -i minimal/bin/Release/Fable.Template.x.y.z.nupkg`
4. Create the template: `dotnet new fable -n `.If you are using gitpod to contribute, add `--gitpod` at the end
5. `cd `
6. Follow the instructions from the README.md of the installed template## Maintainer notes
### Requirements
- Your NuGet API key set in `NUGET_KEY` variable.
### Procedure to publish a new version
To publish a new version of the template you need to:
1. Update the changelog of the template you want to publish
2. Run `dotnet tool restore`
3. Run `dotnet fake build -t Release`### Gitpod condition
In the webpack.config.js, we are adding things like:
```js
//#if( gitpod )
const execSync = require('child_process').execSync;
var isGitPod = process.env.GITPOD_INSTANCE_ID !== undefined;function getDevServerUrl() {
if (isGitPod) {
const url = execSync('gp url 8080');
return url.toString().trim();
} else {
return `http://localhost:${CONFIG.devServerPort}`;
}
}
//#endif
```The code between `//#if( gitpod )` and `//#endif` is not included in the generated template. It's here so people can use Gitpod to contribute to this repository.