From a059a0133a5f9571bd1badfeb87016fed66d2ebe Mon Sep 17 00:00:00 2001 From: Nicolas Kermarc Date: Thu, 13 Jun 2013 17:03:41 -0700 Subject: [PATCH] uglified version --- Gruntfile.js | 19 +++++++++++-------- backbone-sync-deferred.min.js | 1 + package.json | 1 - 3 files changed, 12 insertions(+), 9 deletions(-) create mode 100644 backbone-sync-deferred.min.js diff --git a/Gruntfile.js b/Gruntfile.js index 825ff7c..4edb3d2 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,11 +1,14 @@ -grunt.loadNpmTasks('grunt-contrib-concat'); module.exports = function(grunt) { - uglify:{ - dist:{ - 'backbone-sync-deferred.min.js': ['backbone-sync-deferred.js'] - } - } -}; + grunt.loadNpmTasks('grunt-contrib-uglify'); -grunt.registerTask('build', ['concat', 'uglify']); \ No newline at end of file + grunt.initConfig({ + uglify:{ + dist:{ + files:{ + 'backbone-sync-deferred.min.js': ['backbone-sync-deferred.js'] + } + } + } + }); +}; \ No newline at end of file diff --git a/backbone-sync-deferred.min.js b/backbone-sync-deferred.min.js new file mode 100644 index 0000000..9edff76 --- /dev/null +++ b/backbone-sync-deferred.min.js @@ -0,0 +1 @@ +"use strict";!function(a,b,c){module!==c?module.exports=b(require("backbone"),require("jquery")):a.Backbone.sync=b(a.Backbone,a.$)}(this,function(a,b){var c=a.sync,d=function(a,d,e){var f=e.success,g=e.error,h=b.Deferred();return e.success=function(a,b,c){return f&&f(a,b,c),h.resolve(a)},e.error=function(a,b,c){return g&&g(a,b,c),h.reject(b.responseText)},c(a,d,e),h.promise};return d}); \ No newline at end of file diff --git a/package.json b/package.json index 3d1a2e5..803d61a 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,6 @@ "backbone": "~1.0.0", "jquery": "~1.8.3", "grunt": "~0.4.1", - "grunt-contrib-concat": "~0.3.0", "grunt-contrib-uglify": "~0.2.2" } }