https://github.com/sncegroup/npm-build-boilerplate
Opinionated npm build configuration for building static websites.
https://github.com/sncegroup/npm-build-boilerplate
boilerplate browser-sync imagemin npm-scripts postcss static-site twig webpack
Last synced: 3 months ago
JSON representation
Opinionated npm build configuration for building static websites.
- Host: GitHub
- URL: https://github.com/sncegroup/npm-build-boilerplate
- Owner: SnceGroup
- License: mit
- Created: 2017-02-21T14:22:47.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-12-04T02:07:58.000Z (over 3 years ago)
- Last Synced: 2024-04-15T14:31:56.415Z (about 2 years ago)
- Topics: boilerplate, browser-sync, imagemin, npm-scripts, postcss, static-site, twig, webpack
- Language: JavaScript
- Size: 1.59 MB
- Stars: 0
- Watchers: 4
- Forks: 2
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# npm build boilerplate
Opinionated npm build configuration for building static websites.
## Requirements
- [Node.js](https://nodejs.org) (tested with v10.15.3)
## Installation
- Download the project zip or clone the repository.
- Install dependencies: `npm install`.
## Commands
Available commands to execute with `npm run `.
### Build
| Command | Tasks | Notes |
| --- | --- | --- |
| build:css:dev | postcss, autoprefixer | CSS not minified. |
| build:css:prod | postcss, autoprefixer, clean-css | CSS minified. |
| build:html:dev | twig | |
| build:html:prod | twig | |
| build:images:dev | imagemin, svgo | |
| build:images:prod | imagemin, svgo | |
| build:js:dev | webpack | |
| build:js:prod | webpack | |
| build:dev | rimraf, build:images:dev, build:css:dev, build:js:dev, build:html:dev | Clean build dev folder and run all dev build tasks. |
| build:prod | rimraf, build:images:prod, build:css:prod, build:js:prod, build:html:prod | Clean build prod folder and run all prod build tasks. |
### Watch
| Command | Tasks | Notes |
| --- | --- | --- |
| watch:js | webpack | Run webpack in watch mode. |
| watch | browser-sync, watch:css, watch:html | Run Browsersync on port 3000. Watch for scss and twig files changes and run relative build dev tasks. |