mirror of
https://github.com/embarklabs/embark.git
synced 2025-02-23 02:48:21 +00:00
feat: add repository.directory field to package.json
See: https://github.com/npm/rfcs/blob/latest/implemented/0010-monorepo-subdirectory-declaration.md Make changes by running this command in the root of the monorepo: ```shell npx lerna exec --concurrency 1 --stream -- \ 'DIRPATH=$(realpath $PWD --relative-to=$LERNA_ROOT_PATH); \ npx json -I -f package.json -e \ "this.repository=\ {\"directory\": \"$DIRPATH\", \ \"type\": \"git\", \ \"url\": \"https://github.com/embark-framework/embark.git\"}"' ``` Don't commit changes to private packages, with the exceptions of embark-typings and embark-reset because those may switch from private to public, and also because the latter will be included in `node_modules` of embark even if it is private since embark-reset is presently a bundled dependency of embark. Don't include the repository field in dapps generated from the template packages, except for the demo.
This commit is contained in:
parent
f12ca22edb
commit
a9c5e1ade5
@ -22,6 +22,11 @@
|
|||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"repository": {
|
||||||
|
"directory": "dapps/templates/boilerplate",
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/embark-framework/embark.git"
|
||||||
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"embark": "^4.0.0-beta.0",
|
"embark": "^4.0.0-beta.0",
|
||||||
"embark-reset": "^4.0.0-beta.0",
|
"embark-reset": "^4.0.0-beta.0",
|
||||||
|
@ -22,6 +22,11 @@
|
|||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"repository": {
|
||||||
|
"directory": "dapps/templates/demo",
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/embark-framework/embark.git"
|
||||||
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"embark": "^4.0.0-beta.0",
|
"embark": "^4.0.0-beta.0",
|
||||||
"embark-reset": "^4.0.0-beta.0",
|
"embark-reset": "^4.0.0-beta.0",
|
||||||
|
@ -21,6 +21,11 @@
|
|||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"repository": {
|
||||||
|
"directory": "dapps/templates/simple",
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/embark-framework/embark.git"
|
||||||
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"embark": "^4.0.0-beta.0",
|
"embark": "^4.0.0-beta.0",
|
||||||
"embark-reset": "^4.0.0-beta.0",
|
"embark-reset": "^4.0.0-beta.0",
|
||||||
|
@ -15,7 +15,11 @@
|
|||||||
"solidity"
|
"solidity"
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": "github:embark-framework/embark",
|
"repository": {
|
||||||
|
"directory": "packages/embark-async-wrapper",
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/embark-framework/embark.git"
|
||||||
|
},
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "cross-env BABEL_ENV=node babel src --extensions \".js,.ts\" --out-dir dist --root-mode upward --source-maps",
|
"build": "cross-env BABEL_ENV=node babel src --extensions \".js,.ts\" --out-dir dist --root-mode upward --source-maps",
|
||||||
|
@ -15,7 +15,11 @@
|
|||||||
"solidity"
|
"solidity"
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": "github:embark-framework/embark",
|
"repository": {
|
||||||
|
"directory": "packages/embark-compiler",
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/embark-framework/embark.git"
|
||||||
|
},
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "cross-env BABEL_ENV=node babel src --extensions \".js,.ts\" --out-dir dist --root-mode upward --source-maps",
|
"build": "cross-env BABEL_ENV=node babel src --extensions \".js,.ts\" --out-dir dist --root-mode upward --source-maps",
|
||||||
|
@ -18,7 +18,11 @@
|
|||||||
"dist"
|
"dist"
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": "github:embark-framework/embark",
|
"repository": {
|
||||||
|
"directory": "packages/embark-graph",
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/embark-framework/embark.git"
|
||||||
|
},
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "cross-env BABEL_ENV=node babel src --extensions \".js,.ts\" --out-dir dist --root-mode upward --source-maps",
|
"build": "cross-env BABEL_ENV=node babel src --extensions \".js,.ts\" --out-dir dist --root-mode upward --source-maps",
|
||||||
|
@ -7,7 +7,11 @@
|
|||||||
"description": "DApp reset utlity for embark",
|
"description": "DApp reset utlity for embark",
|
||||||
"homepage": "https://embark.status.im/",
|
"homepage": "https://embark.status.im/",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": "github:embark-framework/embark",
|
"repository": {
|
||||||
|
"directory": "packages/embark-reset",
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/embark-framework/embark.git"
|
||||||
|
},
|
||||||
"bin": "./bin.js",
|
"bin": "./bin.js",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -16,7 +16,11 @@
|
|||||||
"solidity"
|
"solidity"
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": "github:embark-framework/embark",
|
"repository": {
|
||||||
|
"directory": "packages/embark-typings",
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/embark-framework/embark.git"
|
||||||
|
},
|
||||||
"main": "",
|
"main": "",
|
||||||
"types": "index",
|
"types": "index",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -15,7 +15,11 @@
|
|||||||
"solidity"
|
"solidity"
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": "github:embark-framework/embark",
|
"repository": {
|
||||||
|
"directory": "packages/embark-ui",
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/embark-framework/embark.git"
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "node scripts/build.js",
|
"build": "node scripts/build.js",
|
||||||
"build-storybook": "build-storybook -s public",
|
"build-storybook": "build-storybook -s public",
|
||||||
|
@ -15,7 +15,11 @@
|
|||||||
"solidity"
|
"solidity"
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": "github:embark-framework/embark",
|
"repository": {
|
||||||
|
"directory": "packages/embark-vyper",
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/embark-framework/embark.git"
|
||||||
|
},
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "cross-env BABEL_ENV=node babel src --extensions \".js,.ts\" --out-dir dist --root-mode upward --source-maps",
|
"build": "cross-env BABEL_ENV=node babel src --extensions \".js,.ts\" --out-dir dist --root-mode upward --source-maps",
|
||||||
|
@ -15,7 +15,11 @@
|
|||||||
"solidity"
|
"solidity"
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": "github:embark-framework/embark",
|
"repository": {
|
||||||
|
"directory": "packages/embark",
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/embark-framework/embark.git"
|
||||||
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"embark": "./bin/embark"
|
"embark": "./bin/embark"
|
||||||
},
|
},
|
||||||
|
@ -160,11 +160,18 @@ class TemplateGenerator {
|
|||||||
utils.cd(templatePath);
|
utils.cd(templatePath);
|
||||||
|
|
||||||
const pkgJson = fs.readJSONSync('./package.json');
|
const pkgJson = fs.readJSONSync('./package.json');
|
||||||
pkgJson.name = name;
|
|
||||||
if (!(/demo/).test(name)) {
|
if (!(/demo/).test(name)) {
|
||||||
|
delete pkgJson.repository;
|
||||||
pkgJson.version = '0.0.1';
|
pkgJson.version = '0.0.1';
|
||||||
}
|
}
|
||||||
|
if (pkgJson.devDependencies) {
|
||||||
|
delete pkgJson.devDependencies['embark'];
|
||||||
|
delete pkgJson.devDependencies['embark-reset'];
|
||||||
|
delete pkgJson.devDependencies['npm-run-all'];
|
||||||
|
delete pkgJson.devDependencies['rimraf'];
|
||||||
|
}
|
||||||
delete pkgJson.files;
|
delete pkgJson.files;
|
||||||
|
pkgJson.name = name;
|
||||||
if (!pkgJson.scripts) pkgJson.scripts = {};
|
if (!pkgJson.scripts) pkgJson.scripts = {};
|
||||||
delete pkgJson.scripts.ci;
|
delete pkgJson.scripts.ci;
|
||||||
delete pkgJson.scripts.clean;
|
delete pkgJson.scripts.clean;
|
||||||
@ -172,12 +179,6 @@ class TemplateGenerator {
|
|||||||
delete pkgJson.scripts.qa;
|
delete pkgJson.scripts.qa;
|
||||||
delete pkgJson.scripts.reset;
|
delete pkgJson.scripts.reset;
|
||||||
pkgJson.scripts.test = 'embark test';
|
pkgJson.scripts.test = 'embark test';
|
||||||
if (pkgJson.devDependencies) {
|
|
||||||
delete pkgJson.devDependencies['embark'];
|
|
||||||
delete pkgJson.devDependencies['embark-reset'];
|
|
||||||
delete pkgJson.devDependencies['npm-run-all'];
|
|
||||||
delete pkgJson.devDependencies['rimraf'];
|
|
||||||
}
|
|
||||||
fs.writeFileSync('package.json', JSON.stringify(pkgJson, null, 2));
|
fs.writeFileSync('package.json', JSON.stringify(pkgJson, null, 2));
|
||||||
|
|
||||||
if (fs.existsSync('dot.gitignore')) {
|
if (fs.existsSync('dot.gitignore')) {
|
||||||
|
@ -13,7 +13,11 @@
|
|||||||
"smart-contract"
|
"smart-contract"
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": "github:embark-framework/embark",
|
"repository": {
|
||||||
|
"directory": "packages/embarkjs-connector-web3",
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/embark-framework/embark.git"
|
||||||
|
},
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"ci": "npm run qa",
|
"ci": "npm run qa",
|
||||||
|
@ -15,7 +15,11 @@
|
|||||||
"solidity"
|
"solidity"
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": "github:embark-framework/embark",
|
"repository": {
|
||||||
|
"directory": "packages/embarkjs",
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/embark-framework/embark.git"
|
||||||
|
},
|
||||||
"main": "dist/node/index.js",
|
"main": "dist/node/index.js",
|
||||||
"browser": {
|
"browser": {
|
||||||
"./dist/node/index.js": "./dist/browser/index.js"
|
"./dist/node/index.js": "./dist/browser/index.js"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user