diff --git a/.travis.yml b/.travis.yml index 976c7e5789..e4398c321f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,15 +15,13 @@ install: - npm link - popd - npm install - - npm run bootstrap - - npm run interlink script: - echo -e "\x1b\x5b35;1m*** Starting tests...\x1b\x5b0m" - npm test -- -- --runInBand --coverage - codecov - echo -e "\x1b\x5b35;1m*** Tests complete\x1b\x5b0m" - echo -e "\x1b\x5b35;1m*** Starting eslint...\x1b\x5b0m" - - npm run lerna -- run lint -- -- --report-unused-disable-directives --max-warnings 0 . + - npm run lint -- -- --report-unused-disable-directives --max-warnings 0 . - echo -e "\x1b\x5b35;1m*** eslint complete\x1b\x5b0m" - echo -e "\x1b\x5b35;1m*** Starting docs validation...\x1b\x5b0m" - npm run validate-docs diff --git a/docs/contributing/building-enact-locally.md b/docs/contributing/building-enact-locally.md index 02abc5bdba..0e229f84d7 100644 --- a/docs/contributing/building-enact-locally.md +++ b/docs/contributing/building-enact-locally.md @@ -3,7 +3,8 @@ title: Building Enact Locally --- The Enact CLI makes it very easy to consume Enact. However, if you want to contribute to the project, -you will need to be able to build Enact locally. Enact is structured as a [monorepo](https://danluu.com/monorepo/), using [Lerna](https://github.com/lerna/lerna) to manage dependencies. +you will need to be able to build Enact locally. Enact is structured as a [monorepo](https://danluu.com/monorepo/), +using [npm workspaces](https://docs.npmjs.com/cli/using-npm/workspaces) to manage dependencies. To get started, clone Enact from GitHub, install dependencies and connect the modules using Lerna: @@ -14,10 +15,8 @@ git clone git@github.com:enactjs/enact.git cd enact # we're using git flow so develop is our working branch git checkout develop -# install lerna +# install dependencies npm install -# run the lerna bootstrap command (proxied by an npm script) -npm run bootstrap # wait a while … installing :allthethings: ``` diff --git a/lerna.json b/lerna.json deleted file mode 100644 index 338450d0db..0000000000 --- a/lerna.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": "4.9.0-beta.1", - "packages": [ - "packages/*" - ], - "$schema": "node_modules/lerna/schemas/lerna-schema.json" -} diff --git a/package.json b/package.json index 2d60416516..78afa48aaa 100644 --- a/package.json +++ b/package.json @@ -4,27 +4,32 @@ "description": "Monorepo for all Enact front end libraries.", "private": true, "scripts": { - "lerna": "lerna", - "bootstrap": "lerna --concurrency 1 exec -- npm --loglevel error --no-package-lock install", - "bootstrap-link": "npm run link-all && npm run interlink", - "interlink": "lerna --concurrency 1 run interlink", - "link-all": "lerna --concurrency 1 exec -- npm --loglevel error --no-package-lock link", - "unlink-all": "lerna --concurrency 1 exec -- npm --loglevel error --no-package-lock unlink --global", - "publish": "lerna publish --skip-npm --skip-git", - "lint": "lerna --concurrency 1 run lint", - "test": "lerna --concurrency 1 run test", - "test-ss": "lerna --concurrency 1 run test-ss", - "test-ui": "lerna --concurrency 1 run test-ui", - "clean": "lerna clean", + "bootstrap": "npm install", + "bootstrap-link": "npm run link-all", + "interlink": "exit 0", + "link-all": "npm link --workspaces", + "unlink-all": "npm run unlink --workspaces --if-present", + "lint": "npm run lint --workspaces", + "test": "npm test --workspaces", + "test-ss": "npm run test-ss --workspaces --if-present", + "test-ui": "npm run test-ui --workspaces --if-present", + "clean": "npm run clean --workspaces --if-present; enact clean --all", "validate-docs": "validate-docs --strict --standalone --path packages" }, "license": "Apache-2.0", "eslintConfig": { "extends": "enact-proxy/strict" }, + "workspaces": [ + "packages/core", + "packages/i18n", + "packages/spotlight", + "packages/ui", + "packages/webos", + "packages/sampler" + ], "devDependencies": { "@enact/docs-utils": "^0.4.8", - "eslint-config-enact-proxy": "^1.0.7", - "lerna": "^8.1.2" + "eslint-config-enact-proxy": "^1.0.7" } } \ No newline at end of file diff --git a/packages/core/package.json b/packages/core/package.json index 118076f241..bab34a3eab 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -10,8 +10,8 @@ "homepage": "https://enactjs.com", "main": "index.js", "scripts": { - "clean": "enact clean", - "interlink": "echo \"No interlink\" && exit 0", + "clean": "enact clean --all", + "unlink": "npm uninstall --global", "lint": "enact lint --strict", "test": "enact test", "test-json": "enact test --json", diff --git a/packages/i18n/package.json b/packages/i18n/package.json index ed9675861d..79e0c5fbef 100644 --- a/packages/i18n/package.json +++ b/packages/i18n/package.json @@ -10,8 +10,8 @@ }, "homepage": "https://enactjs.com", "scripts": { - "clean": "enact clean", - "interlink": "npm link ../core", + "clean": "enact clean --all", + "unlink": "npm uninstall --global", "lint": "enact lint --strict", "test": "enact test", "test-json": "enact test --json", diff --git a/packages/sampler/package.json b/packages/sampler/package.json index 8fbe642afa..c0dde78c9e 100644 --- a/packages/sampler/package.json +++ b/packages/sampler/package.json @@ -5,7 +5,7 @@ "private": true, "main": "index.js", "scripts": { - "interlink": "npm link ../core ../i18n ../spotlight ../ui ../webos", + "clean": "enact clean --all", "lint": "enact lint --strict", "test": "echo \"No test suite\" && exit 0", "pack": "build-storybook -c .storybook -o dist", diff --git a/packages/spotlight/package.json b/packages/spotlight/package.json index 2ecab0f0ae..d7f1a911a2 100644 --- a/packages/spotlight/package.json +++ b/packages/spotlight/package.json @@ -10,8 +10,8 @@ "homepage": "https://enactjs.com", "main": "src/spotlight.js", "scripts": { - "clean": "enact clean", - "interlink": "npm link ../core", + "clean": "enact clean --all", + "unlink": "npm uninstall --global", "lint": "enact lint --strict", "test": "enact test", "test-json": "enact test --json", diff --git a/packages/ui/package.json b/packages/ui/package.json index 709a098291..17d43c2478 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -10,8 +10,8 @@ "homepage": "https://enactjs.com", "main": "index.js", "scripts": { - "clean": "enact clean", - "interlink": "npm link ../core", + "clean": "enact clean --all", + "unlink": "npm uninstall --global", "lint": "enact lint --strict", "test": "enact test", "test-json": "enact test --json", diff --git a/packages/webos/package.json b/packages/webos/package.json index d8dea91b57..aea93e721d 100644 --- a/packages/webos/package.json +++ b/packages/webos/package.json @@ -10,8 +10,8 @@ "homepage": "https://enactjs.com", "main": "index.js", "scripts": { - "clean": "enact clean", - "interlink": "npm link ../core", + "clean": "enact clean --all", + "unlink": "npm uninstall --global", "lint": "enact lint --strict", "test": "enact test", "test-json": "enact test --json",