Add npm run build
to build both compat and non-compat files
This commit is contained in:
parent
a2044a2833
commit
08216bab13
|
@ -197,6 +197,12 @@ module.exports = function(grunt) {
|
||||||
cwd: 'node_modules/compressjs/bin/',
|
cwd: 'node_modules/compressjs/bin/',
|
||||||
src: ['bzip2.build.js'],
|
src: ['bzip2.build.js'],
|
||||||
dest: 'src/compression/'
|
dest: 'src/compression/'
|
||||||
|
},
|
||||||
|
openpgp_compat: {
|
||||||
|
expand: true,
|
||||||
|
cwd: 'dist/',
|
||||||
|
src: ['*.js'],
|
||||||
|
dest: 'dist/compat/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
clean: ['dist/'],
|
clean: ['dist/'],
|
||||||
|
@ -295,7 +301,7 @@ module.exports = function(grunt) {
|
||||||
// Build tasks
|
// Build tasks
|
||||||
grunt.registerTask('version', ['replace:openpgp']);
|
grunt.registerTask('version', ['replace:openpgp']);
|
||||||
grunt.registerTask('replace_min', ['replace:openpgp_min', 'replace:worker_min']);
|
grunt.registerTask('replace_min', ['replace:openpgp_min', 'replace:worker_min']);
|
||||||
grunt.registerTask('build', ['clean', 'copy:bzip2', 'browserify:openpgp', 'browserify:worker', 'version', 'uglify', 'replace_min']);
|
grunt.registerTask('build', ['copy:bzip2', 'browserify:openpgp', 'browserify:worker', 'version', 'uglify', 'replace_min']);
|
||||||
grunt.registerTask('documentation', ['jsdoc']);
|
grunt.registerTask('documentation', ['jsdoc']);
|
||||||
grunt.registerTask('default', ['build']);
|
grunt.registerTask('default', ['build']);
|
||||||
// Test/Dev tasks
|
// Test/Dev tasks
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
"test/crypto"
|
"test/crypto"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"build": "grunt build --compat copy:openpgp_compat && grunt build",
|
||||||
"pretest": "grunt",
|
"pretest": "grunt",
|
||||||
"test": "grunt test",
|
"test": "grunt test",
|
||||||
"lint": "eslint src"
|
"lint": "eslint src"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user