Skip to content

A simple boilerplate showing how to set up browserify, gulp, and karma/jasmine test units together.

Notifications You must be signed in to change notification settings

katowulf/browserify-gulp-boilerplate-simple

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gulp + Browserify + Karma/Jasmine Boilerplate

This is a boilerplate demonstrating a working setup of gulp, browserify, and karma/jasmine test units. It performs concat, minification, and bundling for distro.

The src/alpha/exports.js includes one external library (firebase.js) which is installed via npm install for demonstration purposes, since external libs gave me some grief initially with browserify.

This bundles up all the contents of src/ and makes them available using require('base') or by simply calling require('./dist/bundle.js'); both are equivalent.

Installation

npm install
gulp

Commands available

  • gulp bundle: lint, build, and minify the code into the dist/bundle.js and dist/bundle.min.js files.
  • gulp test: run test units in karma/jasmine
  • gulp watch: watch any src/ or test/ files for changes and re-run test units
  • gulp: runs bundle and test

Directory structure

/dist/bundle*.js    the browserified output for use in production
/gulp/*             config files for gulp commands
/src/base.js        compiles all the src/ contents into one export
/src/**/*.js        the app modules
/test/**/*.spec.js  the test units

About

A simple boilerplate showing how to set up browserify, gulp, and karma/jasmine test units together.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published