From 99cd327002f03fb03e8d437fef5a1bdca2dab2ee Mon Sep 17 00:00:00 2001 From: Keivan Beigi Date: Thu, 18 Apr 2013 11:01:21 -0700 Subject: [PATCH] updated grunt task for javascript library update --- Gruntfile.js | 23 ++++++++++++++++++++++- package.json | 11 ++++------- update.js | 20 -------------------- 3 files changed, 26 insertions(+), 28 deletions(-) delete mode 100644 update.js diff --git a/Gruntfile.js b/Gruntfile.js index 3ec45cde6..b6e5aada7 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -3,6 +3,27 @@ module.exports = function(grunt) { // Project configuration. grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), + + curl: { + 'UI/JsLibraries/backbone.collectionbinder.js': 'http://raw.github.com/theironcook/Backbone.ModelBinder/master/Backbone.CollectionBinder.js', + 'UI/JsLibraries/backbone.js': 'http://raw.github.com/documentcloud/backbone/master/backbone.js', + 'UI/JsLibraries/backbone.marionette.js': 'http://raw.github.com/marionettejs/backbone.marionette/master/lib/backbone.marionette.js', + 'UI/JsLibraries/backbone.modelbinder.js': 'http://raw.github.com/theironcook/Backbone.ModelBinder/master/Backbone.ModelBinder.js', + 'UI/JsLibraries/backbone.mutators.js': 'http://raw.github.com/asciidisco/Backbone.Mutators/master/backbone.mutators.js', + 'UI/JsLibraries/backbone.shortcuts.js': 'http://raw.github.com/bry4n/backbone-shortcuts/master/backbone.shortcuts.js', + //'UI/JsLibraries/bootstrap.js': + //'UI/JsLibraries/bootstrap.slider.js': + 'UI/JsLibraries/bootstrap.swtitch.js': 'http://raw.github.com/nostalgiaz/bootstrap-switch/master/static/js/bootstrapSwitch.js', + 'UI/JsLibraries/handlebars.runtime.js': 'http://raw.github.com/wycats/handlebars.js/master/dist/handlebars.runtime.js', + 'UI/JsLibraries/jquery.cookie.js': 'http://raw.github.com/carhartl/jquery-cookie/master/jquery.cookie.js', + 'UI/JsLibraries/jquery.js': 'http://code.jquery.com/jquery.js', + //'NzbDrone.Backbone/JsLibraries/jquery.tablesorter.bootstrap.js': + //'NzbDrone.Backbone/JsLibraries/jquery.tablesorter.js': + 'UI/JsLibraries/require.js': 'http://raw.github.com/jrburke/requirejs/master/require.js', + 'UI/JsLibraries/sugar.js': 'http://raw.github.com/andrewplummer/Sugar/master/release/sugar-full.development.js', + 'UI/JsLibraries/underscore.js': 'http://raw.github.com/documentcloud/underscore/master/underscore.js' + }, + uglify: { files: { expand: true, // Enable dynamic expansion. @@ -99,7 +120,7 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-wrap'); grunt.loadNpmTasks('grunt-notify'); - + grunt.loadNpmTasks('grunt-curl'); // Default task(s). grunt.registerTask('default', ['copy','less:bootstrap','handlebars', 'watch']); diff --git a/package.json b/package.json index 8da13316a..7fd205ea0 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "NZBDrone\r =====", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "preinstall": "npm install grunt-cli -g" }, "repository": { "type": "git", @@ -23,10 +23,7 @@ "grunt-contrib-concat": "*", "grunt-contrib-copy": "*", "grunt-wrap": "*", - "grunt-curl": "*", - "grunt-notify":"*" - }, - "scripts": { - "preinstall": "npm install grunt-cli -g" -} + "grunt-curl": "~0.6.0", + "grunt-notify": "*" + } } diff --git a/update.js b/update.js deleted file mode 100644 index 22f56516e..000000000 --- a/update.js +++ /dev/null @@ -1,20 +0,0 @@ -module.exports = function(grunt) { - - grunt.initConfig({ - pkg: grunt.file.readJSON('package.json'), - curl: { - 'NzbDrone.Backbone/JsLibraries/jquery.js': 'http://code.jquery.com/jquery.js', - 'NzbDrone.Backbone/JsLibraries/backbone.collectionbinder.js': 'http://raw.github.com/theironcook/Backbone.ModelBinder/master/Backbone.CollectionBinder.js', - 'NzbDrone.Backbone/JsLibraries/backbone.modelbinder.js': 'http://raw.github.com/theironcook/Backbone.ModelBinder/master/Backbone.ModelBinder.js', - 'NzbDrone.Backbone/JsLibraries/backbone.js': 'http://raw.github.com/documentcloud/backbone/master/backbone.js', - 'NzbDrone.Backbone/JsLibraries/backbone.marionette.js': 'http://raw.github.com/marionettejs/backbone.marionette/master/lib/backbone.marionette.js', - 'NzbDrone.Backbone/JsLibraries/backbone.mutators.js': 'http://raw.github.com/asciidisco/Backbone.Mutators/master/backbone.mutators.js', - 'NzbDrone.Backbone/JsLibraries/handlebars.runtime.js': 'http://raw.github.com/wycats/handlebars.js/master/dist/handlebars.runtime.js' - } - - }); - - grunt.loadNpmTasks('grunt-curl'); - - grunt.registerTask('default', ['curl']); -}; \ No newline at end of file