build(packaging): reorg sources for transpilation with Babel

Allow for embark sources to be authored in TypeScript and/or JavaScript, and to
make use of upcoming features of the JS language. Sources in the src/ directory
are transpiled into the dist/ directory, and npm-scripts are provided to
support and automate various aspect of the build process. Source map support is
enabled at runtime, i.e. when invoking the embark cli and running embark's test
suite.
This commit is contained in:
Michael Bradley, Jr 2018-11-11 15:08:55 -06:00
parent 317449e840
commit 69dd8c5b89
183 changed files with 1672 additions and 1488 deletions

View File

@ -201,7 +201,10 @@
"no-unmodified-loop-condition": "error", "no-unmodified-loop-condition": "error",
"no-unneeded-ternary": "error", "no-unneeded-ternary": "error",
"no-unused-expressions": "error", "no-unused-expressions": "error",
"no-unused-vars": ["error", { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_"}], "no-unused-vars": ["error", {
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}],
"no-use-before-define": "off", "no-use-before-define": "off",
"no-useless-call": "off", "no-useless-call": "off",
"no-useless-computed-key": "error", "no-useless-computed-key": "error",

View File

@ -3,9 +3,14 @@
.github .github
.travis.yml .travis.yml
.vscode .vscode
CODE_OF_CONDUCT.md
CONTRIBUTING.md CONTRIBUTING.md
appveyor.yml appveyor.yml
babel.config.js
dist/test
header.png header.png
logo.png logo.png
test src
test_apps test_apps
tsconfig.json
tslint.json

View File

@ -5,10 +5,6 @@ os:
node_js: node_js:
- "8" - "8"
- "10" - "10"
addons:
code_climate:
repo_token: 7454b1a666015e244c384d19f48c34e35d1ae58c3aa428ec542f10bbcb848358
before_install:
- npm i -g npm@latest
script: script:
- npm run build:node
- npm test - npm test

View File

@ -1,24 +1,16 @@
# Test against the latest version of this Node.js version
environment: environment:
matrix: matrix:
- nodejs_version: "8" - nodejs_version: "8"
- nodejs_version: "10" - nodejs_version: "10"
# Install scripts. (runs after repo cloning)
install: install:
# Get the latest stable version of Node.js or io.js # get the latest version of Node.js in a release series
- ps: Install-Product node $env:nodejs_version - ps: Install-Product node $env:nodejs_version
# install modules # output useful info for debugging
- npm install -g npm@latest
- npm install
# Post-install test scripts.
test_script:
# Output useful info for debugging.
- node --version - node --version
- npm --version - npm --version
# run tests # install modules
- npm install
test_script:
- npm run build:node
- npm test - npm test
# Don't actually build.
build: off build: off

48
babel.config.js Normal file
View File

@ -0,0 +1,48 @@
/* global module */
module.exports = function (api) {
const node = {
ignore: [
'src/lib/modules/pipeline/babel-loader-overrides.js',
'src/lib/modules/pipeline/webpack.config.js'
],
plugins: [
'babel-plugin-macros',
[
'@babel/plugin-proposal-decorators', {
legacy: true
}
],
'@babel/plugin-syntax-dynamic-import',
'babel-plugin-dynamic-import-node',
[
'@babel/plugin-proposal-class-properties', {
loose: true
}
],
'@babel/plugin-proposal-optional-chaining',
[
'@babel/plugin-transform-runtime', {
corejs: 2
}
]
],
presets: [
[
'@babel/preset-env', {
targets: {
node: '8.11.3'
}
}
],
'@babel/preset-typescript'
]
};
switch (api.env()) {
case 'node':
return node;
default:
throw new Error(`invalid babel env: ${api.env}`);
}
};

1014
bin/embark

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,6 @@
.env .env
.env.* .env.*
.eslintrc
config config
node_modules node_modules
public public

View File

@ -1,5 +0,0 @@
class Core {
}
module.exports = Core;

292
npm-shrinkwrap.json generated
View File

@ -4,6 +4,32 @@
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
"@babel/cli": {
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.1.2.tgz",
"integrity": "sha512-K3WDlpBPGpoW11SLKFEBhMsITomPovsrZ/wnM3y+WStbytukDXC0OBic3yQp+j058QUw0+R/jfx2obwp1fOzcA==",
"dev": true,
"requires": {
"chokidar": "^2.0.3",
"commander": "^2.8.1",
"convert-source-map": "^1.1.0",
"fs-readdir-recursive": "^1.1.0",
"glob": "^7.0.0",
"lodash": "^4.17.10",
"mkdirp": "^0.5.1",
"output-file-sync": "^2.0.0",
"slash": "^2.0.0",
"source-map": "^0.5.0"
},
"dependencies": {
"slash": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz",
"integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==",
"dev": true
}
}
},
"@babel/code-frame": { "@babel/code-frame": {
"version": "7.0.0", "version": "7.0.0",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz",
@ -282,6 +308,17 @@
"@babel/plugin-syntax-class-properties": "^7.0.0" "@babel/plugin-syntax-class-properties": "^7.0.0"
} }
}, },
"@babel/plugin-proposal-decorators": {
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.1.2.tgz",
"integrity": "sha512-YooynBO6PmBgHvAd0fl5e5Tq/a0pEC6RqF62ouafme8FzdIVH41Mz/u1dn8fFVm4jzEJ+g/MsOxouwybJPuP8Q==",
"requires": {
"@babel/helper-plugin-utils": "^7.0.0",
"@babel/helper-replace-supers": "^7.1.0",
"@babel/helper-split-export-declaration": "^7.0.0",
"@babel/plugin-syntax-decorators": "^7.1.0"
}
},
"@babel/plugin-proposal-json-strings": { "@babel/plugin-proposal-json-strings": {
"version": "7.0.0", "version": "7.0.0",
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.0.0.tgz", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.0.0.tgz",
@ -309,6 +346,16 @@
"@babel/plugin-syntax-optional-catch-binding": "^7.0.0" "@babel/plugin-syntax-optional-catch-binding": "^7.0.0"
} }
}, },
"@babel/plugin-proposal-optional-chaining": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.0.0.tgz",
"integrity": "sha512-7x8HLa71OzNiofbQUVakS0Kmg++6a+cXNfS7QKHbbv03SuSaumJyaWsfNgw+T7aqrJlqurYpZqrkPgXu0iZK0w==",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.0.0",
"@babel/plugin-syntax-optional-chaining": "^7.0.0"
}
},
"@babel/plugin-proposal-unicode-property-regex": { "@babel/plugin-proposal-unicode-property-regex": {
"version": "7.0.0", "version": "7.0.0",
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.0.0.tgz", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.0.0.tgz",
@ -335,6 +382,14 @@
"@babel/helper-plugin-utils": "^7.0.0" "@babel/helper-plugin-utils": "^7.0.0"
} }
}, },
"@babel/plugin-syntax-decorators": {
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.1.0.tgz",
"integrity": "sha512-uQvRSbgQ0nQg3jsmIixXXDCgSpkBolJ9X7NYThMKCcjvE8dN2uWJUzTUNNAeuKOjARTd+wUQV0ztXpgunZYKzQ==",
"requires": {
"@babel/helper-plugin-utils": "^7.0.0"
}
},
"@babel/plugin-syntax-dynamic-import": { "@babel/plugin-syntax-dynamic-import": {
"version": "7.0.0", "version": "7.0.0",
"resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.0.0.tgz", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.0.0.tgz",
@ -383,6 +438,15 @@
"@babel/helper-plugin-utils": "^7.0.0" "@babel/helper-plugin-utils": "^7.0.0"
} }
}, },
"@babel/plugin-syntax-optional-chaining": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.0.0.tgz",
"integrity": "sha512-QXedQsZf8yua1nNrXSePT0TsGSQH9A1iK08m9dhCMdZeJaaxYcQfXdgHWVV6Cp7WE/afPVvSKIsAHK5wP+yxDA==",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.0.0"
}
},
"@babel/plugin-syntax-typescript": { "@babel/plugin-syntax-typescript": {
"version": "7.0.0", "version": "7.0.0",
"resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.0.0.tgz", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.0.0.tgz",
@ -450,9 +514,9 @@
} }
}, },
"@babel/plugin-transform-destructuring": { "@babel/plugin-transform-destructuring": {
"version": "7.1.2", "version": "7.1.3",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.1.2.tgz", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.1.3.tgz",
"integrity": "sha512-cvToXvp/OsYxtEn57XJu9BvsGSEYjAh9UeUuXpoi7x6QHB7YdWyQ4lRU/q0Fu1IJNT0o0u4FQ1DMQBzJ8/8vZg==", "integrity": "sha512-Mb9M4DGIOspH1ExHOUnn2UUXFOyVTiX84fXCd+6B5iWrQg/QMeeRmSwpZ9lnjYLSXtZwiw80ytVMr3zue0ucYw==",
"requires": { "requires": {
"@babel/helper-plugin-utils": "^7.0.0" "@babel/helper-plugin-utils": "^7.0.0"
} }
@ -840,9 +904,9 @@
"integrity": "sha512-pD6JuijPmrfi84qF3/TzGQ7zi0QIX+d7ZdetD6jUA6cp+IsCzAquXZfi5viesew+pfpOTIdAVKuh1SHA7KeKzg==" "integrity": "sha512-pD6JuijPmrfi84qF3/TzGQ7zi0QIX+d7ZdetD6jUA6cp+IsCzAquXZfi5viesew+pfpOTIdAVKuh1SHA7KeKzg=="
}, },
"@types/node": { "@types/node": {
"version": "10.9.4", "version": "10.11.7",
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.9.4.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-10.11.7.tgz",
"integrity": "sha512-fCHV45gS+m3hH17zgkgADUSi2RR1Vht6wOZ0jyHP8rjiQra9f+mIcgwPQHllmDocYOstIEbKlxbFDYlgrTPYqw==" "integrity": "sha512-yOxFfkN9xUFLyvWaeYj90mlqTJ41CsQzWKS3gXdOMOyPVacUsymejKxJ4/pMW7exouubuEeZLJawGgcNGYlTeg=="
}, },
"@types/node-fetch": { "@types/node-fetch": {
"version": "1.6.9", "version": "1.6.9",
@ -1910,13 +1974,12 @@
} }
}, },
"babel-plugin-dynamic-import-node": { "babel-plugin-dynamic-import-node": {
"version": "1.1.0", "version": "2.2.0",
"resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-1.1.0.tgz", "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.2.0.tgz",
"integrity": "sha512-tTfZbM9Ecwj3GK50mnPrUpinTwA4xXmDiQGCk/aBYbvl1+X8YqldK86wZ1owVJ4u3mrKbRlXMma80J18qwiaTQ==", "integrity": "sha512-fP899ELUnTaBcIzmrW7nniyqqdYWrWuJUyPWHxFa/c7r7hS6KC8FscNfLlBNIoPSc55kYMGEEKjPjJGCLbE1qA==",
"dev": true,
"requires": { "requires": {
"babel-plugin-syntax-dynamic-import": "^6.18.0", "object.assign": "^4.1.0"
"babel-template": "^6.26.0",
"babel-types": "^6.26.0"
} }
}, },
"babel-plugin-istanbul": { "babel-plugin-istanbul": {
@ -2496,34 +2559,6 @@
"babel-types": "^6.24.1" "babel-types": "^6.24.1"
} }
}, },
"babel-plugin-webpack-aliases": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/babel-plugin-webpack-aliases/-/babel-plugin-webpack-aliases-1.1.3.tgz",
"integrity": "sha1-+7oor/c+SDc4949wRMGDrSF5toA=",
"requires": {
"babel-types": "^6.5.2",
"find-up": "1.1.2"
},
"dependencies": {
"find-up": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
"integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
"requires": {
"path-exists": "^2.0.0",
"pinkie-promise": "^2.0.0"
}
},
"path-exists": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
"integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
"requires": {
"pinkie-promise": "^2.0.0"
}
}
}
},
"babel-preset-env": { "babel-preset-env": {
"version": "1.6.1", "version": "1.6.1",
"resolved": "https://registry.npmjs.org/babel-preset-env/-/babel-preset-env-1.6.1.tgz", "resolved": "https://registry.npmjs.org/babel-preset-env/-/babel-preset-env-1.6.1.tgz",
@ -2659,6 +2694,18 @@
"babel-plugin-transform-runtime": "6.23.0", "babel-plugin-transform-runtime": "6.23.0",
"babel-preset-env": "1.6.1", "babel-preset-env": "1.6.1",
"babel-preset-react": "6.24.1" "babel-preset-react": "6.24.1"
},
"dependencies": {
"babel-plugin-dynamic-import-node": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-1.1.0.tgz",
"integrity": "sha512-tTfZbM9Ecwj3GK50mnPrUpinTwA4xXmDiQGCk/aBYbvl1+X8YqldK86wZ1owVJ4u3mrKbRlXMma80J18qwiaTQ==",
"requires": {
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-template": "^6.26.0",
"babel-types": "^6.26.0"
}
}
} }
}, },
"babel-preset-stage-0": { "babel-preset-stage-0": {
@ -7065,6 +7112,12 @@
} }
} }
}, },
"fs-readdir-recursive": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz",
"integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==",
"dev": true
},
"fs-write-stream-atomic": { "fs-write-stream-atomic": {
"version": "1.0.10", "version": "1.0.10",
"resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz",
@ -10839,7 +10892,8 @@
"pem-jwk": "^1.5.1", "pem-jwk": "^1.5.1",
"protons": "^1.0.1", "protons": "^1.0.1",
"rsa-pem-to-jwk": "^1.1.3", "rsa-pem-to-jwk": "^1.1.3",
"tweetnacl": "^1.0.0" "tweetnacl": "^1.0.0",
"webcrypto-shim": "github:dignifiedquire/webcrypto-shim#190bc9ec341375df6025b17ae12ddb2428ea49c8"
}, },
"dependencies": { "dependencies": {
"base-x": { "base-x": {
@ -10857,10 +10911,6 @@
"requires": { "requires": {
"base-x": "^3.0.2" "base-x": "^3.0.2"
} }
},
"webcrypto-shim": {
"version": "github:dignifiedquire/webcrypto-shim#190bc9ec341375df6025b17ae12ddb2428ea49c8",
"from": "github:dignifiedquire/webcrypto-shim#190bc9ec341375df6025b17ae12ddb2428ea49c8"
} }
} }
}, },
@ -12575,12 +12625,12 @@
}, },
"minimist": { "minimist": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
}, },
"node-notifier": { "node-notifier": {
"version": "4.6.1", "version": "4.6.1",
"resolved": "http://registry.npmjs.org/node-notifier/-/node-notifier-4.6.1.tgz", "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-4.6.1.tgz",
"integrity": "sha1-BW0UJE89zBzq3+aK+c/wxUc6M/M=", "integrity": "sha1-BW0UJE89zBzq3+aK+c/wxUc6M/M=",
"requires": { "requires": {
"cli-usage": "^0.1.1", "cli-usage": "^0.1.1",
@ -12973,6 +13023,17 @@
"os-tmpdir": "^1.0.0" "os-tmpdir": "^1.0.0"
} }
}, },
"output-file-sync": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-2.0.1.tgz",
"integrity": "sha512-mDho4qm7WgIXIGf4eYU1RHN2UU5tPfVYVSRwDJw0uTmj35DQUt/eNp19N7v6T3SrR0ESTEf2up2CGO73qI35zQ==",
"dev": true,
"requires": {
"graceful-fs": "^4.1.11",
"is-plain-obj": "^1.1.0",
"mkdirp": "^0.5.1"
}
},
"p-cancelable": { "p-cancelable": {
"version": "0.3.0", "version": "0.3.0",
"resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz",
@ -15701,6 +15762,7 @@
"resolved": "https://registry.npmjs.org/web3/-/web3-0.20.6.tgz", "resolved": "https://registry.npmjs.org/web3/-/web3-0.20.6.tgz",
"integrity": "sha1-PpcwauAk+yThCj11yIQwJWIhUSA=", "integrity": "sha1-PpcwauAk+yThCj11yIQwJWIhUSA=",
"requires": { "requires": {
"bignumber.js": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934",
"crypto-js": "^3.1.4", "crypto-js": "^3.1.4",
"utf8": "^2.1.1", "utf8": "^2.1.1",
"xhr2": "*", "xhr2": "*",
@ -15709,7 +15771,7 @@
"dependencies": { "dependencies": {
"bignumber.js": { "bignumber.js": {
"version": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934", "version": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934",
"from": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934" "from": "git+https://github.com/frozeman/bignumber.js-nolookahead.git"
} }
} }
} }
@ -15741,7 +15803,7 @@
"dependencies": { "dependencies": {
"acorn": { "acorn": {
"version": "3.3.0", "version": "3.3.0",
"resolved": "http://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz",
"integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=" "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo="
}, },
"ajv": { "ajv": {
@ -15760,7 +15822,7 @@
}, },
"ansi-escapes": { "ansi-escapes": {
"version": "1.4.0", "version": "1.4.0",
"resolved": "http://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz",
"integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=" "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4="
}, },
"ansi-styles": { "ansi-styles": {
@ -15770,7 +15832,7 @@
}, },
"chalk": { "chalk": {
"version": "1.1.3", "version": "1.1.3",
"resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"requires": { "requires": {
"ansi-styles": "^2.2.1", "ansi-styles": "^2.2.1",
@ -15807,7 +15869,7 @@
}, },
"eslint": { "eslint": {
"version": "2.10.2", "version": "2.10.2",
"resolved": "http://registry.npmjs.org/eslint/-/eslint-2.10.2.tgz", "resolved": "https://registry.npmjs.org/eslint/-/eslint-2.10.2.tgz",
"integrity": "sha1-sjCUgv7wQ9MgM2WjIShebM4Bw9c=", "integrity": "sha1-sjCUgv7wQ9MgM2WjIShebM4Bw9c=",
"requires": { "requires": {
"chalk": "^1.1.3", "chalk": "^1.1.3",
@ -15846,7 +15908,7 @@
}, },
"eslint-plugin-react": { "eslint-plugin-react": {
"version": "5.2.2", "version": "5.2.2",
"resolved": "http://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-5.2.2.tgz", "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-5.2.2.tgz",
"integrity": "sha1-fbBo4fVIf2hx5N7vNqOBwwPqwWE=", "integrity": "sha1-fbBo4fVIf2hx5N7vNqOBwwPqwWE=",
"requires": { "requires": {
"doctrine": "^1.2.2", "doctrine": "^1.2.2",
@ -15855,7 +15917,7 @@
}, },
"espree": { "espree": {
"version": "3.1.4", "version": "3.1.4",
"resolved": "http://registry.npmjs.org/espree/-/espree-3.1.4.tgz", "resolved": "https://registry.npmjs.org/espree/-/espree-3.1.4.tgz",
"integrity": "sha1-BybXrIOvl6fISY2ps2OjYJ0qaKE=", "integrity": "sha1-BybXrIOvl6fISY2ps2OjYJ0qaKE=",
"requires": { "requires": {
"acorn": "^3.1.0", "acorn": "^3.1.0",
@ -15901,7 +15963,7 @@
}, },
"inquirer": { "inquirer": {
"version": "0.12.0", "version": "0.12.0",
"resolved": "http://registry.npmjs.org/inquirer/-/inquirer-0.12.0.tgz", "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.12.0.tgz",
"integrity": "sha1-HvK/1jUE3wvHV4X/+MLEHfEvB34=", "integrity": "sha1-HvK/1jUE3wvHV4X/+MLEHfEvB34=",
"requires": { "requires": {
"ansi-escapes": "^1.1.0", "ansi-escapes": "^1.1.0",
@ -15926,7 +15988,7 @@
}, },
"onetime": { "onetime": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz",
"integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=" "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k="
}, },
"pluralize": { "pluralize": {
@ -15936,7 +15998,7 @@
}, },
"progress": { "progress": {
"version": "1.1.8", "version": "1.1.8",
"resolved": "http://registry.npmjs.org/progress/-/progress-1.1.8.tgz", "resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz",
"integrity": "sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74=" "integrity": "sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74="
}, },
"restore-cursor": { "restore-cursor": {
@ -15968,12 +16030,12 @@
}, },
"slice-ansi": { "slice-ansi": {
"version": "0.0.4", "version": "0.0.4",
"resolved": "http://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz",
"integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=" "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU="
}, },
"standard": { "standard": {
"version": "7.1.2", "version": "7.1.2",
"resolved": "http://registry.npmjs.org/standard/-/standard-7.1.2.tgz", "resolved": "https://registry.npmjs.org/standard/-/standard-7.1.2.tgz",
"integrity": "sha1-QBZu7sJAUGXRpPDj8VurxuJ0YH4=", "integrity": "sha1-QBZu7sJAUGXRpPDj8VurxuJ0YH4=",
"requires": { "requires": {
"eslint": "~2.10.2", "eslint": "~2.10.2",
@ -15997,7 +16059,7 @@
}, },
"table": { "table": {
"version": "3.8.3", "version": "3.8.3",
"resolved": "http://registry.npmjs.org/table/-/table-3.8.3.tgz", "resolved": "https://registry.npmjs.org/table/-/table-3.8.3.tgz",
"integrity": "sha1-K7xULw/amGGnVdOUf+/Ys/UThV8=", "integrity": "sha1-K7xULw/amGGnVdOUf+/Ys/UThV8=",
"requires": { "requires": {
"ajv": "^4.7.0", "ajv": "^4.7.0",
@ -16034,7 +16096,7 @@
}, },
"web3": { "web3": {
"version": "0.20.6", "version": "0.20.6",
"resolved": "http://registry.npmjs.org/web3/-/web3-0.20.6.tgz", "resolved": "https://registry.npmjs.org/web3/-/web3-0.20.6.tgz",
"integrity": "sha1-PpcwauAk+yThCj11yIQwJWIhUSA=", "integrity": "sha1-PpcwauAk+yThCj11yIQwJWIhUSA=",
"requires": { "requires": {
"bignumber.js": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934", "bignumber.js": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934",
@ -16743,14 +16805,6 @@
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz",
"integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU="
}, },
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"requires": {
"ms": "2.0.0"
}
},
"eth-lib": { "eth-lib": {
"version": "0.1.27", "version": "0.1.27",
"resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.27.tgz", "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.27.tgz",
@ -17003,17 +17057,28 @@
"integrity": "sha1-fecPG4Py3jZHZ3IVa+z+9uNRbrM=", "integrity": "sha1-fecPG4Py3jZHZ3IVa+z+9uNRbrM=",
"requires": { "requires": {
"underscore": "1.8.3", "underscore": "1.8.3",
"web3-core-helpers": "1.0.0-beta.34" "web3-core-helpers": "1.0.0-beta.34",
"websocket": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2"
}, },
"dependencies": { "dependencies": {
"websocket": { "websocket": {
"version": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2", "version": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2",
"from": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2", "from": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible",
"requires": { "requires": {
"debug": "^2.2.0", "debug": "^2.2.0",
"nan": "^2.3.3", "nan": "^2.3.3",
"typedarray-to-buffer": "^3.1.2", "typedarray-to-buffer": "^3.1.2",
"yaeti": "^0.0.6" "yaeti": "^0.0.6"
},
"dependencies": {
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"requires": {
"ms": "2.0.0"
}
}
} }
} }
} }
@ -17047,7 +17112,6 @@
"version": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2", "version": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2",
"from": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible", "from": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible",
"requires": { "requires": {
"debug": "^2.2.0",
"nan": "^2.3.3", "nan": "^2.3.3",
"typedarray-to-buffer": "^3.1.2", "typedarray-to-buffer": "^3.1.2",
"yaeti": "^0.0.6" "yaeti": "^0.0.6"
@ -19048,23 +19112,12 @@
"integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo="
}, },
"style-loader": { "style-loader": {
"version": "0.23.0", "version": "0.23.1",
"resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.23.0.tgz", "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.23.1.tgz",
"integrity": "sha512-uCcN7XWHkqwGVt7skpInW6IGO1tG6ReyFQ1Cseh0VcN6VdcFQi62aG/2F3Y9ueA8x4IVlfaSUxpmQXQD9QrEuQ==", "integrity": "sha512-XK+uv9kWwhZMZ1y7mysB+zoihsEj4wneFWAS5qoiLwzW0WzSqMrrsIy+a3zkQJq0ipFtBpX5W3MqyRIBF/WFGg==",
"requires": { "requires": {
"loader-utils": "^1.1.0", "loader-utils": "^1.1.0",
"schema-utils": "^0.4.5" "schema-utils": "^1.0.0"
},
"dependencies": {
"schema-utils": {
"version": "0.4.7",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz",
"integrity": "sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==",
"requires": {
"ajv": "^6.1.0",
"ajv-keywords": "^3.1.0"
}
}
} }
}, },
"subdir": { "subdir": {
@ -19950,6 +20003,35 @@
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==" "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
}, },
"tslint": {
"version": "5.11.0",
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.11.0.tgz",
"integrity": "sha1-mPMMAurjzecAYgHkwzywi0hYHu0=",
"dev": true,
"requires": {
"babel-code-frame": "^6.22.0",
"builtin-modules": "^1.1.1",
"chalk": "^2.3.0",
"commander": "^2.12.1",
"diff": "^3.2.0",
"glob": "^7.1.1",
"js-yaml": "^3.7.0",
"minimatch": "^3.0.4",
"resolve": "^1.3.2",
"semver": "^5.3.0",
"tslib": "^1.8.0",
"tsutils": "^2.27.2"
}
},
"tsutils": {
"version": "2.29.0",
"resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz",
"integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==",
"dev": true,
"requires": {
"tslib": "^1.8.1"
}
},
"tty-browserify": { "tty-browserify": {
"version": "0.0.0", "version": "0.0.0",
"resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz",
@ -20009,6 +20091,12 @@
"is-typedarray": "^1.0.0" "is-typedarray": "^1.0.0"
} }
}, },
"typescript": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.1.3.tgz",
"integrity": "sha512-+81MUSyX+BaSo+u2RbozuQk/UWx6hfG0a5gHu4ANEM4sU96XbuIyAB+rWBW1u70c6a5QuZfuYICn3s2UjuHUpA==",
"dev": true
},
"uglify-es": { "uglify-es": {
"version": "3.3.9", "version": "3.3.9",
"resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz",
@ -20369,9 +20457,9 @@
"integrity": "sha1-TTNA6AfTdzvamZH4MFrNzCpmXSo=" "integrity": "sha1-TTNA6AfTdzvamZH4MFrNzCpmXSo="
}, },
"url-loader": { "url-loader": {
"version": "1.1.1", "version": "1.1.2",
"resolved": "https://registry.npmjs.org/url-loader/-/url-loader-1.1.1.tgz", "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-1.1.2.tgz",
"integrity": "sha512-vugEeXjyYFBCUOpX+ZuaunbK3QXMKaQ3zUnRfIpRBlGkY7QizCnzyyn2ASfcxsvyU3ef+CJppVywnl3Kgf13Gg==", "integrity": "sha512-dXHkKmw8FhPqu8asTc1puBfe3TehOCo2+RmOOev5suNCIYBcT626kxiWg1NBVkwc4rO8BGa7gP70W7VXuqHrjg==",
"requires": { "requires": {
"loader-utils": "^1.1.0", "loader-utils": "^1.1.0",
"mime": "^2.0.3", "mime": "^2.0.3",
@ -20833,19 +20921,8 @@
"integrity": "sha1-fecPG4Py3jZHZ3IVa+z+9uNRbrM=", "integrity": "sha1-fecPG4Py3jZHZ3IVa+z+9uNRbrM=",
"requires": { "requires": {
"underscore": "1.8.3", "underscore": "1.8.3",
"web3-core-helpers": "1.0.0-beta.34" "web3-core-helpers": "1.0.0-beta.34",
}, "websocket": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2"
"dependencies": {
"websocket": {
"version": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2",
"from": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2",
"requires": {
"debug": "^2.2.0",
"nan": "^2.3.3",
"typedarray-to-buffer": "^3.1.2",
"yaeti": "^0.0.6"
}
}
} }
}, },
"web3-shh": { "web3-shh": {
@ -21189,7 +21266,8 @@
"integrity": "sha1-bUZ4Geoi3foba6FJjTHZVU4rBt0=", "integrity": "sha1-bUZ4Geoi3foba6FJjTHZVU4rBt0=",
"requires": { "requires": {
"underscore": "1.8.3", "underscore": "1.8.3",
"web3-core-helpers": "1.0.0-beta.27" "web3-core-helpers": "1.0.0-beta.27",
"websocket": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2"
}, },
"dependencies": { "dependencies": {
"debug": { "debug": {
@ -21207,7 +21285,7 @@
}, },
"websocket": { "websocket": {
"version": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2", "version": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2",
"from": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2", "from": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible",
"requires": { "requires": {
"debug": "^2.2.0", "debug": "^2.2.0",
"nan": "^2.3.3", "nan": "^2.3.3",
@ -21273,6 +21351,10 @@
} }
} }
}, },
"webcrypto-shim": {
"version": "github:dignifiedquire/webcrypto-shim#190bc9ec341375df6025b17ae12ddb2428ea49c8",
"from": "github:dignifiedquire/webcrypto-shim#master"
},
"webidl-conversions": { "webidl-conversions": {
"version": "4.0.2", "version": "4.0.2",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz",

View File

@ -22,25 +22,46 @@
"bin": { "bin": {
"embark": "./bin/embark" "embark": "./bin/embark"
}, },
"directories": { "main": "./dist/lib/index.js",
"lib": "./lib"
},
"main": "./lib/index.js",
"scripts": { "scripts": {
"lint": "eslint bin/embark lib/ embark-ui/src", "babel": "babel",
"prepack": "cd embark-ui && npm install && npm run build", "babel:node": "npm-run-all babel:node:*",
"babel:node:src": "cross-env BABEL_ENV=node babel src --copy-files --extensions \".js,.ts\" --out-dir dist --source-maps",
"babel:watch": "run-p babel:watch:*",
"babel:watch:src": "npm run babel:node:src -- --verbose --watch",
"build": "npm-run-all build:*",
"build:node": "npm run babel:node",
"build:ui": "cd embark-ui && npm run build",
"clean": "rimraf dist embark-*.tgz package embark-ui/build",
"eslint": "eslint",
"install:core": "npm install",
"install:ui": "cd embark-ui && npm install",
"install_all": "npm-run-all install:*",
"lint": "npm-run-all lint:*",
"lint:js": "eslint babel.config.js bin/embark embark-ui/src/ src/bin/ src/lib/",
"lint:ts": "tslint -c tslint.json 'src/**/*.ts'",
"prepublishOnly": "npm-run-all clean build test",
"test": "npm-run-all lint test:*", "test": "npm-run-all lint test:*",
"test:embark": "mocha test/ --no-timeouts --exit", "test:core": "mocha dist/test/ --exit --no-timeouts --require source-map-support/register",
"test:test_app": "cross-env DAPP=\"test_app\" npm run test_dapp", "test:test_app": "cross-env DAPP=\"test_app\" npm run test_dapp",
"test:contracts_app": "cross-env DAPP=\"contracts_app\" npm run test_dapp", "test:contracts_app": "cross-env DAPP=\"contracts_app\" npm run test_dapp",
"test_dapp": "cross-env-shell \"cd test_apps/$DAPP && npm install && npm test\"" "test_dapp": "cross-env-shell \"cd test_apps/$DAPP && npm install && npm test\"",
"start": "run-p start:*",
"start:babel": "npm run babel:watch",
"start:ui": "cd embark-ui && npm run start",
"start:type-check": "npm run type-check:watch",
"tsc": "tsc",
"tslint": "tslint",
"type-check": "tsc",
"type-check:watch": "npm run type-check -- --watch"
}, },
"dependencies": { "dependencies": {
"@babel/core": "7.1.2", "@babel/core": "7.1.2",
"@babel/plugin-proposal-class-properties": "7.1.0", "@babel/plugin-proposal-class-properties": "7.1.0",
"@babel/plugin-proposal-decorators": "7.1.2",
"@babel/plugin-proposal-object-rest-spread": "7.0.0", "@babel/plugin-proposal-object-rest-spread": "7.0.0",
"@babel/plugin-syntax-dynamic-import": "7.0.0", "@babel/plugin-syntax-dynamic-import": "7.0.0",
"@babel/plugin-transform-destructuring": "7.1.2", "@babel/plugin-transform-destructuring": "7.1.3",
"@babel/plugin-transform-flow-strip-types": "7.0.0", "@babel/plugin-transform-flow-strip-types": "7.0.0",
"@babel/plugin-transform-runtime": "7.1.0", "@babel/plugin-transform-runtime": "7.1.0",
"@babel/preset-env": "7.1.0", "@babel/preset-env": "7.1.0",
@ -53,7 +74,6 @@
"babel-plugin-macros": "2.4.2", "babel-plugin-macros": "2.4.2",
"babel-plugin-module-resolver": "3.1.1", "babel-plugin-module-resolver": "3.1.1",
"babel-plugin-transform-react-remove-prop-types": "0.4.18", "babel-plugin-transform-react-remove-prop-types": "0.4.18",
"babel-plugin-webpack-aliases": "1.1.3",
"bip39": "2.5.0", "bip39": "2.5.0",
"body-parser": "1.18.3", "body-parser": "1.18.3",
"check-dependencies": "1.1.0", "check-dependencies": "1.1.0",
@ -123,14 +143,15 @@
"shelljs": "0.5.3", "shelljs": "0.5.3",
"simples": "0.8.8", "simples": "0.8.8",
"solc": "0.4.25", "solc": "0.4.25",
"source-map-support": "0.5.9",
"string-replace-async": "1.2.1", "string-replace-async": "1.2.1",
"style-loader": "0.23.0", "style-loader": "0.23.1",
"subdir": "0.0.3", "subdir": "0.0.3",
"swarm-api": "0.1.2", "swarm-api": "0.1.2",
"tar": "3.2.1", "tar": "3.2.1",
"toposort": "1.0.7", "toposort": "1.0.7",
"underscore": "1.9.1", "underscore": "1.9.1",
"url-loader": "1.1.1", "url-loader": "1.1.2",
"uuid": "3.3.2", "uuid": "3.3.2",
"viz.js": "1.8.2", "viz.js": "1.8.2",
"web3": "1.0.0-beta.34", "web3": "1.0.0-beta.34",
@ -140,12 +161,19 @@
"window-size": "1.1.1" "window-size": "1.1.1"
}, },
"devDependencies": { "devDependencies": {
"@babel/cli": "7.1.2",
"@babel/plugin-proposal-optional-chaining": "7.0.0",
"@types/node": "10.11.7",
"babel-plugin-dynamic-import-node": "2.2.0",
"chai": "4.1.2", "chai": "4.1.2",
"cross-env": "5.2.0", "cross-env": "5.2.0",
"eslint": "5.7.0", "eslint": "5.7.0",
"mocha-sinon": "1.2.0", "mocha-sinon": "1.2.0",
"npm-run-all": "4.1.3", "npm-run-all": "4.1.3",
"sinon": "4.5.0" "rimraf": "2.6.2",
"sinon": "4.5.0",
"tslint": "5.11.0",
"typescript": "3.1.3"
}, },
"engines": { "engines": {
"node": ">=8.11.3", "node": ">=8.11.3",

1012
src/bin/embark.js Executable file

File diff suppressed because it is too large Load Diff

View File

@ -17,7 +17,7 @@ if (!process.env.DAPP_PATH) {
// set the anchor for embark's fs.embarkPath() // set the anchor for embark's fs.embarkPath()
if (!process.env.EMBARK_PATH) { if (!process.env.EMBARK_PATH) {
process.env.EMBARK_PATH = utils.joinPath(__dirname, '..'); process.env.EMBARK_PATH = utils.joinPath(__dirname, '../..');
} }
// set the anchor for embark's fs.pkgPath() // set the anchor for embark's fs.pkgPath()

View File

@ -4,7 +4,7 @@ const Logger = require('../lib/core/logger');
require('colors'); require('colors');
let version = require('../package.json').version; let version = require('../../package.json').version;
class EmbarkController { class EmbarkController {
@ -426,12 +426,12 @@ class EmbarkController {
ejectWebpack() { ejectWebpack() {
var fs = require('../lib/core/fs.js'); var fs = require('../lib/core/fs.js');
var embarkConfig = fs.embarkPath('lib/modules/pipeline/webpack.config.js'); var embarkConfig = fs.embarkPath('dist/lib/modules/pipeline/webpack.config.js');
var dappConfig = fs.dappPath('webpack.config.js'); var dappConfig = fs.dappPath('webpack.config.js');
fs.copyPreserve(embarkConfig, dappConfig); fs.copyPreserve(embarkConfig, dappConfig);
console.log(__('webpack config ejected to:').dim.yellow); console.log(__('webpack config ejected to:').dim.yellow);
console.log(`${dappConfig}`.green); console.log(`${dappConfig}`.green);
var embarkOverrides = fs.embarkPath('lib/modules/pipeline/babel-loader-overrides.js'); var embarkOverrides = fs.embarkPath('dist/lib/modules/pipeline/babel-loader-overrides.js');
var dappOverrides = fs.dappPath('babel-loader-overrides.js'); var dappOverrides = fs.dappPath('babel-loader-overrides.js');
fs.copyPreserve(embarkOverrides, dappOverrides); fs.copyPreserve(embarkOverrides, dappOverrides);
console.log(__('webpack overrides ejected to:').dim.yellow); console.log(__('webpack overrides ejected to:').dim.yellow);

3
src/lib/core/core.ts Normal file
View File

@ -0,0 +1,3 @@
export class Core {
}

View File

@ -138,7 +138,7 @@ class File {
content (callback) { content (callback) {
let content; let content;
if (this.type === File.types.embark_internal) { if (this.type === File.types.embark_internal) {
content = fs.readFileSync(fs.embarkPath(this.path)).toString(); content = fs.readFileSync(fs.embarkPath(utils.joinPath('dist', this.path))).toString();
} else if (this.type === File.types.dapp_file) { } else if (this.type === File.types.dapp_file) {
content = fs.readFileSync(this.path).toString(); content = fs.readFileSync(this.path).toString();
} else if (this.type === File.types.custom) { } else if (this.type === File.types.custom) {

View File

@ -17,7 +17,7 @@ if (!process.env.DAPP_PATH) {
// set the anchor for embark's fs.embarkPath() // set the anchor for embark's fs.embarkPath()
if (!process.env.EMBARK_PATH) { if (!process.env.EMBARK_PATH) {
process.env.EMBARK_PATH = utils.joinPath(__dirname, '..'); process.env.EMBARK_PATH = utils.joinPath(__dirname, '../../..');
} }
// set the anchor for embark's fs.pkgPath() // set the anchor for embark's fs.pkgPath()

View File

@ -10,7 +10,7 @@ i18n.configure({
register: global, register: global,
updateFiles: false, updateFiles: false,
syncFiles: false, syncFiles: false,
directory: path.join(__dirname, '../../../', 'locales') directory: path.join(__dirname, '../../../../', 'locales')
}); });
function isSupported(locale) { function isSupported(locale) {

View File

@ -52,7 +52,8 @@ Plugins.prototype.createPlugin = function(pluginName, pluginConfig) {
}; };
Plugins.prototype.loadInternalPlugin = function(pluginName, pluginConfig) { Plugins.prototype.loadInternalPlugin = function(pluginName, pluginConfig) {
var pluginPath = fs.embarkPath('lib/modules/' + pluginName); var pluginPath = fs.embarkPath('dist/lib/modules/' + pluginName);
var plugin; var plugin;
try { try {
plugin = require(pluginPath); plugin = require(pluginPath);

View File

@ -1,4 +1,4 @@
let version = require('../package.json').version; let version = require('../../package.json').version;
class Embark { class Embark {

View File

@ -300,7 +300,7 @@ class ENS {
// get namehash, import it into file // get namehash, import it into file
self.events.request("version:get:eth-ens-namehash", function(EnsNamehashVersion) { self.events.request("version:get:eth-ens-namehash", function(EnsNamehashVersion) {
let currentEnsNamehashVersion = require('../../../package.json').dependencies["eth-ens-namehash"]; let currentEnsNamehashVersion = require('../../../../package.json').dependencies["eth-ens-namehash"];
if (EnsNamehashVersion !== currentEnsNamehashVersion) { if (EnsNamehashVersion !== currentEnsNamehashVersion) {
self.events.request("version:getPackageLocation", "eth-ens-namehash", EnsNamehashVersion, function(err, location) { self.events.request("version:getPackageLocation", "eth-ens-namehash", EnsNamehashVersion, function(err, location) {
self.embark.registerImportFile("eth-ens-namehash", fs.dappPath(location)); self.embark.registerImportFile("eth-ens-namehash", fs.dappPath(location));

View File

@ -46,7 +46,7 @@ class IPFS {
const self = this; const self = this;
self.events.request("version:get:ipfs-api", function(ipfsApiVersion) { self.events.request("version:get:ipfs-api", function(ipfsApiVersion) {
let currentIpfsApiVersion = require('../../../package.json').dependencies["ipfs-api"]; let currentIpfsApiVersion = require('../../../../package.json').dependencies["ipfs-api"];
if (ipfsApiVersion !== currentIpfsApiVersion) { if (ipfsApiVersion !== currentIpfsApiVersion) {
self.events.request("version:getPackageLocation", "ipfs-api", ipfsApiVersion, function(err, location) { self.events.request("version:getPackageLocation", "ipfs-api", ipfsApiVersion, function(err, location) {
self.embark.registerImportFile("ipfs-api", fs.dappPath(location)); self.embark.registerImportFile("ipfs-api", fs.dappPath(location));

View File

@ -9,7 +9,7 @@ class WebpackConfigReader {
async readConfig(callback){ async readConfig(callback){
const dappConfigPath = fs.dappPath('webpack.config.js'); const dappConfigPath = fs.dappPath('webpack.config.js');
const defaultConfigPath = fs.embarkPath('lib/modules/pipeline', 'webpack.config.js'); const defaultConfigPath = fs.embarkPath('dist/lib/modules/pipeline', 'webpack.config.js');
let config, configPath; let config, configPath;
try { try {

Some files were not shown because too many files have changed in this diff Show More