- main entry point is
main.js
A boilerplate npm project for generating HTML using npm and a build toolchain. Using:
node-sass
which compiles.scss
files in CSSautoprefixer
&postcss-cli
to add vendor prefixes to compiled CSSstylelint
to check for errors in CSSonchange
to rebuild CSS whenever a change occurs in an.scss
filebrowser-sync
to run a local web serverbpm-run-all
to run multiple npm-scripts in parallel or sequential mainly for Windows systemsimagemin-cli
to minify imageswebpack
&babel
to use modern JS syntax and transpile into browser compatible JSeslint
to keep the code more consistent and to avoid bugsposthtml
&posthtml-modules
to use HTML partials i.e.<module href="/components/head.html"></module>
- Always import Javascript modules into
main.js
to keep things tidy
- Always import scss modules into
index.scss
to keep things tidy
npm run build
runs allbuild:*
scripts in parallelnpm run watch
runs allwatch:*
scripts and starts the local web server in parallelnpm run serve
runs a web server using files in the/dist
directory
- run
npm i
to install all dependecies - run
npm run build
to build to the output/dist
directory