Make standalone the default and use openpgp.min.js in node package
This commit is contained in:
parent
ec061ba101
commit
bd963aabf0
46
Gruntfile.js
46
Gruntfile.js
|
@ -6,35 +6,16 @@ module.exports = function(grunt) {
|
|||
browserify: {
|
||||
openpgp_nodebug: {
|
||||
files: {
|
||||
'dist/openpgp_nodebug.js': []
|
||||
},
|
||||
options: {
|
||||
alias: [ './src/:openpgp' ],
|
||||
external: [ 'crypto', 'node-localstorage' ]
|
||||
}
|
||||
},
|
||||
openpgp: {
|
||||
files: {
|
||||
'dist/openpgp.js': []
|
||||
},
|
||||
options: {
|
||||
debug: true,
|
||||
alias: [ './src/:openpgp' ],
|
||||
external: [ 'crypto', 'node-localstorage' ]
|
||||
}
|
||||
},
|
||||
openpgp_sa_nodebug: {
|
||||
files: {
|
||||
'dist/openpgp-sa_nodebug.js': [ './src/index.js' ]
|
||||
'dist/openpgp_nodebug.js': [ './src/index.js' ]
|
||||
},
|
||||
options: {
|
||||
standalone: 'openpgp',
|
||||
external: [ 'crypto', 'node-localstorage' ]
|
||||
}
|
||||
},
|
||||
openpgp_sa: {
|
||||
openpgp: {
|
||||
files: {
|
||||
'dist/openpgp-sa.js': [ './src/index.js' ]
|
||||
'dist/openpgp.js': [ './src/index.js' ]
|
||||
},
|
||||
options: {
|
||||
debug: true,
|
||||
|
@ -69,22 +50,6 @@ module.exports = function(grunt) {
|
|||
from: /OpenPGP.js VERSION/g,
|
||||
to: 'OpenPGP.js v<%= pkg.version %>.<%= grunt.template.today("yyyymmdd") %>'
|
||||
}]
|
||||
},
|
||||
openpgp_sa: {
|
||||
src: ['dist/openpgp-sa.js'],
|
||||
dest: ['dist/openpgp-sa.js'],
|
||||
replacements: [{
|
||||
from: /OpenPGP.js VERSION/g,
|
||||
to: 'OpenPGP.js v<%= pkg.version %>.<%= grunt.template.today("yyyymmdd") %>'
|
||||
}]
|
||||
},
|
||||
openpgp_sa_nodebug: {
|
||||
src: ['dist/openpgp-sa_nodebug.js'],
|
||||
dest: ['dist/openpgp-sa_nodebug.js'],
|
||||
replacements: [{
|
||||
from: /OpenPGP.js VERSION/g,
|
||||
to: 'OpenPGP.js v<%= pkg.version %>.<%= grunt.template.today("yyyymmdd") %>'
|
||||
}]
|
||||
}
|
||||
},
|
||||
uglify: {
|
||||
|
@ -93,11 +58,6 @@ module.exports = function(grunt) {
|
|||
'dist/openpgp.min.js' : [ 'dist/openpgp_nodebug.js' ]
|
||||
}
|
||||
},
|
||||
openpgp_sa: {
|
||||
files: {
|
||||
'dist/openpgp-sa.min.js' : [ 'dist/openpgp-sa_nodebug.js' ]
|
||||
}
|
||||
},
|
||||
options: {
|
||||
banner: '/*! OpenPGPjs.org this is LGPL licensed code, see LICENSE/our website for more information.- v<%= pkg.version %> - ' +
|
||||
'<%= grunt.template.today("yyyy-mm-dd") %> */'
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
"engines": {
|
||||
"node": ">=0.8"
|
||||
},
|
||||
"main": "src/index.js",
|
||||
"main": "dist/openpgp.min.js",
|
||||
"directories": {
|
||||
"lib": "src"
|
||||
"lib": "dist"
|
||||
},
|
||||
"files": [
|
||||
"src",
|
||||
"test"
|
||||
"dist/openpgp.min.js",
|
||||
"test/unittests.html", "test/unittests.js", "test/general", "test/crypto"
|
||||
],
|
||||
"scripts": {
|
||||
"pretest": "grunt",
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<div id="mocha"></div>
|
||||
|
||||
<!--<script src="lib/jquery.min.js"></script>-->
|
||||
<script src="../dist/openpgp-sa.js"></script>
|
||||
<script src="../dist/openpgp.js"></script>
|
||||
<script src="lib/chai.js"></script>
|
||||
<script src="lib/mocha.js"></script>
|
||||
<script>
|
||||
|
|
Loading…
Reference in New Issue
Block a user