fsprojects-archive / zzarchive-generator-fsharp

[ARCHIVED] Yeoman F# generator
Apache License 2.0
62 stars 27 forks source link

Add a way of running a script as part of creating the template #42

Open 7sharp9 opened 8 years ago

7sharp9 commented 8 years ago

Currently theres no way (afaik) to runa script when a template is created, so I cant install npm / other dependencies for example.

rmunn commented 8 years ago

An extra parameter in templates.json seems like the natural place to specify this, which could specify the script file to run, and any command-line parameters to pass to the file. To ensure cross-platform compatibility, we'd need to be able to specify a different script per platform. We could take some inspiration from how VS Code handles the tasks.json file.

rmunn commented 8 years ago

Or perhaps cross-platform compatibility could be ensured by having the template-creation script be a Javascript file, specified in the templates.json, which the generator could require and then run a specified entry-point function.