OctoberCMS Webpack ES6+ Sass Boilerplate
A webpack 4 based boilerplate for OctoberCMS or other web projects.
In OctoberCMS clone the repo in the plugin or theme you want.
Otherwise clone the repo in a folder, you want and change STORAGE
in bash/config.sh
Dependencies
yarn
bash
to runzip
,fly
,deploy
andftp
. I testet on debian/busterlftp
to upload with ftp byyarn ftp
Quick start
- clone the repo via
git clone https://github.com/xitara/webpack-boilerplate.git
cd webpack-es6-sass-boilerplate
- run
yarn
oryarn fly
to fetch all the dependencies - change settings in
package.json
andbash/config.sh
if possible - run
yarn start
to start the webpack-dev-server (localhost:8080
will be opened automatically) - start developing
- when you are done, run
yarn run build
to get the production version of your app
Commands
cleanup
- reset boilerplate but keeps all files in srcstart
- start the dev serverwatch
- start webpack --watchdwatch
- start webpack --watchbuild
- create builddbuild
- create development-buildzip
- creates a zip-file with all relevant files/foldersdeploy
- creates runnable folder one level downftp
- runsyarn deploy
and upload files/folders with lftpfly
- runscomposer install
if possible afteryarn install
analyze
- analyze your production bundlelint-code
- run an ESLint checklint-style
- run a Stylelint checkcheck-eslint-config
- check if ESLint config contains any rules that are unnecessary or conflict with Prettiercheck-stylelint-config
- check if Stylelint config contains any rules that are unnecessary or conflict with Prettierclear
- delete build-foldercleanup
- delete build-folder and node_modules
Included
- Webpack 4 JavaScript module bundler
- Autoprefixer for vendor prefixes (browser compability)
- Babel 7 compiler ES6+ code into a backwards compatible version of JavaScript
- Prettier an opinionated code formatter
- SASS preprocessor for CSS
- Eslint JavaScript linter
- Stylelint CSS/SASS linter
- lint-staged run linting and formatting your files that are marked as "staged" via
git add
before you commit.