-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Build: Add NX bootstrap optimization #14535
Changes from 4 commits
543bdce
b6f3156
884f889
a1fac5a
b7c9fa7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ export const readAngularWorkspaceConfig = async ( | |
|
||
const nxWorkspace = require('@nrwl/workspace').readWorkspaceConfig({ | ||
format: 'angularCli', | ||
path: dirToSearch, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now that this method is used within a Nx workspace, it began to resolve the This should not affect end users of Storybook. This is a fix for some tests that use this method. |
||
}); | ||
|
||
// Use the workspace version of nx when angular looks for the angular.json file | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,9 +9,13 @@ import { executor as managerExecutor } from './manager/builder'; | |
import { buildDevStandalone } from './build-dev'; | ||
import { buildStaticStandalone } from './build-static'; | ||
|
||
// nx-ignore-next-line | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These were some imports that created circular dependencies. These comments ignore the dependencies generated by these lines. |
||
import reactOptions from '../../../app/react/src/server/options'; | ||
// nx-ignore-next-line | ||
import vue3Options from '../../../app/vue3/src/server/options'; | ||
// nx-ignore-next-line | ||
import htmlOptions from '../../../app/html/src/server/options'; | ||
// nx-ignore-next-line | ||
Comment on lines
13
to
+18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @shilman If we wanted to remove these circular dependencies we could extract this into it's own util, or duplicate the code (wouldn't recommend that) |
||
import webComponentsOptions from '../../../app/web-components/src/server/options'; | ||
import { outputStats } from './utils/output-stats'; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,303 @@ | ||
{ | ||
"npmScope": "storybook", | ||
"implicitDependencies": { | ||
"package.json": { | ||
"dependencies": "*", | ||
"devDependencies": "*" | ||
} | ||
}, | ||
"tasksRunnerOptions": { | ||
"default": { | ||
"runner": "@nrwl/nx-cloud", | ||
"options": { | ||
"cacheableOperations": [ | ||
"build", | ||
"test", | ||
"lint", | ||
"package", | ||
"prepare" | ||
], | ||
"strictlyOrderedTargets": [ | ||
"build", | ||
"package", | ||
"prepare" | ||
], | ||
"accessToken": "NzM2ODA4OTYtZGYyMi00MmVlLTgxNmEtODU1NGMwNjk0M2EzfHJlYWQtd3JpdGU=", | ||
"canTrackAnalytics": false, | ||
"showUsageWarnings": true | ||
} | ||
} | ||
}, | ||
"projects": { | ||
"@storybook/addon-a11y": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/addon-actions": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/addon-backgrounds": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/addon-controls": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/addon-cssresources": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/addon-design-assets": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/addon-docs": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/addon-essentials": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/addon-events": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/addon-google-analytics": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/addon-graphql": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/addon-jest": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/addon-knobs": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/addon-links": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/addon-queryparams": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/addon-storyshots": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/addon-storyshots-puppeteer": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/addon-storysource": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/addon-toolbars": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/addon-viewport": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/angular": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/aurelia": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/ember": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/html": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/marionette": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/marko": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/mithril": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/preact": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/rax": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/react": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/riot": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/server": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/svelte": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/vue": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/vue3": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/web-components": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/addon-decorator": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/addon-parameter": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/addon-preview-wrapper": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/addon-roundtrip": { | ||
"implicitDependencies": [] | ||
}, | ||
"angular-cli": { | ||
"implicitDependencies": [] | ||
}, | ||
"aurelia-kitchen-sink": { | ||
"implicitDependencies": [] | ||
}, | ||
"cra-kitchen-sink": { | ||
"implicitDependencies": [] | ||
}, | ||
"cra-react15": { | ||
"implicitDependencies": [] | ||
}, | ||
"cra-ts-essentials": { | ||
"implicitDependencies": [] | ||
}, | ||
"cra-ts-kitchen-sink": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/example-devkits": { | ||
"implicitDependencies": [] | ||
}, | ||
"ember-example": { | ||
"implicitDependencies": [] | ||
}, | ||
"html-kitchen-sink": { | ||
"implicitDependencies": [] | ||
}, | ||
"marko-cli": { | ||
"implicitDependencies": [] | ||
}, | ||
"mithril-example": { | ||
"implicitDependencies": [] | ||
}, | ||
"official-storybook": { | ||
"implicitDependencies": [] | ||
}, | ||
"preact-example": { | ||
"implicitDependencies": [] | ||
}, | ||
"rax-kitchen-sink": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/example-react-ts": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/example-react-ts-webpack4": { | ||
"implicitDependencies": [] | ||
}, | ||
"riot-example": { | ||
"implicitDependencies": [] | ||
}, | ||
"server-kitchen-sink": { | ||
"implicitDependencies": [] | ||
}, | ||
"standalone-preview": { | ||
"implicitDependencies": [] | ||
}, | ||
"svelte-example": { | ||
"implicitDependencies": [] | ||
}, | ||
"vue-3-cli-example": { | ||
"implicitDependencies": [] | ||
}, | ||
"vue-cli-example": { | ||
"implicitDependencies": [] | ||
}, | ||
"vue-example": { | ||
"implicitDependencies": [] | ||
}, | ||
"web-components-kitchen-sink": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/addons": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/api": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/builder-webpack4": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/builder-webpack5": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/channel-postmessage": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/channel-websocket": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/channels": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/cli": { | ||
"implicitDependencies": [] | ||
}, | ||
"sb": { | ||
"implicitDependencies": [] | ||
}, | ||
"storybook": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/client-api": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/client-logger": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/codemod": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/components": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/core": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/core-client": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/core-common": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/core-events": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/core-server": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/node-logger": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/postinstall": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/router": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/source-loader": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/theming": { | ||
"implicitDependencies": [] | ||
}, | ||
"@storybook/ui": { | ||
"implicitDependencies": [] | ||
} | ||
}, | ||
"affected": { | ||
"defaultBase": "next" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,8 +95,8 @@ function run() { | |
command: () => { | ||
log.info(prefix, 'prepare'); | ||
spawn( | ||
`lerna run prepare ${ | ||
process.env.CI ? `--concurrency ${maxConcurrentTasks} --stream` : '' | ||
`nx run-many --target=prepare --all --parallel ${ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This changes the command to use Nx instead of |
||
process.env.CI ? `--max-parallel=${maxConcurrentTasks}` : '' | ||
}` | ||
); | ||
}, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an update to the devDependency.
This new version has some allowances that allow Nx to be tested within an Nx repo.