🚀 Static HTML Webpack Boilerplate
Enjoy hand-writing your HTML? Keep it old-school with modern build tools. This boilerplate setup makes it easier to write your own styling, scripts, and mark-up.
srcand build minified, transpiled code for production in
- Continuous integration with linting tests and deploying to
- Live reloading with webpack-dev-server
- ES6+ to ES5 transpilation, bundling, and minification
- SCSS to CSS transpilation, bundling, autoprefixing, and minification
- Automatic copying of HTML and static assets from
- Linting for styles and scripts
- Use this template on GitHub or download the latest release from the Releases page.
src/jsand SCSS styling in
src/style. Store static assets in
src/static. Organize HTML files the way you like.
- Available commands:
npm run build: Build files to the
distfolder. Transpiles down to ES5 and bundles all JS into
app.bundle.js. Transpiles SCSS to CSS and adds prefixing into
style.bundle.css. Copies static assets and HTML over, and bundled CSS and JS gets added to HTML file.
npm run start:dev: Run
npm run start: Builds files and runs a local production server on
npm run run lint:js: Lints JS with ESLint.
npm run lint:styles: Lints SCSS stylesheets with stylelint.
npm run lint:html: Lints HTML for a11y issues using pa11y.
🔄 Continuous Integration
This boilerplate contains integration with Travis CI. The build system runs all linting scripts and deploys to GitHug pages upon push to the
master branch. However, note that this deployment flow only works for Project Pages, as User and Organization pages only support the master branch flow.
For more information on how to set up alternative deployment processes, check out the Travis CI documentation on deployment. The service can deploy to dozens of cloud providers, including Heroku, AWS, and Firebase.