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
|
sudo: false
|
||||||
language: node_js
|
language: node_js
|
||||||
cache:
|
|
||||||
directories:
|
|
||||||
- node_modules
|
|
||||||
matrix:
|
matrix:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
include:
|
include:
|
||||||
|
|
51
Gruntfile.js
51
Gruntfile.js
|
@ -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: ['crypto', 'node-localstorage', 'openpgp', '../../../dist/openpgp', '../../dist/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/',
|
||||||
|
@ -228,32 +226,13 @@ module.exports = function(grunt) {
|
||||||
}
|
}
|
||||||
|
|
||||||
grunt.registerTask('default', 'Build OpenPGP.js', function() {
|
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
|
//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`.');
|
||||||
});
|
});
|
||||||
|
|
||||||
grunt.registerTask('documentation', ['jsdoc']);
|
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){
|
grunt.event.on('coverage', function(lcov, done){
|
||||||
require('coveralls').handleInput(lcov, function(err){
|
require('coveralls').handleInput(lcov, function(err){
|
||||||
if (err) {
|
if (err) {
|
||||||
|
@ -264,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']);
|
||||||
};
|
};
|
||||||
|
|
18
package.json
18
package.json
|
@ -2,7 +2,7 @@
|
||||||
"name": "openpgp",
|
"name": "openpgp",
|
||||||
"description": "OpenPGP.js is a Javascript implementation of the OpenPGP protocol. This is defined in RFC 4880.",
|
"description": "OpenPGP.js is a Javascript implementation of the OpenPGP protocol. This is defined in RFC 4880.",
|
||||||
"version": "1.4.1",
|
"version": "1.4.1",
|
||||||
"license" : "LGPL-3.0+",
|
"license": "LGPL-3.0+",
|
||||||
"homepage": "http://openpgpjs.org/",
|
"homepage": "http://openpgpjs.org/",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.8"
|
"node": ">=0.8"
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
"gpg",
|
"gpg",
|
||||||
"openpgp"
|
"openpgp"
|
||||||
],
|
],
|
||||||
"main": "src/index.js",
|
"main": "dist/openpgp.js",
|
||||||
"directories": {
|
"directories": {
|
||||||
"lib": "src"
|
"lib": "src"
|
||||||
},
|
},
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
"test": "grunt test"
|
"test": "grunt test"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"browserify": "~12.0",
|
"browserify": "~13.0",
|
||||||
"chai": "~3.4.1",
|
"chai": "~3.4.1",
|
||||||
"coveralls": "^2.11.2",
|
"coveralls": "^2.11.2",
|
||||||
"grunt": "~0.4.5",
|
"grunt": "~0.4.5",
|
||||||
|
@ -40,23 +40,23 @@
|
||||||
"grunt-contrib-clean": "~0.7.0",
|
"grunt-contrib-clean": "~0.7.0",
|
||||||
"grunt-contrib-connect": "~0.11.2",
|
"grunt-contrib-connect": "~0.11.2",
|
||||||
"grunt-contrib-copy": "~0.8.0",
|
"grunt-contrib-copy": "~0.8.0",
|
||||||
"grunt-contrib-jshint": "*",
|
"grunt-contrib-jshint": "~0.12.0",
|
||||||
"grunt-contrib-uglify": "~0.11.0",
|
"grunt-contrib-uglify": "~0.11.0",
|
||||||
"grunt-jsbeautifier": "~0.2.10",
|
"grunt-jsbeautifier": "~0.2.10",
|
||||||
"grunt-jsdoc": "*",
|
"grunt-jsdoc": "~1.1.0",
|
||||||
"grunt-mocha-istanbul": "^3.0.1",
|
"grunt-mocha-istanbul": "^3.0.1",
|
||||||
"grunt-mocha-test": "~0.12.7",
|
"grunt-mocha-test": "~0.12.7",
|
||||||
"grunt-saucelabs": "8.6.2",
|
"grunt-saucelabs": "8.6.2",
|
||||||
"grunt-text-replace": "~0.4.0",
|
"grunt-text-replace": "~0.4.0",
|
||||||
"istanbul": "^0.4.1",
|
"istanbul": "~0.4.1",
|
||||||
"mocha": "~2.3.4",
|
"mocha": "~2.3.4",
|
||||||
"node-fetch": "^1.3.3",
|
"node-fetch": "^1.3.3",
|
||||||
"whatwg-fetch": "^0.10.1"
|
"whatwg-fetch": "~0.11.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"es6-promise": "^3.0.2",
|
"es6-promise": "~3.0.2",
|
||||||
"node-localstorage": "~1.1.2",
|
"node-localstorage": "~1.1.2",
|
||||||
"zlibjs": "^0.2.0"
|
"zlibjs": "~0.2.0"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'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,
|
var util = openpgp.util,
|
||||||
chai = require('chai'),
|
chai = require('chai'),
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'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,
|
var util = openpgp.util,
|
||||||
BFencrypt = openpgp.crypto.cipher.blowfish,
|
BFencrypt = openpgp.crypto.cipher.blowfish,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'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,
|
var util = openpgp.util,
|
||||||
chai = require('chai'),
|
chai = require('chai'),
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'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,
|
var util = openpgp.util,
|
||||||
chai = require('chai'),
|
chai = require('chai'),
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'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,
|
var util = openpgp.util,
|
||||||
chai = require('chai'),
|
chai = require('chai'),
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'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'),
|
var chai = require('chai'),
|
||||||
expect = chai.expect;
|
expect = chai.expect;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'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,
|
var util = openpgp.util,
|
||||||
MD5 = openpgp.crypto.hash.md5,
|
MD5 = openpgp.crypto.hash.md5,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'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,
|
var util = openpgp.util,
|
||||||
RMDstring = openpgp.crypto.hash.ripemd,
|
RMDstring = openpgp.crypto.hash.ripemd,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'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,
|
var util = openpgp.util,
|
||||||
hash = openpgp.crypto.hash,
|
hash = openpgp.crypto.hash,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'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'),
|
var chai = require('chai'),
|
||||||
expect = chai.expect;
|
expect = chai.expect;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'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'),
|
var chai = require('chai'),
|
||||||
expect = chai.expect;
|
expect = chai.expect;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'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 fetch = typeof window !== 'undefined' ? window.fetch : require('node-fetch');
|
||||||
|
|
||||||
var chai = require('chai'),
|
var chai = require('chai'),
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'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'),
|
var chai = require('chai'),
|
||||||
expect = chai.expect;
|
expect = chai.expect;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'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(),
|
var keyring = new openpgp.Keyring(),
|
||||||
chai = require('chai'),
|
chai = require('chai'),
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'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'),
|
var chai = require('chai'),
|
||||||
expect = chai.expect;
|
expect = chai.expect;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'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'),
|
var chai = require('chai'),
|
||||||
expect = chai.expect;
|
expect = chai.expect;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'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'),
|
var chai = require('chai'),
|
||||||
expect = chai.expect;
|
expect = chai.expect;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user