diff --git a/packages/embark-blockchain-connector/.npmrc b/packages/embark-blockchain-connector/.npmrc new file mode 100644 index 000000000..e031d3432 --- /dev/null +++ b/packages/embark-blockchain-connector/.npmrc @@ -0,0 +1,4 @@ +engine-strict = true +package-lock = false +save-exact = true +scripts-prepend-node-path = true diff --git a/packages/embark-blockchain-connector/README.md b/packages/embark-blockchain-connector/README.md new file mode 100644 index 000000000..99dab6099 --- /dev/null +++ b/packages/embark-blockchain-connector/README.md @@ -0,0 +1,6 @@ +# `embark-blockchain-connecter` + +> Blockchain Connector module for Embark + +Visit [embark.status.im](https://embark.status.im/) to get started with +[Embark](https://github.com/embark-framework/embark). diff --git a/packages/embark-blockchain-connector/package.json b/packages/embark-blockchain-connector/package.json new file mode 100644 index 000000000..48264118f --- /dev/null +++ b/packages/embark-blockchain-connector/package.json @@ -0,0 +1,75 @@ +{ + "name": "embark-blockchain-connector", + "version": "4.1.0-beta.0", + "author": "Iuri Matias ", + "contributors": [], + "description": "Blockchain Connector for Embark", + "homepage": "https://github.com/embark-framework/embark/tree/master/packages/embark-blockchain-connector#readme", + "bugs": "https://github.com/embark-framework/embark/issues", + "keywords": [ + "blockchain", + "dapps", + "ethereum", + "ipfs", + "serverless", + "solc", + "solidity" + ], + "files": [ + "dist" + ], + "license": "MIT", + "repository": { + "directory": "packages/embark-blockchain-connector", + "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", + "// 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", + "embark-core": "^4.1.0-beta.0", + "embark-i18n": "^4.1.0-beta.0", + "embark-utils": "^4.1.0-beta.0", + "embarkjs": "^4.1.0-beta.0", + "ethereumjs-tx": "1.3.7", + "ethereumjs-util": "6.0.0", + "ganache-cli": "6.2.3", + "web3": "1.0.0-beta.37" + }, + "devDependencies": { + "@babel/cli": "7.2.3", + "@babel/core": "7.2.2", + "cross-env": "5.2.0", + "eslint": "5.7.0", + "npm-run-all": "4.1.5", + "rimraf": "2.6.3", + "tslint": "5.16.0", + "typescript": "3.4.5" + }, + "engines": { + "node": ">=8.12.0", + "npm": ">=6.4.1", + "yarn": ">=1.12.3" + } +} diff --git a/packages/embark/src/lib/modules/blockchain_connector/fundAccount.js b/packages/embark-blockchain-connector/src/fundAccount.js similarity index 100% rename from packages/embark/src/lib/modules/blockchain_connector/fundAccount.js rename to packages/embark-blockchain-connector/src/fundAccount.js diff --git a/packages/embark/src/lib/modules/blockchain_connector/index.js b/packages/embark-blockchain-connector/src/index.js similarity index 100% rename from packages/embark/src/lib/modules/blockchain_connector/index.js rename to packages/embark-blockchain-connector/src/index.js diff --git a/packages/embark/src/lib/modules/blockchain_connector/provider.js b/packages/embark-blockchain-connector/src/provider.js similarity index 100% rename from packages/embark/src/lib/modules/blockchain_connector/provider.js rename to packages/embark-blockchain-connector/src/provider.js diff --git a/packages/embark-blockchain-connector/tsconfig.json b/packages/embark-blockchain-connector/tsconfig.json new file mode 100644 index 000000000..52d43eaaa --- /dev/null +++ b/packages/embark-blockchain-connector/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../../tsconfig.json", + "include": ["src/**/*"] +} diff --git a/packages/embark-blockchain-connector/tslint.json b/packages/embark-blockchain-connector/tslint.json new file mode 100644 index 000000000..0946f2096 --- /dev/null +++ b/packages/embark-blockchain-connector/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "../../tslint.json" +} diff --git a/packages/embark/src/lib/core/engine.js b/packages/embark/src/lib/core/engine.js index 112932fb3..767493b43 100644 --- a/packages/embark/src/lib/core/engine.js +++ b/packages/embark/src/lib/core/engine.js @@ -305,7 +305,7 @@ class Engine { ipc: this.ipc }); - this.registerModule('blockchain_connector', { + this.registerModulePackage('embark-blockchain-connector', { isDev: this.isDev, locale: this.locale, plugins: this.plugins,