Refactor Grunt.js following the unittests packaging changes

This commit is contained in:
evilaliv3 2016-01-22 22:54:48 +01:00
parent af4a9ba6ad
commit 86f042c480

View File

@ -16,9 +16,9 @@ module.exports = function(grunt) {
}, },
options: { options: {
browserifyOptions: { browserifyOptions: {
standalone: 'openpgp', standalone: 'openpgp'
external: [ 'crypto', 'node-localstorage' ] },
} external: [ 'crypto', 'node-localstorage' ]
} }
}, },
openpgp_debug: { openpgp_debug: {
@ -28,9 +28,9 @@ module.exports = function(grunt) {
options: { options: {
browserifyOptions: { browserifyOptions: {
debug: true, debug: true,
standalone: 'openpgp', standalone: 'openpgp'
external: [ 'crypto', 'node-localstorage' ] },
} external: [ 'crypto', 'node-localstorage' ]
} }
}, },
worker: { worker: {
@ -48,9 +48,7 @@ module.exports = function(grunt) {
'test/lib/unittests-bundle.js': [ './test/unittests.js' ] 'test/lib/unittests-bundle.js': [ './test/unittests.js' ]
}, },
options: { options: {
browserifyOptions: { external: [ 'openpgp']
external: [ 'openpgp', 'crypto', 'node-localstorage']
}
} }
} }
}, },
@ -119,14 +117,14 @@ module.exports = function(grunt) {
coverage: { coverage: {
src: 'test', src: 'test',
options: { options: {
root: 'node_modules/openpgp', root: '.',
timeout: 240000, timeout: 240000,
} }
}, },
coveralls: { coveralls: {
src: ['test'], src: ['test'],
options: { options: {
root: 'node_modules/openpgp', root: '.',
timeout: 240000, timeout: 240000,
coverage: true, coverage: true,
reportFormats: ['cobertura','lcovonly'] reportFormats: ['cobertura','lcovonly']
@ -143,7 +141,7 @@ module.exports = function(grunt) {
} }
}, },
copy: { copy: {
npm: { browsertest: {
expand: true, expand: true,
flatten: true, flatten: true,
cwd: 'node_modules/', cwd: 'node_modules/',
@ -245,8 +243,8 @@ module.exports = function(grunt) {
}); });
// Test/Dev tasks // Test/Dev tasks
grunt.registerTask('test', ['copy:npm', 'mochaTest']); grunt.registerTask('test', ['copy:zlib', 'mochaTest']);
grunt.registerTask('coverage', ['default', 'copy:npm', 'mocha_istanbul:coverage']); grunt.registerTask('coverage', ['copy:zlib', 'mocha_istanbul:coverage']);
grunt.registerTask('coveralls', ['default', 'copy:npm', 'mocha_istanbul:coveralls']); grunt.registerTask('coveralls', ['copy:zlib', 'mocha_istanbul:coveralls']);
grunt.registerTask('saucelabs', ['default', 'copy:npm', 'connect', 'saucelabs-mocha']); grunt.registerTask('saucelabs', ['default', 'copy:browsertest', 'connect', 'saucelabs-mocha']);
}; };