🎮 Create your own Nintendo Switch Joy-Con color combinations!
Switch branches/tags
Nothing to show
Clone or download
Latest commit a02f36a Mar 18, 2017
Permalink
Failed to load latest commit information.
dist Initial commit Mar 15, 2017
src Resolves #5 Mar 18, 2017
.gitignore Initial commit Mar 15, 2017
LICENSE.md Initial commit Mar 15, 2017
README.md README update Mar 17, 2017
gulpfile.js Resolves #5 Mar 18, 2017
package.json GA and project name Mar 17, 2017
screenshot.png GA and project name Mar 17, 2017

README.md

Color Con

alt tag

Dependencies

Node.js v4.5.0 or higher

Setup

$ git clone https://github.com/krestaino/color-con.git
$ cd color-con
$ npm install

Development

$ gulp dev
  • Runs build
  • Launches Browsersync at http://localhost:3000/
  • Watches .njk, .json, .scss, and .js files and reloads browsers on save

Note: gulp alone is shorthand for gulp dev

Build

$ gulp build
  • Runs clean,nunjucks,css,js, and assets

Production

$ gulp build --production
  • Minifies .html, .css, .js
  • Skips creating source maps
  • Replaces "/assets/" in .njk,.scss, and .js files with ./.production-url file contents

Gulp Tasks

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

$ gulp css
  • Sass compile
  • Autoprefix
  • Minify
  • Source maps

$ gulp js
  • Concatenate
  • Minify
  • Source maps

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

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