All Projects → toddmotto → Gulp Oss

toddmotto / Gulp Oss

Licence: other
My Gulp.js boilerplate for creating new JavaScript projects

Programming Languages

javascript
184084 projects - #8 most used programming language

GulpOSS

My Gulp.js boilerplate for creating new JavaScript projects! Use if you will, if so here's a brief intro as to what it does.

This boilerplate does the following:

  • Provides a UMD wrapper for JavaScript modules, project.js (rename to suit)
  • Lints src/*.js
  • Adds a copyright banner to outputted files, configurable
  • Compiles a *.js and *.min.js version of the src/*.js file
  • Cleans the dist directory each time files compiled
  • Boots a Karma server, runs Jasmine unit tests on src/*.js file
  • Evalutes Jasmine tests using PhantomJS (headless WebKit)
  • Prints tests on the command line
  • Ships with .travis.yml which runs gulp on TravisCI

Dependencies

How to use

Inside gulpfile.js you'll see the following, rename the scripts: [] file to your desired name:

var paths = {
  output : 'dist/',
  scripts : [
    'src/project.js'
  ],
  test: [
    'test/spec/**/*.js'
  ]
};

Inside package.json you'll be able to change the names of the project.

Inside project.js is the UMD setup which returns an Object from the module, an enhanced Module pattern. Rename root.MYPROJECT to suit.

Inside spec-myproject.js is an example describe() to setup the first Jasmine unit test.

Run npm install and gulp to get going.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].