Make standalone the default and use openpgp.min.js in node package

This commit is contained in:
Robert Nelson 2014-01-09 17:02:42 -08:00
parent ec061ba101
commit bd963aabf0
3 changed files with 8 additions and 48 deletions

View File

@ -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") %> */'

View File

@ -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",

View File

@ -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>