Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WRQ-26798: Remove Lerna and refine run scripts #3248

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions docs/contributing/building-enact-locally.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -14,10 +15,8 @@ git clone [email protected]: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:
```

Expand Down
7 changes: 0 additions & 7 deletions lerna.json

This file was deleted.

33 changes: 19 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
4 changes: 2 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions packages/i18n/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/sampler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions packages/spotlight/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions packages/webos/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading