Skip to content

Commit

Permalink
Use lerna to simplify workflow
Browse files Browse the repository at this point in the history
Basically it's useful only to run script across multiple packages.
Used in CI configurations.
  • Loading branch information
danielkcz committed Nov 6, 2020
1 parent 5d5eb89 commit b3a993c
Show file tree
Hide file tree
Showing 8 changed files with 2,696 additions and 74 deletions.
10 changes: 2 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ jobs:
pkg-manager: yarn

- run: yarn lint

- run: yarn mobx build --target test
- run: yarn mobx-react build --target test
- run: yarn mobx-react-lite build --target test
- run: yarn lerna run build:test

- persist_to_workspace:
root: .
Expand All @@ -35,10 +32,7 @@ jobs:
at: .

- run: yarn test -i

- run: yarn mobx test:size
- run: yarn mobx-react test:size
- run: yarn mobx-react-lite test:size
- run: yarn lerna run test:size

mobx-test:
executor: node-executor
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Coveralls

on: ["push", "pull_request"]
on: ["pull_request"]

jobs:
mobx:
Expand All @@ -21,8 +21,8 @@ jobs:
- name: Install Dependencies
run: yarn --frozen-lockfile --ignore-scripts

- name: Build mobx
run: yarn mobx build --target test
- name: Build packages
run: yarn lerna run build:test

- name: Run Coverage
run: yarn coverage
Expand Down
4 changes: 4 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"packages": ["packages/*"],
"version": "independent"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"prepare": "yarn dedup && yarn --cwd website install",
"dedup": "npx yarn-deduplicate --strategy fewer yarn.lock"
},
"dependencies": {},
"devDependencies": {
"@changesets/changelog-github": "^0.2.7",
"@changesets/cli": "^2.11.0",
Expand All @@ -43,6 +42,7 @@
"iterall": "^1.3.0",
"jest": "^26.6.2",
"jest-mock-console": "^1.0.1",
"lerna": "^3.22.1",
"lint-staged": "^10.1.7",
"lodash": "^4.17.4",
"minimist": "^1.2.5",
Expand Down
1 change: 1 addition & 0 deletions packages/mobx-react-lite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"scripts": {
"lint": "eslint src/**/* --ext .js,.ts,.tsx",
"build": "node ../../scripts/build.js mobx-react-lite",
"build:test": "yarn build --target test",
"test": "jest",
"test:size": "yarn import-size --report . observer useLocalObservable",
"prepublish": "yarn build --target publish"
Expand Down
1 change: 1 addition & 0 deletions packages/mobx-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"scripts": {
"lint": "eslint src/**/* --ext .js,.ts,.tsx",
"build": "node ../../scripts/build.js mobx-react",
"build:test": "yarn build --target test",
"test": "jest",
"test:size": "yarn import-size --report . observer",
"prepublish": "yarn build --target publish"
Expand Down
1 change: 1 addition & 0 deletions packages/mobx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"test": "jest",
"lint": "eslint src/**/*",
"build": "node ../../scripts/build.js mobx",
"build:test": "yarn build --target test",
"perf": "scripts/perf.sh",
"test:performance": "yarn perf proxy && yarn perf legacy",
"test:mixed-versions": "yarn test --testRegex mixed-versions",
Expand Down
Loading

0 comments on commit b3a993c

Please sign in to comment.