Make sure you have an up to date installation of npm
with brew update
followed by either brew install npm
or brew upgrade npm
.
Then use npm to install the following apps with npm install -g $APP_NAME
gulp-cli
surge
Finally, I would strongly encourage you to install the newapp
script from here.
NOTE: If you do not use a lowercased project/folder name, the automatic deploy to surge with npm run deploy
will fail as surge.sh always expects lowercased names.
- Run
$ newapp template <project name>
- Change in to your new project
- Initialize Git
$ git init
- Build
- Clone down this repo
- Rename and change into the project folder
- Remove
git
from it$ rm -rf .git
- Initialize Git
$ git init
- Install the dependencies
$ npm install
- Build
This template features a couple different tools. First it utalizes both NPM and Gulp for different tasks.
All tasks are listed below, but ideally you will just need to run gulp start
and be done with it.
gulp start
: This is the primary task that will fire up the server and allow you to start buildinggulp server
: This will start a Browsersync server with live-reloadgulp sass
: This will compile your SASSgulp browserify
: This will transpile your JS from ES6 to ES5gulp watch
: This will start a watcher for files
npm run test
: This will launch Mocha in your terminal and run any testsnpm run deploy
: This will deploy your application to Surge.sh for younpm run lint
: This will run ESLint on your/src/js
folder