Merge pull request #390 from openpgpjs/fix/387-dist
Fix 'openpgp' module not being found after clean checkout and build.
This commit is contained in:
commit
c7174600ed
|
@ -1,8 +1,5 @@
|
|||
sudo: false
|
||||
language: node_js
|
||||
cache:
|
||||
directories:
|
||||
- node_modules
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
|
|
47
Gruntfile.js
47
Gruntfile.js
|
@ -16,10 +16,10 @@ module.exports = function(grunt) {
|
|||
},
|
||||
options: {
|
||||
browserifyOptions: {
|
||||
standalone: 'openpgp',
|
||||
standalone: 'openpgp'
|
||||
},
|
||||
external: [ 'crypto', 'node-localstorage' ]
|
||||
}
|
||||
}
|
||||
},
|
||||
openpgp_debug: {
|
||||
files: {
|
||||
|
@ -28,10 +28,10 @@ module.exports = function(grunt) {
|
|||
options: {
|
||||
browserifyOptions: {
|
||||
debug: true,
|
||||
standalone: 'openpgp',
|
||||
standalone: 'openpgp'
|
||||
},
|
||||
external: [ 'crypto', 'node-localstorage' ]
|
||||
}
|
||||
}
|
||||
},
|
||||
worker: {
|
||||
files: {
|
||||
|
@ -48,9 +48,7 @@ module.exports = function(grunt) {
|
|||
'test/lib/unittests-bundle.js': [ './test/unittests.js' ]
|
||||
},
|
||||
options: {
|
||||
browserifyOptions: {
|
||||
external: [ 'openpgp', 'crypto', 'node-localstorage']
|
||||
}
|
||||
external: ['crypto', 'node-localstorage', 'openpgp', '../../../dist/openpgp', '../../dist/openpgp']
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -119,14 +117,14 @@ module.exports = function(grunt) {
|
|||
coverage: {
|
||||
src: 'test',
|
||||
options: {
|
||||
root: 'node_modules/openpgp',
|
||||
root: '.',
|
||||
timeout: 240000,
|
||||
}
|
||||
},
|
||||
coveralls: {
|
||||
src: ['test'],
|
||||
options: {
|
||||
root: 'node_modules/openpgp',
|
||||
root: '.',
|
||||
timeout: 240000,
|
||||
coverage: true,
|
||||
reportFormats: ['cobertura','lcovonly']
|
||||
|
@ -143,7 +141,7 @@ module.exports = function(grunt) {
|
|||
}
|
||||
},
|
||||
copy: {
|
||||
npm: {
|
||||
browsertest: {
|
||||
expand: true,
|
||||
flatten: true,
|
||||
cwd: 'node_modules/',
|
||||
|
@ -228,32 +226,13 @@ module.exports = function(grunt) {
|
|||
}
|
||||
|
||||
grunt.registerTask('default', 'Build OpenPGP.js', function() {
|
||||
grunt.task.run(['clean', 'copy:zlib', 'browserify', 'replace', 'uglify', 'npm_pack']);
|
||||
grunt.task.run(['clean', 'copy:zlib', 'browserify', 'replace', 'uglify']);
|
||||
//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.registerTask('documentation', ['jsdoc']);
|
||||
|
||||
// Alias the `npm_pack` task to run `npm pack`
|
||||
grunt.registerTask('npm_pack', 'npm pack', function () {
|
||||
var done = this.async();
|
||||
var npm = require('child_process').exec('npm pack ../', { cwd: 'dist'}, function (err, stdout) {
|
||||
var package = stdout;
|
||||
if (err === null) {
|
||||
var install = require('child_process').exec('npm install dist/' + package, function (err) {
|
||||
done(err);
|
||||
});
|
||||
install.stdout.pipe(process.stdout);
|
||||
install.stderr.pipe(process.stderr);
|
||||
} else {
|
||||
done(err);
|
||||
}
|
||||
});
|
||||
npm.stdout.pipe(process.stdout);
|
||||
npm.stderr.pipe(process.stderr);
|
||||
});
|
||||
|
||||
grunt.event.on('coverage', function(lcov, done){
|
||||
require('coveralls').handleInput(lcov, function(err){
|
||||
if (err) {
|
||||
|
@ -264,8 +243,8 @@ module.exports = function(grunt) {
|
|||
});
|
||||
|
||||
// Test/Dev tasks
|
||||
grunt.registerTask('test', ['copy:npm', 'mochaTest']);
|
||||
grunt.registerTask('coverage', ['default', 'copy:npm', 'mocha_istanbul:coverage']);
|
||||
grunt.registerTask('coveralls', ['default', 'copy:npm', 'mocha_istanbul:coveralls']);
|
||||
grunt.registerTask('saucelabs', ['default', 'copy:npm', 'connect', 'saucelabs-mocha']);
|
||||
grunt.registerTask('test', ['copy:zlib', 'mochaTest']);
|
||||
grunt.registerTask('coverage', ['copy:zlib', 'mocha_istanbul:coverage']);
|
||||
grunt.registerTask('coveralls', ['copy:zlib', 'mocha_istanbul:coveralls']);
|
||||
grunt.registerTask('saucelabs', ['default', 'copy:browsertest', 'connect', 'saucelabs-mocha']);
|
||||
};
|
||||
|
|
16
package.json
16
package.json
|
@ -13,7 +13,7 @@
|
|||
"gpg",
|
||||
"openpgp"
|
||||
],
|
||||
"main": "src/index.js",
|
||||
"main": "dist/openpgp.js",
|
||||
"directories": {
|
||||
"lib": "src"
|
||||
},
|
||||
|
@ -32,7 +32,7 @@
|
|||
"test": "grunt test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"browserify": "~12.0",
|
||||
"browserify": "~13.0",
|
||||
"chai": "~3.4.1",
|
||||
"coveralls": "^2.11.2",
|
||||
"grunt": "~0.4.5",
|
||||
|
@ -40,23 +40,23 @@
|
|||
"grunt-contrib-clean": "~0.7.0",
|
||||
"grunt-contrib-connect": "~0.11.2",
|
||||
"grunt-contrib-copy": "~0.8.0",
|
||||
"grunt-contrib-jshint": "*",
|
||||
"grunt-contrib-jshint": "~0.12.0",
|
||||
"grunt-contrib-uglify": "~0.11.0",
|
||||
"grunt-jsbeautifier": "~0.2.10",
|
||||
"grunt-jsdoc": "*",
|
||||
"grunt-jsdoc": "~1.1.0",
|
||||
"grunt-mocha-istanbul": "^3.0.1",
|
||||
"grunt-mocha-test": "~0.12.7",
|
||||
"grunt-saucelabs": "8.6.2",
|
||||
"grunt-text-replace": "~0.4.0",
|
||||
"istanbul": "^0.4.1",
|
||||
"istanbul": "~0.4.1",
|
||||
"mocha": "~2.3.4",
|
||||
"node-fetch": "^1.3.3",
|
||||
"whatwg-fetch": "^0.10.1"
|
||||
"whatwg-fetch": "~0.11.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"es6-promise": "^3.0.2",
|
||||
"es6-promise": "~3.0.2",
|
||||
"node-localstorage": "~1.1.2",
|
||||
"zlibjs": "^0.2.0"
|
||||
"zlibjs": "~0.2.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp');
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../dist/openpgp');
|
||||
|
||||
var util = openpgp.util,
|
||||
chai = require('chai'),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp');
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../dist/openpgp');
|
||||
|
||||
var util = openpgp.util,
|
||||
BFencrypt = openpgp.crypto.cipher.blowfish,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp');
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../dist/openpgp');
|
||||
|
||||
var util = openpgp.util,
|
||||
chai = require('chai'),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp');
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../dist/openpgp');
|
||||
|
||||
var util = openpgp.util,
|
||||
chai = require('chai'),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp');
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../dist/openpgp');
|
||||
|
||||
var util = openpgp.util,
|
||||
chai = require('chai'),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp');
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../dist/openpgp');
|
||||
|
||||
var chai = require('chai'),
|
||||
expect = chai.expect;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp');
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../dist/openpgp');
|
||||
|
||||
var util = openpgp.util,
|
||||
MD5 = openpgp.crypto.hash.md5,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp');
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../dist/openpgp');
|
||||
|
||||
var util = openpgp.util,
|
||||
RMDstring = openpgp.crypto.hash.ripemd,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp');
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../dist/openpgp');
|
||||
|
||||
var util = openpgp.util,
|
||||
hash = openpgp.crypto.hash,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp');
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../dist/openpgp');
|
||||
|
||||
var chai = require('chai'),
|
||||
expect = chai.expect;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp');
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../dist/openpgp');
|
||||
|
||||
var chai = require('chai'),
|
||||
expect = chai.expect;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var openpgp = typeof window !== 'undefined' && window.openpgp ? window.openpgp : require('openpgp');
|
||||
var openpgp = typeof window !== 'undefined' && window.openpgp ? window.openpgp : require('../../dist/openpgp');
|
||||
var fetch = typeof window !== 'undefined' ? window.fetch : require('node-fetch');
|
||||
|
||||
var chai = require('chai'),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp');
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../dist/openpgp');
|
||||
|
||||
var chai = require('chai'),
|
||||
expect = chai.expect;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp');
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../dist/openpgp');
|
||||
|
||||
var keyring = new openpgp.Keyring(),
|
||||
chai = require('chai'),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp');
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../dist/openpgp');
|
||||
|
||||
var chai = require('chai'),
|
||||
expect = chai.expect;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp');
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../dist/openpgp');
|
||||
|
||||
var chai = require('chai'),
|
||||
expect = chai.expect;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp');
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../dist/openpgp');
|
||||
|
||||
var chai = require('chai'),
|
||||
expect = chai.expect;
|
||||
|
|
Loading…
Reference in New Issue
Block a user