0.3.0 • Published 5 years ago
@fundamend/builder-archetype-static v0.3.0
builder-archetype-static
A static page archetype for builder.
Setup
Install
builder
as dev dependency with:yarn add builder --dev
Install
builder-archetype-static
as dev dependency with:yarn add @fundamend/builder-archetype-static --dev
Add the following to your
.builderrc
:--- archetypes: - "@fundamend/builder-archetype-static"
Usage
The following scripts are available through builder-archetype-static
:
start:static
: Starts a development server with Netlify Devclean:static
: Deletes all files created during development and production buildsclean:static:dev
: Deletes all files created during development buildsclean:static:prod
: Deletes all files created during production buildswatch:static
: Continually creates a clean development buildwatch:static:eleventy
: Continually builds static HTML files with Eleventy for developmentwatch:static:parcel
: Continually bundles a development build with Parcelwatch:static:copy
: Continually copies static files for developmentbuild:static
: Creates a clean production buildbuild:static:eleventy
: Builds static HTML files with Eleventy for productionbuild:static:parcel
: Bundles a production build with Parcelbuild:static:copy
: Copies static files for productionlint:static
: Runs all linterslint:static:css
: Lints CSS with stylelinttest:static
: Runs all tests with Jestreport:static
: Creates all reportsreport:static:coverage
: Creates a test coverage report with Istanbulreport:static:quality
: Creates an audit report with Lighthousebundle:static
: Creates a local package for testing changespublish:static
: Publishes to npm
These scripts can be used in your package.json
like this:
{
"scripts": {
"start": "builder run start:static",
"clean": "builder run clean:static",
"watch": "builder run watch:static",
"build": "builder run build:static",
"lint": "builder run lint:static",
"test": "builder run test:static",
"report": "builder run report:static",
"bundle": "builder run bundle:static",
"publish": "builder run publish:static"
}
}
...or directly in the terminal, like yarn builder run xxx:yyy
Development
To be able to test a development version of builder-archetype-static
in another project, pack it and install it locally, like so:
- Check out this repository
- Run
yarn
to install all dependencies - Make your changes to
builder-archetype-static
- Run
yarn pack
- Change to your projects folder and run
yarn add xxx.tgz
- Test the changes in your project
- When finished, reset your project's
package.json
to its previous state and delete the pack