Skip to content

Commit

Permalink
feat(yarn3): Using workspaces for local tools
Browse files Browse the repository at this point in the history
Improving the overall build ergonomics
- introduced a tools workspaces
- imported it in all needed packages/examples
- inclusive project root
  • Loading branch information
ja0nz committed Nov 17, 2021
1 parent 51bf3ae commit bf7a404
Show file tree
Hide file tree
Showing 172 changed files with 1,138 additions and 1,579 deletions.
5 changes: 3 additions & 2 deletions examples/commit-heatmap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"type": "module",
"scripts": {
"clean": "rimraf .cache build out",
"build": "../../scripts/node-esm src/index.ts"
"build": "tools:node-esm src/index.ts"
},
"dependencies": {
"@thi.ng/associative": "workspace:^",
Expand Down Expand Up @@ -40,6 +40,7 @@
"util": false
},
"devDependencies": {
"rimraf": "^3.0.2"
"rimraf": "^3.0.2",
"tools": "workspace:^"
}
}
5 changes: 2 additions & 3 deletions examples/package-stats/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@
"type": "module",
"scripts": {
"clean": "rimraf '*.js' '*.svg' lib",
"build": "yarn clean && ../../scripts/node-esm src/index.ts"
"build": "yarn clean && tools:node-esm src/index.ts"
},
"devDependencies": {
"@types/node": "^16.11.7",
"@types/rimraf": "^3",
"rimraf": "^3.0.2",
"ts-node": "^10.0.0",
"tools": "workspace:^",
"typescript": "4.2.4"
},
"dependencies": {
Expand Down
5 changes: 2 additions & 3 deletions examples/pointfree-svg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"type": "module",
"scripts": {
"clean": "rimraf '*.js'",
"build": "yarn clean && ../../scripts/node-esm src/index.ts"
"build": "yarn clean && tools:node-esm src/index.ts"
},
"dependencies": {
"@thi.ng/hiccup": "workspace:^",
Expand All @@ -18,10 +18,9 @@
"@thi.ng/pointfree-lang": "workspace:^"
},
"devDependencies": {
"@types/node": "^16.11.7",
"@types/rimraf": "^3",
"rimraf": "^3.0.2",
"ts-node": "^10.0.0",
"tools": "workspace:^",
"typescript": "4.2.4"
},
"thi.ng": {
Expand Down
18 changes: 10 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"type": "module",
"workspaces": [
"packages/*",
"examples/*"
"examples/*",
"tools"
],
"devDependencies": {
"@microsoft/api-documenter": "^7.13.68",
Expand All @@ -17,6 +18,7 @@
"html-minifier-terser": "^6.0.2",
"rimraf": "^3.0.2",
"snowpack": "^3.8.8",
"tools": "workspace:^",
"ts-node": "^10.4.0",
"typedoc": "^0.22.8",
"typescript": "4.4.4"
Expand All @@ -32,16 +34,16 @@
"doc:ae": "yarn @thi.ng run doc:ae && scripts/collect-apis",
"doc:readme": "yarn @thi.ng run doc:readme",
"doc:stats": "yarn @thi.ng run doc:stats",
"doc:examples": "scripts/node-esm tools/src/readme-examples.ts",
"doc:examples": "tools:node-esm tools/src/readme-examples.ts",
"examples": "scripts/build-examples",
"pub": "yarn @thi.ng npm publish --tolerate-republish && yarn doc && scripts/node-esm tools/src/deploy-docs.ts",
"pub": "yarn @thi.ng npm publish --tolerate-republish && yarn doc && tools:node-esm tools/src/deploy-docs.ts",
"test": "yarn build && yarn test:only",
"test:only": "yarn @thi.ng run test",
"tool:deps": "scripts/node-esm tools/src/adjacency.ts",
"tool:exports": "scripts/node-esm tools/src/check-exports.ts",
"tool:imports": "scripts/node-esm tools/src/check-imports.ts",
"tool:prune": "scripts/node-esm tools/src/prune-changelogs.ts",
"tool:searchindex": "scripts/node-esm tools/src/build-search-index.ts"
"tool:deps": "tools:node-esm tools/src/adjacency.ts",
"tool:exports": "tools:node-esm tools/src/check-exports.ts",
"tool:imports": "tools:node-esm tools/src/check-imports.ts",
"tool:prune": "tools:node-esm tools/src/prune-changelogs.ts",
"tool:searchindex": "tools:node-esm tools/src/build-search-index.ts"
},
"packageManager": "[email protected]"
}
5 changes: 3 additions & 2 deletions packages/adapt-dpi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,16 @@
"clean": "rimraf '*.js' '*.d.ts' '*.map' doc",
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
"doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
"doc:readme": "yarn doc:stats && ../../scripts/node-esm ../../tools/src/readme.ts",
"doc:stats": "../../scripts/node-esm ../../tools/src/module-stats.ts",
"doc:readme": "yarn doc:stats && tools:readme",
"doc:stats": "tools:module-stats",
"pub": "yarn build && yarn npm publish --access public",
"test": "NODE_OPTIONS='--no-warnings --loader ts-node/esm' testament test"
},
"devDependencies": {
"@microsoft/api-extractor": "^7.18.19",
"@thi.ng/testament": "^0.1.6",
"rimraf": "^3.0.2",
"tools": "workspace:^",
"typedoc": "^0.22.8",
"typescript": "^4.4.4"
},
Expand Down
5 changes: 3 additions & 2 deletions packages/adjacency/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"clean": "rimraf '*.js' '*.d.ts' '*.map' doc",
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
"doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
"doc:readme": "yarn doc:stats && ../../scripts/node-esm ../../tools/src/readme.ts",
"doc:stats": "../../scripts/node-esm ../../tools/src/module-stats.ts",
"doc:readme": "yarn doc:stats && tools:readme",
"doc:stats": "tools:module-stats",
"pub": "yarn build && yarn npm publish --access public",
"test": "NODE_OPTIONS='--no-warnings --loader ts-node/esm' testament test"
},
Expand All @@ -46,6 +46,7 @@
"@thi.ng/testament": "^0.1.6",
"@thi.ng/vectors": "^7.1.1",
"rimraf": "^3.0.2",
"tools": "workspace:^",
"typedoc": "^0.22.8",
"typescript": "^4.4.4"
},
Expand Down
5 changes: 3 additions & 2 deletions packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,16 @@
"clean": "rimraf '*.js' '*.d.ts' '*.map' doc api decorators mixins",
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
"doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
"doc:readme": "yarn doc:stats && ../../scripts/node-esm ../../tools/src/readme.ts",
"doc:stats": "../../scripts/node-esm ../../tools/src/module-stats.ts",
"doc:readme": "yarn doc:stats && tools:readme",
"doc:stats": "tools:module-stats",
"pub": "yarn build && yarn npm publish --access public",
"test": "NODE_OPTIONS='--no-warnings --loader ts-node/esm' testament test"
},
"devDependencies": {
"@microsoft/api-extractor": "^7.18.19",
"@thi.ng/testament": "^0.1.6",
"rimraf": "^3.0.2",
"tools": "workspace:^",
"typedoc": "^0.22.8",
"typescript": "^4.4.4"
},
Expand Down
5 changes: 3 additions & 2 deletions packages/args/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"clean": "rimraf '*.js' '*.d.ts' '*.map' doc",
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
"doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
"doc:readme": "yarn doc:stats && ../../scripts/node-esm ../../tools/src/readme.ts",
"doc:stats": "../../scripts/node-esm ../../tools/src/module-stats.ts",
"doc:readme": "yarn doc:stats && tools:readme",
"doc:stats": "tools:module-stats",
"pub": "yarn build && yarn npm publish --access public",
"test": "NODE_OPTIONS='--no-warnings --loader ts-node/esm' testament test"
},
Expand All @@ -43,6 +43,7 @@
"@microsoft/api-extractor": "^7.18.19",
"@thi.ng/testament": "^0.1.6",
"rimraf": "^3.0.2",
"tools": "workspace:^",
"typedoc": "^0.22.8",
"typescript": "^4.4.4"
},
Expand Down
5 changes: 3 additions & 2 deletions packages/arrays/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"clean": "rimraf '*.js' '*.d.ts' '*.map' doc",
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
"doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
"doc:readme": "yarn doc:stats && ../../scripts/node-esm ../../tools/src/readme.ts",
"doc:stats": "../../scripts/node-esm ../../tools/src/module-stats.ts",
"doc:readme": "yarn doc:stats && tools:readme",
"doc:stats": "tools:module-stats",
"pub": "yarn build && yarn npm publish --access public",
"test": "NODE_OPTIONS='--no-warnings --loader ts-node/esm' testament test"
},
Expand All @@ -45,6 +45,7 @@
"@microsoft/api-extractor": "^7.18.19",
"@thi.ng/testament": "^0.1.6",
"rimraf": "^3.0.2",
"tools": "workspace:^",
"typedoc": "^0.22.8",
"typescript": "^4.4.4"
},
Expand Down
5 changes: 3 additions & 2 deletions packages/associative/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"clean": "rimraf '*.js' '*.d.ts' '*.map' doc internal",
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
"doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
"doc:readme": "yarn doc:stats && ../../scripts/node-esm ../../tools/src/readme.ts",
"doc:stats": "../../scripts/node-esm ../../tools/src/module-stats.ts",
"doc:readme": "yarn doc:stats && tools:readme",
"doc:stats": "tools:module-stats",
"pub": "yarn build && yarn npm publish --access public",
"test": "NODE_OPTIONS='--no-warnings --loader ts-node/esm' testament test"
},
Expand All @@ -49,6 +49,7 @@
"@microsoft/api-extractor": "^7.18.19",
"@thi.ng/testament": "^0.1.6",
"rimraf": "^3.0.2",
"tools": "workspace:^",
"typedoc": "^0.22.8",
"typescript": "^4.4.4"
},
Expand Down
5 changes: 3 additions & 2 deletions packages/atom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"clean": "rimraf '*.js' '*.d.ts' '*.map' doc",
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
"doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
"doc:readme": "yarn doc:stats && ../../scripts/node-esm ../../tools/src/readme.ts",
"doc:stats": "../../scripts/node-esm ../../tools/src/module-stats.ts",
"doc:readme": "yarn doc:stats && tools:readme",
"doc:stats": "tools:module-stats",
"pub": "yarn build && yarn npm publish --access public",
"test": "NODE_OPTIONS='--no-warnings --loader ts-node/esm' testament test"
},
Expand All @@ -44,6 +44,7 @@
"@microsoft/api-extractor": "^7.18.19",
"@thi.ng/testament": "^0.1.6",
"rimraf": "^3.0.2",
"tools": "workspace:^",
"typedoc": "^0.22.8",
"typescript": "^4.4.4"
},
Expand Down
5 changes: 3 additions & 2 deletions packages/base-n/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"clean": "rimraf '*.js' '*.d.ts' '*.map' doc",
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
"doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
"doc:readme": "yarn doc:stats && ../../scripts/node-esm ../../tools/src/readme.ts",
"doc:stats": "../../scripts/node-esm ../../tools/src/module-stats.ts",
"doc:readme": "yarn doc:stats && tools:readme",
"doc:stats": "tools:module-stats",
"pub": "yarn build && yarn npm publish --access public",
"test": "NODE_OPTIONS='--no-warnings --loader ts-node/esm' testament test"
},
Expand All @@ -40,6 +40,7 @@
"@microsoft/api-extractor": "^7.18.19",
"@thi.ng/testament": "^0.1.6",
"rimraf": "^3.0.2",
"tools": "workspace:^",
"typedoc": "^0.22.8",
"typescript": "^4.4.4"
},
Expand Down
5 changes: 3 additions & 2 deletions packages/bench/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"clean": "rimraf '*.js' '*.d.ts' '*.map' doc",
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
"doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
"doc:readme": "yarn doc:stats && ../../scripts/node-esm ../../tools/src/readme.ts",
"doc:stats": "../../scripts/node-esm ../../tools/src/module-stats.ts",
"doc:readme": "yarn doc:stats && tools:readme",
"doc:stats": "tools:module-stats",
"pub": "yarn build && yarn npm publish --access public",
"test": "NODE_OPTIONS='--no-warnings --loader ts-node/esm' testament test"
},
Expand All @@ -41,6 +41,7 @@
"@thi.ng/testament": "^0.1.6",
"@types/node": "^16.11.7",
"rimraf": "^3.0.2",
"tools": "workspace:^",
"typedoc": "^0.22.8",
"typescript": "^4.4.4"
},
Expand Down
5 changes: 3 additions & 2 deletions packages/bencode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"clean": "rimraf '*.js' '*.d.ts' '*.map' doc",
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
"doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
"doc:readme": "yarn doc:stats && ../../scripts/node-esm ../../tools/src/readme.ts",
"doc:stats": "../../scripts/node-esm ../../tools/src/module-stats.ts",
"doc:readme": "yarn doc:stats && tools:readme",
"doc:stats": "tools:module-stats",
"pub": "yarn build && yarn npm publish --access public",
"test": "NODE_OPTIONS='--no-warnings --loader ts-node/esm' testament test"
},
Expand All @@ -45,6 +45,7 @@
"@microsoft/api-extractor": "^7.18.19",
"@thi.ng/testament": "^0.1.6",
"rimraf": "^3.0.2",
"tools": "workspace:^",
"typedoc": "^0.22.8",
"typescript": "^4.4.4"
},
Expand Down
5 changes: 3 additions & 2 deletions packages/binary/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"clean": "rimraf '*.js' '*.d.ts' '*.map' doc",
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
"doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
"doc:readme": "yarn doc:stats && ../../scripts/node-esm ../../tools/src/readme.ts",
"doc:stats": "../../scripts/node-esm ../../tools/src/module-stats.ts",
"doc:readme": "yarn doc:stats && tools:readme",
"doc:stats": "tools:module-stats",
"pub": "yarn build && yarn npm publish --access public",
"test": "NODE_OPTIONS='--no-warnings --loader ts-node/esm' testament test"
},
Expand All @@ -40,6 +40,7 @@
"@microsoft/api-extractor": "^7.18.19",
"@thi.ng/testament": "^0.1.6",
"rimraf": "^3.0.2",
"tools": "workspace:^",
"typedoc": "^0.22.8",
"typescript": "^4.4.4"
},
Expand Down
5 changes: 3 additions & 2 deletions packages/bitfield/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"clean": "rimraf '*.js' '*.d.ts' '*.map' doc",
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
"doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
"doc:readme": "yarn doc:stats && ../../scripts/node-esm ../../tools/src/readme.ts",
"doc:stats": "../../scripts/node-esm ../../tools/src/module-stats.ts",
"doc:readme": "yarn doc:stats && tools:readme",
"doc:stats": "tools:module-stats",
"pub": "yarn build && yarn npm publish --access public",
"test": "NODE_OPTIONS='--no-warnings --loader ts-node/esm' testament test"
},
Expand All @@ -43,6 +43,7 @@
"@microsoft/api-extractor": "^7.18.19",
"@thi.ng/testament": "^0.1.6",
"rimraf": "^3.0.2",
"tools": "workspace:^",
"typedoc": "^0.22.8",
"typescript": "^4.4.4"
},
Expand Down
5 changes: 3 additions & 2 deletions packages/bitstream/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"clean": "rimraf '*.js' '*.d.ts' '*.map' doc",
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
"doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
"doc:readme": "yarn doc:stats && ../../scripts/node-esm ../../tools/src/readme.ts",
"doc:stats": "../../scripts/node-esm ../../tools/src/module-stats.ts",
"doc:readme": "yarn doc:stats && tools:readme",
"doc:stats": "tools:module-stats",
"pub": "yarn build && yarn npm publish --access public",
"test": "NODE_OPTIONS='--no-warnings --loader ts-node/esm' testament test"
},
Expand All @@ -40,6 +40,7 @@
"@microsoft/api-extractor": "^7.18.19",
"@thi.ng/testament": "^0.1.6",
"rimraf": "^3.0.2",
"tools": "workspace:^",
"typedoc": "^0.22.8",
"typescript": "^4.4.4"
},
Expand Down
5 changes: 3 additions & 2 deletions packages/cache/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"clean": "rimraf '*.js' '*.d.ts' '*.map' doc",
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
"doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
"doc:readme": "yarn doc:stats && ../../scripts/node-esm ../../tools/src/readme.ts",
"doc:stats": "../../scripts/node-esm ../../tools/src/module-stats.ts",
"doc:readme": "yarn doc:stats && tools:readme",
"doc:stats": "tools:module-stats",
"pub": "yarn build && yarn npm publish --access public",
"test": "NODE_OPTIONS='--no-warnings --loader ts-node/esm' testament test"
},
Expand All @@ -42,6 +42,7 @@
"@microsoft/api-extractor": "^7.18.19",
"@thi.ng/testament": "^0.1.6",
"rimraf": "^3.0.2",
"tools": "workspace:^",
"typedoc": "^0.22.8",
"typescript": "^4.4.4"
},
Expand Down
5 changes: 3 additions & 2 deletions packages/checks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"clean": "rimraf '*.js' '*.d.ts' '*.map' doc",
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
"doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
"doc:readme": "yarn doc:stats && ../../scripts/node-esm ../../tools/src/readme.ts",
"doc:stats": "../../scripts/node-esm ../../tools/src/module-stats.ts",
"doc:readme": "yarn doc:stats && tools:readme",
"doc:stats": "tools:module-stats",
"pub": "yarn build && yarn npm publish --access public",
"test": "NODE_OPTIONS='--no-warnings --loader ts-node/esm' testament test"
},
Expand All @@ -41,6 +41,7 @@
"@thi.ng/testament": "^0.1.6",
"@types/node": "^16.11.7",
"rimraf": "^3.0.2",
"tools": "workspace:^",
"typedoc": "^0.22.8",
"typescript": "^4.4.4"
},
Expand Down
Loading

0 comments on commit bf7a404

Please sign in to comment.