Skip to content

Commit

Permalink
feat(core): prep project graph during postinstall (#9204)
Browse files Browse the repository at this point in the history
  • Loading branch information
FrozenPandaz committed Mar 9, 2022
1 parent acc29e9 commit 88204a0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/workspace/package.json
Expand Up @@ -2,6 +2,9 @@
"name": "@nrwl/workspace",
"version": "0.0.1",
"description": "Smart, Fast and Extensible Build System",
"scripts": {
"postinstall": "node ./src/init/init"
},
"repository": {
"type": "git",
"url": "https://github.com/nrwl/nx.git",
Expand Down
9 changes: 9 additions & 0 deletions packages/workspace/src/init/init.ts
@@ -0,0 +1,9 @@
import { createProjectGraphAsync } from '../core/project-graph/project-graph';

(async () => {
try {
await createProjectGraphAsync();
} catch (e) {
// Do not error since this runs in a postinstall
}
})();

0 comments on commit 88204a0

Please sign in to comment.