diff --git a/.npmignore b/.npmignore index 4f0682f..f75efb0 100644 --- a/.npmignore +++ b/.npmignore @@ -1,2 +1,3 @@ .project .settings +/dist/noder-browser.zip diff --git a/Gruntfile.js b/Gruntfile.js index c343c7d..be8257b 100755 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -134,6 +134,19 @@ module.exports = function(grunt) { } } }, + compress: { + noderBrowserZip: { + options: { + archive: "dist/noder-browser.zip" + }, + files: [{ + expand: true, + cwd: 'dist/browser', + src: ['**/*.js'] + }] + + } + }, jshint: { sources: ['package.json', '*.js', 'tasks/**/*.js', 'build/**/*.js', 'src/**/*.js', 'spec/**/*.js', '!spec/**/*.error.js', '!spec/browser/json2.js'], dist: ['dist/*/noder.js'], @@ -323,7 +336,7 @@ module.exports = function(grunt) { grunt.loadNpmTasks('atpackager'); require('atpackager').loadPlugin('./atpackager'); - grunt.registerTask('build', ['clean', 'atpackager', 'uglify', 'gzip', 'doc']); + grunt.registerTask('build', ['clean', 'atpackager', 'uglify', 'gzip', 'compress', 'doc']); grunt.registerTask('test', ['jsbeautifier:check', 'jshint', 'mocha', 'karma:unit']); grunt.registerTask('ci', ['jsbeautifier:check', 'jshint', 'mocha', 'karma:ci']); grunt.registerTask('doc', ['copy:docData', 'copy:docHtml', 'markdown:doc']); diff --git a/package.json b/package.json index d4ffc53..29c0228 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "expect.js": "0.2.0", "grunt": "0.4.2", "grunt-contrib-clean": "0.4.1", + "grunt-contrib-compress": "0.9.1", "grunt-contrib-copy": "0.5.0", "grunt-contrib-jshint": "0.3.0", "grunt-contrib-uglify": "0.4.0",