/static-website-starter

Static website generator - Webpack 3, Bootstrap 4, Handlebars

Primary LanguageJavaScriptMIT LicenseMIT

Static website builder

Simple starter for a Bootstrap & Handlebars based websites

Installation

Clone project

git clone

Install dependencies

yarn install

Running locally (development)

yarn start will run website locally using webpack-dev-server, watch files for any changes and reload your browser automatically. Go to http://localhost:9000

Build for production

yarn build will create /dist folder with optimized bundles, including:

Bootstrap dependencies

In order to optimize Bootstrap v4 several plugins and loaders were needed

  • bootstrap@v4.0.0-alpha.6
  • bootstrap-loader
  • resolve-url-loader
  • url-loader
  • imports-loader
  • exports-loader

PostCSS - Bootstrap 4 seems to require postcss

  • postcss
  • postcss-loader (with default postcss.config.js)

Configuration file

  • .bootstraprc config file is recommended

Bootstrap uses SASS since v4, so following are also required:

  • css-loader
  • node-sass

Disable scripts (optional) If you need Bootstrap for grid/styles only - you do not need jQuery and the rest of Bootstrap's scripts https://github.com/shakacode/bootstrap-loader#scripts In .bootstraprc change scripts: false