Javascript Track Project Setup


Project Files

touch index.html .gitignore README.md gulpfile.js js/NAME_OF_PROJECT.js js/NAME_OF_PROJECT-INTERFACE.js

index.html header
<head>
  <link rel="stylesheet" href="build/css/vendor.css">
  <link href="build/css/vendor.css" rel="stylesheet" type="text/css">
  <script src="build/js/vendor.min.js"></script>
  <script type="text/javascript" src="build/js/app.js"></script>
</head>

npm

Use the package.json (fill in your project name at the top of the gulp), gulpfile.js, and karma.conf.js files, then npm install.

OR...Master npm Setup Command (Must run npm init first)

npm install gulp bower browserify vinyl-source-stream gulp-concat gulp-uglify gulp-util del jshint gulp-jshint bower-files browser-sync watchify jasmine karma karma-jasmine jasmine-core karma-chrome-launcher karma-cli karma-browserify karma-jquery karma-jasmine-html-reporter babelify babel-preset-es2015 --save-dev


bower

  • bower init
  • bower install jquery bootstrap#v4.0.0-beta --save

Jasmine (Install before Karma)

  • ./node_modules/.bin/jasmine init


jshint (ES6)

Use the provided .jshintrc file

OR

Configure jshint for ES6 by creating a .jshintrc file in the root directory: { "esversion":6 }


Cloning an Existing Prject

  • npm install
  • bower install
  • gulp build