A simple project scaffolding tool that generates project structures from hsfiles-style templates.
- Generate project scaffolds from templates
- Support for local files and remote URLs
- Variable substitution with
{{variable}}syntax - Interactive prompts for missing variables
- Easy installation and usage
TODO
boil <project-name> <template-path># Local template file
boil my-project ./templates/basic
# Remote template
boil my-project https://raw.githubusercontent.com/datalek/boil/main/examples/minimal-js
# Using remote runner
curl -fsSL https://raw.githubusercontent.com/datalek/boil/main/scripts/remote.sh | bash -s -- my-project https://raw.githubusercontent.com/datalek/boil/main/examples/minimal-js For convenience, you can also use the remote runner script:
curl -fsSL https://raw.githubusercontent.com/datalek/boil/main/scripts/remote.sh | bash -s -- <project-name> <template-path>Boil uses a simplified hsfiles format:
{-# START_FILE package.json #-}
{
"name": "{{name}}",
"version": "1.0.0",
"description": "{{description}}",
"author": "{{author}}"
}
{-# START_FILE src/{{entry-point}} #-}
console.log("Hello from {{name}}!");
{-# START_FILE README.md #-}
# {{name}}
Created by {{author}}.
- Use
{{variable}}syntax for variables {{name}}is automatically set to the project name- All other variables will be prompted interactively
- Variables can be used in both filenames and content
- Install dependencies and setup tools: (see Requirements below).
- Install project dependencies:
npm i. - Run development tasks:
npm run build,npm run dev.
This project requires the following tools to works as expected. Make sure to install all the following dependencies using the recommended installation methods.
-
Node.js
Use fnm to install the required version ofNode.js.# uses `engines.node` field in `package.json` fnm install # check that the installed version is correct node --version
-
npm
Already provided by node!
# Clone the repository
git clone https://github.com/datalek/boil.git
cd boil
# Install dependencies
npm i
# Use the dev script (builds and runs)
npm run local my-test-project ./template --verbose# Production build
npm run build
# Clean build artifacts
npm run cleanMIT