add grunt clean to build

This commit is contained in:
Tankred Hase 2014-01-13 20:46:35 +01:00
parent aae92e913d
commit fe56283811
2 changed files with 16 additions and 6 deletions

View File

@ -102,7 +102,8 @@ module.exports = function(grunt) {
src: ['mocha/mocha.css', 'mocha/mocha.js', 'chai/chai.js'], src: ['mocha/mocha.css', 'mocha/mocha.js', 'chai/chai.js'],
dest: 'test/lib/' dest: 'test/lib/'
} }
} },
clean: ['dist/']
}); });
// Load the plugin(s) // Load the plugin(s)
@ -114,9 +115,10 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-jsdoc'); grunt.loadNpmTasks('grunt-jsdoc');
grunt.loadNpmTasks('grunt-mocha-test'); grunt.loadNpmTasks('grunt-mocha-test');
grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.registerTask('default', 'Build OpenPGP.js', function() { grunt.registerTask('default', 'Build OpenPGP.js', function() {
grunt.task.run(['browserify', 'replace', 'uglify', 'npm_pack']); grunt.task.run(['clean', 'browserify', 'replace', 'uglify', 'npm_pack']);
//TODO jshint is not run because of too many discovered issues, once these are addressed it should autorun //TODO jshint is not run because of too many discovered issues, once these are addressed it should autorun
grunt.log.ok('Before Submitting a Pull Request please also run `grunt jshint`.'); grunt.log.ok('Before Submitting a Pull Request please also run `grunt jshint`.');
}); });

View File

@ -6,14 +6,21 @@
"engines": { "engines": {
"node": ">=0.8" "node": ">=0.8"
}, },
"keywords": ["crypto", "pgp", "gpg", "openpgp"], "keywords": [
"crypto",
"pgp",
"gpg",
"openpgp"
],
"main": "src/index.js", "main": "src/index.js",
"directories": { "directories": {
"lib": "src" "lib": "src"
}, },
"files": [ "files": [
"src/", "src/",
"test/unittests.js", "test/general", "test/crypto" "test/unittests.js",
"test/general",
"test/crypto"
], ],
"scripts": { "scripts": {
"pretest": "grunt", "pretest": "grunt",
@ -33,7 +40,8 @@
"grunt-jsbeautifier": "*", "grunt-jsbeautifier": "*",
"grunt-contrib-jshint": "*", "grunt-contrib-jshint": "*",
"grunt-jsdoc": "*", "grunt-jsdoc": "*",
"grunt-mocha-test": "~0.8.1" "grunt-mocha-test": "~0.8.1",
"grunt-contrib-clean": "~0.5.0"
}, },
"dependencies": { "dependencies": {
"node-localstorage": "~0.3.4" "node-localstorage": "~0.3.4"