Skip to content

A NodeJS boilerplate for building, watching, linting and testing various front-end assets.

Notifications You must be signed in to change notification settings

BillieBobbel23/node-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-boilerplate

A NodeJS boilerplate for building, watching, linting and testing various front-end assets. Using GulpJS, Webpack and Jasmine.

stats statsdev

Installation:

git clone https://github.com/BillieBobbel23/node-boilerplate tools &&
npm --prefix ./tools install ./tools

Windows:

git clone https://github.com/BillieBobbel23/node-boilerplate tools
cd tools
npm install

Usage:

Running scripts

Directly:
In your CLI go to the ./tools directory and run npm run TASK_NAME.
Alternatively run it from the root folder by using a prefix npm run TASK_NAME --prefix ./tools

Automated
Add a reference to any task to your package.json to extend existing functionality

  "scripts": {
    "build": "npm run build --prefix ./tools"
  },

Scripts

  • npm run build : Builds all Front-end assets to the output folder
  • npm run watch : Starts streams for GulpJS and Webpack Opens a new window
  • npm run lint : Lints output HTML, CSS and JS
  • npm test : Runs tests on JS using Jasmine

and two subtasks:

  • npm run clean : Removes output folder
  • npm run rebuild : Runs clean followed by build

Debugging

Clones test-assets into tools/debug to run the tasks against

  • npm run debug:init : Runs all tasks on the debug package and output results
  • npm run debug : Runs all tasks on the debug package and output results