mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-10 22:05:55 +00:00
refactor(@embark/communication): move module into own package (#1899)
This commit is contained in:
parent
f54fbf0b3d
commit
e282ae4974
@ -94,6 +94,7 @@
|
|||||||
"embark-api": "^4.1.1",
|
"embark-api": "^4.1.1",
|
||||||
"embark-authenticator": "^4.1.1",
|
"embark-authenticator": "^4.1.1",
|
||||||
"embark-code-runner": "^4.1.1",
|
"embark-code-runner": "^4.1.1",
|
||||||
|
"embark-communication": "^4.1.1",
|
||||||
"embark-compiler": "^4.1.1",
|
"embark-compiler": "^4.1.1",
|
||||||
"embark-console": "^4.1.1",
|
"embark-console": "^4.1.1",
|
||||||
"embark-contracts-manager": "^4.1.1",
|
"embark-contracts-manager": "^4.1.1",
|
||||||
|
@ -172,7 +172,7 @@ class Engine {
|
|||||||
this.registerModulePackage('embark-deployment', {plugins: this.plugins, onlyCompile: options.onlyCompile});
|
this.registerModulePackage('embark-deployment', {plugins: this.plugins, onlyCompile: options.onlyCompile});
|
||||||
this.registerModule('blockchain-client');
|
this.registerModule('blockchain-client');
|
||||||
this.registerModulePackage('embark-storage');
|
this.registerModulePackage('embark-storage');
|
||||||
this.registerModule('communication');
|
this.registerModulePackage('embark-communication');
|
||||||
this.registerModulePackage('embark-namesystem');
|
this.registerModulePackage('embark-namesystem');
|
||||||
this.registerModulePackage('embark-process-logs-api-manager');
|
this.registerModulePackage('embark-process-logs-api-manager');
|
||||||
this.registerModule('embark-embarkjs', {plugins: this.plugins});
|
this.registerModule('embark-embarkjs', {plugins: this.plugins});
|
||||||
|
7
packages/stack/communication/README.md
Normal file
7
packages/stack/communication/README.md
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# `embark-communication`
|
||||||
|
|
||||||
|
Communication APIs for Embark
|
||||||
|
|
||||||
|
Visit [embark.status.im](https://embark.status.im/) to get started with
|
||||||
|
[Embark](https://github.com/embark-framework/embark).
|
||||||
|
|
44
packages/stack/communication/babel.config.js
Normal file
44
packages/stack/communication/babel.config.js
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
const cloneDeep = require('lodash.clonedeep');
|
||||||
|
|
||||||
|
module.exports = api => {
|
||||||
|
const env = api.env();
|
||||||
|
|
||||||
|
const base = {
|
||||||
|
plugins: [
|
||||||
|
'@babel/plugin-proposal-class-properties',
|
||||||
|
[
|
||||||
|
'@babel/plugin-transform-runtime',
|
||||||
|
{
|
||||||
|
corejs: 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
],
|
||||||
|
presets: ['@babel/preset-env']
|
||||||
|
};
|
||||||
|
|
||||||
|
if (env === 'base' || env.startsWith('base:')) {
|
||||||
|
return base;
|
||||||
|
}
|
||||||
|
|
||||||
|
const node = cloneDeep(base);
|
||||||
|
node.presets[0] = [
|
||||||
|
node.presets[0],
|
||||||
|
{
|
||||||
|
targets: { node: '8.11.3' }
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
if (env === 'node' || env.startsWith('node:')) {
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
|
||||||
|
const test = cloneDeep(node);
|
||||||
|
|
||||||
|
if (env === 'test') {
|
||||||
|
return test;
|
||||||
|
}
|
||||||
|
|
||||||
|
return {};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
86
packages/stack/communication/package.json
Normal file
86
packages/stack/communication/package.json
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
{
|
||||||
|
"name": "embark-communication",
|
||||||
|
"version": "4.1.1",
|
||||||
|
"author": "Iuri Matias <iuri.matias@gmail.com>",
|
||||||
|
"contributors": [],
|
||||||
|
"description": "Communication APIs for Embark",
|
||||||
|
"homepage": "https://github.com/embark-framework/embark/tree/master/packages/stack/communication#readme",
|
||||||
|
"bugs": "https://github.com/embark-framework/embark/issues",
|
||||||
|
"keywords": [
|
||||||
|
"blockchain",
|
||||||
|
"dapps",
|
||||||
|
"ethereum",
|
||||||
|
"ipfs",
|
||||||
|
"serverless",
|
||||||
|
"solc",
|
||||||
|
"solidity"
|
||||||
|
],
|
||||||
|
"files": [
|
||||||
|
"dist"
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"repository": {
|
||||||
|
"directory": "packages/stack/communication",
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/embark-framework/embark.git"
|
||||||
|
},
|
||||||
|
"main": "./dist/index.js",
|
||||||
|
"scripts": {
|
||||||
|
"build": "cross-env BABEL_ENV=node babel src --extensions \".js\" --out-dir dist --root-mode upward --source-maps",
|
||||||
|
"ci": "npm run qa",
|
||||||
|
"clean": "npm run reset",
|
||||||
|
"lint": "npm-run-all lint:*",
|
||||||
|
"lint:js": "eslint src/",
|
||||||
|
"// lint:ts": "tslint -c tslint.json \"src/**/*.ts\"",
|
||||||
|
"package": "npm pack",
|
||||||
|
"// qa": "npm-run-all lint typecheck build package",
|
||||||
|
"qa": "npm-run-all lint build package",
|
||||||
|
"reset": "npx rimraf dist embark-*.tgz package",
|
||||||
|
"start": "npm run watch",
|
||||||
|
"test": "jest",
|
||||||
|
"// typecheck": "tsc",
|
||||||
|
"watch": "run-p watch:*",
|
||||||
|
"watch:build": "npm run build -- --verbose --watch",
|
||||||
|
"// watch:typecheck": "npm run typecheck -- --preserveWatchOutput --watch"
|
||||||
|
},
|
||||||
|
"eslintConfig": {
|
||||||
|
"extends": "../../../.eslintrc.json"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/runtime-corejs2": "7.3.1",
|
||||||
|
"async": "2.6.1",
|
||||||
|
"clone-deep": "4.0.0",
|
||||||
|
"embark-core": "^4.1.1",
|
||||||
|
"embark-i18n": "^4.1.1",
|
||||||
|
"embark-utils": "^4.1.1"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@babel/cli": "7.5.5",
|
||||||
|
"@babel/core": "7.5.5",
|
||||||
|
"@babel/plugin-proposal-class-properties": "7.5.5",
|
||||||
|
"@babel/plugin-transform-runtime": "7.5.5",
|
||||||
|
"@babel/preset-env": "7.5.5",
|
||||||
|
"babel-jest": "24.9.0",
|
||||||
|
"cross-env": "5.2.0",
|
||||||
|
"embark-testing": "^5.0.0",
|
||||||
|
"eslint": "5.7.0",
|
||||||
|
"jest": "24.9.0",
|
||||||
|
"npm-run-all": "4.1.5",
|
||||||
|
"rimraf": "3.0.0",
|
||||||
|
"tslint": "5.16.0",
|
||||||
|
"typescript": "3.4.5"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8.12.0 <12.0.0",
|
||||||
|
"npm": ">=6.4.1",
|
||||||
|
"yarn": ">=1.12.3"
|
||||||
|
},
|
||||||
|
"jest": {
|
||||||
|
"collectCoverage": true,
|
||||||
|
"testEnvironment": "node",
|
||||||
|
"testMatch": [
|
||||||
|
"**/test/**/*.js"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
5
packages/stack/communication/tsconfig.json
Normal file
5
packages/stack/communication/tsconfig.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"extends": "../../../tsconfig.json",
|
||||||
|
"include": ["src/**/*"]
|
||||||
|
}
|
||||||
|
|
4
packages/stack/communication/tslint.json
Normal file
4
packages/stack/communication/tslint.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"extends": "../../../tslint.json"
|
||||||
|
}
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user