From 07017f37c30da5052aa12548222d1773c2b9ae0e Mon Sep 17 00:00:00 2001 From: bgrins Date: Mon, 22 Apr 2013 20:01:52 -0500 Subject: [PATCH] add build task and docs --- Gruntfile.js | 17 +++++++++++++++++ README.md | 10 ++++++++++ package.json | 13 ++++++++----- 3 files changed, 35 insertions(+), 5 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 575483cb..b0b248cf 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -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 @@ -35,4 +49,7 @@ module.exports = function(grunt) { // Default task. grunt.registerTask('default', ['test']); + //Build Task. + grunt.registerTask('build', ['test', 'uglify']); + }; diff --git a/README.md b/README.md index f4d21e35..1c383873 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/package.json b/package.json index 2d18a3f6..f6205774 100644 --- a/package.json +++ b/package.json @@ -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" + } }