Merge pull request #3 from embark-framework/features/fix-umd-for-node
Features/fix umd for node
This commit is contained in:
commit
a9e4f79ad6
8
.babelrc
8
.babelrc
|
@ -1,9 +1,11 @@
|
|||
{
|
||||
"comments": false,
|
||||
"compact": false,
|
||||
"presets": [
|
||||
["@babel/env", {"targets": {"node": "8.11.3"}}]
|
||||
],
|
||||
"ignore": ["src/browser.js"],
|
||||
"plugins": [
|
||||
"@babel/plugin-transform-runtime"
|
||||
],
|
||||
"presets": [
|
||||
["@babel/env", {"targets": {"node": "8.11.3"}}]
|
||||
]
|
||||
}
|
||||
|
|
|
@ -8,6 +8,6 @@ package
|
|||
|
||||
embark.min.js
|
||||
embarkjs-*.tgz
|
||||
TODO
|
||||
NOTES
|
||||
npm-debug.log
|
||||
TODO
|
||||
|
|
|
@ -10,12 +10,11 @@
|
|||
"src"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "npm run clean && npm run build-babel && npm run build-webpack",
|
||||
"build-babel": "babel --ignore 'src/browser.js' --out-dir dist src",
|
||||
"build-webpack": "npm run webpack",
|
||||
"babel": "babel --out-dir dist src",
|
||||
"build": "npm run clean && npm run babel && npm run webpack",
|
||||
"clean": "rimraf dist embark.min.js embarkjs-*.tgz package",
|
||||
"http-server": "http-server",
|
||||
"prepare": "npm run build",
|
||||
"server": "http-server",
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"webpack": "webpack"
|
||||
},
|
||||
|
|
|
@ -388,7 +388,7 @@ EmbarkJS.Names.register = function(name, options) {
|
|||
throw new Error('Name system provider not set; e.g EmbarkJS.Names.setProvider("ens")');
|
||||
}
|
||||
return this.currentNameSystems.register(name, options);
|
||||
}
|
||||
};
|
||||
|
||||
EmbarkJS.Utils = {
|
||||
fromAscii: function (str) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const path = require('path');
|
||||
|
||||
const browser = {
|
||||
const standalone = {
|
||||
entry: path.resolve(__dirname, 'src') + '/browser.js',
|
||||
mode: 'production',
|
||||
module: {
|
||||
|
@ -25,6 +25,7 @@ const browser = {
|
|||
// },
|
||||
output: {
|
||||
filename: 'embark.min.js',
|
||||
globalObject: 'typeof self !== \'undefined\' ? self : this',
|
||||
library: 'EmbarkJS',
|
||||
libraryTarget: 'umd',
|
||||
libraryExport: 'default',
|
||||
|
@ -35,5 +36,5 @@ const browser = {
|
|||
};
|
||||
|
||||
module.exports = [
|
||||
browser
|
||||
standalone
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue