Webpack
This repo is a blank canvas file structure for JS and ScSS using ITCSS
methodology - using Webpack to build your CSS and JS with sourcemaps and manifest file., (*1)
To install just download this repo and place within your public folder / theme etc. and then run, (*2)
npm i
We have included two example libraries, foundation-sites
and slick-carousel
. To install your preferred framework, just use a package manager and update the references in styles/style.scss
and scripts/application.js
., (*3)
You can then build JS and CSS files:, (*4)
npm run build
You can watch JS and CSS files:, (*5)
npm start
Commands can be seen in package.json
file:, (*6)
"build": "export NODE_ENV=production; webpack --mode production",
"watch": "webpack-dev-server --mode development --watch --hot --inline",
"start": "npm run watch --silent"