A front-end boilerplate for scaffolding static projects.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist
src
.env.template
.gitignore
LICENSE.md
README.md
gulpfile.js
package-lock.json
package.json

README.md

Fed Up!

A front-end boilerplate for scaffolding static projects.

Features

  • Nunjucks templating
  • Inline SVG
  • SCSS compile, autoprefix, minification, and source maps
  • ES6/ES7 transpilation, minification, and source maps
  • Hot-reload on file save

Dependencies

Node.js 8 LTS

Setup

$ git clone https://github.com/krestaino/fed-up.git
$ cd fed-up
$ npm install

Development

$ npm start
  • Runs gulp build
  • Launches Browsersync at http://localhost:3000/
  • Watches .njk, .json, .scss, and .js files with hot-reloading.

Production

$ npm run build
  • Minifies .html, .css, .js
  • Skips creating source maps
  • Replaces relative URLs with the PRODUCTION_URL environmental variable set in .env

Gulp Tasks

$ gulp nunjucks
  • Compiles .njk files from src/html/pages/
  • Replaces <img src="*.svg"> with inlined SVG
  • Languages are built from src/i18n/*.json files. By default, only en.json exists. Adding es.json will automatically build out Spanish pages to dist/es/.

$ gulp scss
  • SCSS compile
  • Autoprefix
  • Minify
  • Source maps

$ gulp js
  • ES6/ES7 transpilation
  • Minify
  • Source maps

$ gulp assets
  • Moves src/assets/**/* to dist/assets/

$ gulp clean
  • Deletes all files and folders from dist/