Skip to content

Commit

Permalink
add build task and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bgrins committed Apr 23, 2013
1 parent eed32bc commit 07017f3
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 5 deletions.
17 changes: 17 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,26 @@ module.exports = function(grunt) {
}
},
all: ['spectrum.js']
},


uglify: {
options: {
mangle: false
},
dist: {
files: {
'build/spectrum-min.js': ['spectrum.js']
}
}
}

});


grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-uglify');


// Testing tasks
Expand All @@ -35,4 +49,7 @@ module.exports = function(grunt) {
// Default task.
grunt.registerTask('default', ['test']);

//Build Task.
grunt.registerTask('build', ['test', 'uglify']);

};
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,13 @@ Spectrum is registered as a jQuery plugin on the jQuery plugin repository here:

[![Build Status](https://secure.travis-ci.org/bgrins/spectrum.png?branch=master)](http://travis-ci.org/bgrins/spectrum)


## To Build Locally

If you'd like to download and use the plugin, head over to http://bgrins.github.io/spectrum/ and click the 'Download Zip' button.

If you'd like to run the development version, spectrum uses Grunt to automate the testing, linting, and building. Head over to http://gruntjs.com/getting-started for more information. First, clone the repository, then run:

npm install -g grunt-cli
npm install
grunt build
13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"devDependencies": {
"grunt": "~0.4.0",
"grunt-contrib-jshint": "~0.4.3",
"grunt-contrib-qunit": "~0.2.0"
}
"name": "spectrum",
"version": "1.1.0",
"devDependencies": {
"grunt": "~0.4.0",
"grunt-contrib-jshint": "~0.4.3",
"grunt-contrib-qunit": "~0.2.0",
"grunt-contrib-uglify": "~0.2.0"
}
}

0 comments on commit 07017f3

Please sign in to comment.