@nx/storybook 16.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/LICENSE +22 -0
- package/README.md +63 -0
- package/executors.json +26 -0
- package/generators.json +58 -0
- package/index.d.ts +3 -0
- package/index.js +10 -0
- package/index.js.map +1 -0
- package/migrations.json +294 -0
- package/package.json +49 -0
- package/presets/cypress.d.ts +22 -0
- package/presets/cypress.js +9 -0
- package/presets/cypress.js.map +1 -0
- package/src/executors/build-storybook/build-storybook.impl.d.ts +7 -0
- package/src/executors/build-storybook/build-storybook.impl.js +58 -0
- package/src/executors/build-storybook/build-storybook.impl.js.map +1 -0
- package/src/executors/build-storybook/compat.d.ts +2 -0
- package/src/executors/build-storybook/compat.js +6 -0
- package/src/executors/build-storybook/compat.js.map +1 -0
- package/src/executors/build-storybook/schema.json +122 -0
- package/src/executors/storybook/compat.d.ts +2 -0
- package/src/executors/storybook/compat.js +6 -0
- package/src/executors/storybook/compat.js.map +1 -0
- package/src/executors/storybook/schema.json +94 -0
- package/src/executors/storybook/storybook.impl.d.ts +11 -0
- package/src/executors/storybook/storybook.impl.js +53 -0
- package/src/executors/storybook/storybook.impl.js.map +1 -0
- package/src/executors/utils.d.ts +12 -0
- package/src/executors/utils.js +148 -0
- package/src/executors/utils.js.map +1 -0
- package/src/generators/configuration/configuration.d.ts +5 -0
- package/src/generators/configuration/configuration.js +191 -0
- package/src/generators/configuration/configuration.js.map +1 -0
- package/src/generators/configuration/lib/user-prompts.d.ts +6 -0
- package/src/generators/configuration/lib/user-prompts.js +90 -0
- package/src/generators/configuration/lib/user-prompts.js.map +1 -0
- package/src/generators/configuration/lib/util-functions.d.ts +27 -0
- package/src/generators/configuration/lib/util-functions.js +359 -0
- package/src/generators/configuration/lib/util-functions.js.map +1 -0
- package/src/generators/configuration/project-files/.storybook/main.js__tmpl__ +46 -0
- package/src/generators/configuration/project-files/.storybook/preview.js__tmpl__ +0 -0
- package/src/generators/configuration/project-files/.storybook/tsconfig.json__tmpl__ +26 -0
- package/src/generators/configuration/project-files-7/.storybook/main.js__tmpl__ +34 -0
- package/src/generators/configuration/project-files-7/.storybook/preview.js__tmpl__ +0 -0
- package/src/generators/configuration/project-files-7/.storybook/tsconfig.json__tmpl__ +26 -0
- package/src/generators/configuration/project-files-7-ts/.storybook/main.ts__tmpl__ +36 -0
- package/src/generators/configuration/project-files-7-ts/.storybook/preview.ts__tmpl__ +0 -0
- package/src/generators/configuration/project-files-7-ts/.storybook/tsconfig.json__tmpl__ +28 -0
- package/src/generators/configuration/project-files-ts/.storybook/main.ts__tmpl__ +49 -0
- package/src/generators/configuration/project-files-ts/.storybook/preview.ts__tmpl__ +0 -0
- package/src/generators/configuration/project-files-ts/.storybook/tsconfig.json__tmpl__ +28 -0
- package/src/generators/configuration/schema.d.ts +19 -0
- package/src/generators/configuration/schema.json +124 -0
- package/src/generators/cypress-project/cypress-project.d.ts +14 -0
- package/src/generators/cypress-project/cypress-project.js +98 -0
- package/src/generators/cypress-project/cypress-project.js.map +1 -0
- package/src/generators/cypress-project/files/cypress.config.ts__tpl__ +6 -0
- package/src/generators/cypress-project/schema.json +55 -0
- package/src/generators/init/init.d.ts +5 -0
- package/src/generators/init/init.js +181 -0
- package/src/generators/init/init.js.map +1 -0
- package/src/generators/init/schema.d.ts +8 -0
- package/src/generators/init/schema.json +60 -0
- package/src/generators/migrate-7/calling-storybook-cli.d.ts +13 -0
- package/src/generators/migrate-7/calling-storybook-cli.js +85 -0
- package/src/generators/migrate-7/calling-storybook-cli.js.map +1 -0
- package/src/generators/migrate-7/files/storybook-migration-summary.md__tmpl__ +80 -0
- package/src/generators/migrate-7/helper-functions.d.ts +69 -0
- package/src/generators/migrate-7/helper-functions.js +449 -0
- package/src/generators/migrate-7/helper-functions.js.map +1 -0
- package/src/generators/migrate-7/migrate-7.d.ts +5 -0
- package/src/generators/migrate-7/migrate-7.js +73 -0
- package/src/generators/migrate-7/migrate-7.js.map +1 -0
- package/src/generators/migrate-7/schema.d.ts +9 -0
- package/src/generators/migrate-7/schema.json +35 -0
- package/src/migrations/update-13-4-6/set-project-build-config.d.ts +2 -0
- package/src/migrations/update-13-4-6/set-project-build-config.js +61 -0
- package/src/migrations/update-13-4-6/set-project-build-config.js.map +1 -0
- package/src/migrations/update-14-0-0/migrate-defaults-5-to-6/migrate-defaults-5-to-6.d.ts +6 -0
- package/src/migrations/update-14-0-0/migrate-defaults-5-to-6/migrate-defaults-5-to-6.js +120 -0
- package/src/migrations/update-14-0-0/migrate-defaults-5-to-6/migrate-defaults-5-to-6.js.map +1 -0
- package/src/migrations/update-14-0-0/migrate-stories-to-6-2/migrate-stories-to-6-2.d.ts +8 -0
- package/src/migrations/update-14-0-0/migrate-stories-to-6-2/migrate-stories-to-6-2.js +294 -0
- package/src/migrations/update-14-0-0/migrate-stories-to-6-2/migrate-stories-to-6-2.js.map +1 -0
- package/src/migrations/update-14-0-0/migrate-to-storybook-6.d.ts +2 -0
- package/src/migrations/update-14-0-0/migrate-to-storybook-6.js +13 -0
- package/src/migrations/update-14-0-0/migrate-to-storybook-6.js.map +1 -0
- package/src/migrations/update-14-1-8/change-storybook-targets-generator.d.ts +4 -0
- package/src/migrations/update-14-1-8/change-storybook-targets-generator.js +105 -0
- package/src/migrations/update-14-1-8/change-storybook-targets-generator.js.map +1 -0
- package/src/migrations/update-14-1-8/change-storybook-targets.d.ts +2 -0
- package/src/migrations/update-14-1-8/change-storybook-targets.js +11 -0
- package/src/migrations/update-14-1-8/change-storybook-targets.js.map +1 -0
- package/src/migrations/update-15-0-0/add-storybook-inputs.d.ts +2 -0
- package/src/migrations/update-15-0-0/add-storybook-inputs.js +47 -0
- package/src/migrations/update-15-0-0/add-storybook-inputs.js.map +1 -0
- package/src/migrations/update-15-4-6/refactor-executor-options.d.ts +2 -0
- package/src/migrations/update-15-4-6/refactor-executor-options.js +67 -0
- package/src/migrations/update-15-4-6/refactor-executor-options.js.map +1 -0
- package/src/migrations/update-15-5-3/ensure-webpack-package.d.ts +2 -0
- package/src/migrations/update-15-5-3/ensure-webpack-package.js +33 -0
- package/src/migrations/update-15-5-3/ensure-webpack-package.js.map +1 -0
- package/src/migrations/update-15-7-0/add-addon-essentials-to-all.d.ts +24 -0
- package/src/migrations/update-15-7-0/add-addon-essentials-to-all.js +278 -0
- package/src/migrations/update-15-7-0/add-addon-essentials-to-all.js.map +1 -0
- package/src/migrations/update-15-7-0/remove-root-config.d.ts +14 -0
- package/src/migrations/update-15-7-0/remove-root-config.js +210 -0
- package/src/migrations/update-15-7-0/remove-root-config.js.map +1 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +2 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +13 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js.map +1 -0
- package/src/utils/models.d.ts +5 -0
- package/src/utils/models.js +3 -0
- package/src/utils/models.js.map +1 -0
- package/src/utils/test-configs/.storybook/main.js +8 -0
- package/src/utils/test-configs/.storybook/tsconfig.json +19 -0
- package/src/utils/testing.d.ts +3 -0
- package/src/utils/testing.js +38 -0
- package/src/utils/testing.js.map +1 -0
- package/src/utils/utilities.d.ts +53 -0
- package/src/utils/utilities.js +255 -0
- package/src/utils/utilities.js.map +1 -0
- package/src/utils/versions.d.ts +20 -0
- package/src/utils/versions.js +24 -0
- package/src/utils/versions.js.map +1 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.callAutomigrate = exports.callUpgrade = void 0;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const child_process_1 = require("child_process");
|
|
6
|
+
function callUpgrade(schema) {
|
|
7
|
+
try {
|
|
8
|
+
devkit_1.output.log({
|
|
9
|
+
title: `Calling sb upgrade`,
|
|
10
|
+
bodyLines: [
|
|
11
|
+
`ℹ️ Nx will call the Storybook CLI to upgrade your @storybook/* packages to the latest version.`,
|
|
12
|
+
`📖 You can read more about the Storybook upgrade command here: https://storybook.js.org/docs/7.0/react/configure/upgrading`,
|
|
13
|
+
],
|
|
14
|
+
color: 'blue',
|
|
15
|
+
});
|
|
16
|
+
(0, child_process_1.execSync)(`npx storybook@next upgrade --prerelease ${schema.autoAcceptAllPrompts ? '--yes' : ''}`, {
|
|
17
|
+
stdio: [0, 1, 2],
|
|
18
|
+
});
|
|
19
|
+
devkit_1.output.log({
|
|
20
|
+
title: `Storybook packages upgraded.`,
|
|
21
|
+
bodyLines: [
|
|
22
|
+
`☑️ The upgrade command was successful.`,
|
|
23
|
+
`Your Storybook packages are now at the latest version.`,
|
|
24
|
+
],
|
|
25
|
+
color: 'green',
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
catch (e) {
|
|
29
|
+
devkit_1.output.log({
|
|
30
|
+
title: 'Migration failed',
|
|
31
|
+
bodyLines: [
|
|
32
|
+
`🚨 The Storybook CLI failed to upgrade your @storybook/* packages to the latest version.`,
|
|
33
|
+
`Please try running the sb upgrade command manually:`,
|
|
34
|
+
`npx storybook@next upgrade --prerelease`,
|
|
35
|
+
],
|
|
36
|
+
color: 'red',
|
|
37
|
+
});
|
|
38
|
+
console.log(e);
|
|
39
|
+
return 1;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.callUpgrade = callUpgrade;
|
|
43
|
+
function callAutomigrate(allStorybookProjects, schema) {
|
|
44
|
+
devkit_1.output.log({
|
|
45
|
+
title: `⚙️ Calling sb automigrate`,
|
|
46
|
+
bodyLines: [
|
|
47
|
+
`ℹ️ Nx will call the Storybook CLI to automigrate the Storybook configuration of all your projects that use Storybook.`,
|
|
48
|
+
`📖 You can read more about the Storybook automigrate command here: https://storybook.js.org/docs/7.0/react/configure/upgrading#automigrate-script`,
|
|
49
|
+
],
|
|
50
|
+
color: 'green',
|
|
51
|
+
});
|
|
52
|
+
const resultOfMigration = {
|
|
53
|
+
successfulProjects: {},
|
|
54
|
+
failedProjects: {},
|
|
55
|
+
};
|
|
56
|
+
Object.entries(allStorybookProjects).forEach(([projectName, storybookProjectInfo]) => {
|
|
57
|
+
const commandToRun = `npx sb@next automigrate --config-dir ${storybookProjectInfo.configDir} --renderer ${storybookProjectInfo.uiFramework}`;
|
|
58
|
+
try {
|
|
59
|
+
devkit_1.output.log({
|
|
60
|
+
title: `Calling sb automigrate for ${projectName}`,
|
|
61
|
+
bodyLines: ['Command:', commandToRun],
|
|
62
|
+
color: 'green',
|
|
63
|
+
});
|
|
64
|
+
(0, child_process_1.execSync)(`${commandToRun} ${schema.autoAcceptAllPrompts ? '--yes' : ''}`, {
|
|
65
|
+
stdio: 'inherit',
|
|
66
|
+
});
|
|
67
|
+
resultOfMigration.successfulProjects[projectName] = commandToRun;
|
|
68
|
+
}
|
|
69
|
+
catch (e) {
|
|
70
|
+
devkit_1.output.error({
|
|
71
|
+
title: 'Migration failed',
|
|
72
|
+
bodyLines: [
|
|
73
|
+
`🚨 The Storybook CLI failed to automigrate the Storybook configuration of your project.`,
|
|
74
|
+
`The error was: ${e}`,
|
|
75
|
+
`Please try running the sb automigrate command manually:`,
|
|
76
|
+
commandToRun,
|
|
77
|
+
],
|
|
78
|
+
});
|
|
79
|
+
resultOfMigration.failedProjects[projectName] = commandToRun;
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
return resultOfMigration;
|
|
83
|
+
}
|
|
84
|
+
exports.callAutomigrate = callAutomigrate;
|
|
85
|
+
//# sourceMappingURL=calling-storybook-cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calling-storybook-cli.js","sourceRoot":"","sources":["../../../../../../packages/storybook/src/generators/migrate-7/calling-storybook-cli.ts"],"names":[],"mappings":";;;AAAA,uCAAoC;AACpC,iDAAyC;AAGzC,SAAgB,WAAW,CAAC,MAAc;IACxC,IAAI;QACF,eAAM,CAAC,GAAG,CAAC;YACT,KAAK,EAAE,oBAAoB;YAC3B,SAAS,EAAE;gBACT,gGAAgG;gBAChG,4HAA4H;aAC7H;YACD,KAAK,EAAE,MAAM;SACd,CAAC,CAAC;QAEH,IAAA,wBAAQ,EACN,2CACE,MAAM,CAAC,oBAAoB,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAC1C,EAAE,EACF;YACE,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;SACjB,CACF,CAAC;QAEF,eAAM,CAAC,GAAG,CAAC;YACT,KAAK,EAAE,8BAA8B;YACrC,SAAS,EAAE;gBACT,wCAAwC;gBACxC,wDAAwD;aACzD;YACD,KAAK,EAAE,OAAO;SACf,CAAC,CAAC;KACJ;IAAC,OAAO,CAAC,EAAE;QACV,eAAM,CAAC,GAAG,CAAC;YACT,KAAK,EAAE,kBAAkB;YACzB,SAAS,EAAE;gBACT,0FAA0F;gBAC1F,qDAAqD;gBACrD,yCAAyC;aAC1C;YACD,KAAK,EAAE,KAAK;SACb,CAAC,CAAC;QACH,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QACf,OAAO,CAAC,CAAC;KACV;AACH,CAAC;AAzCD,kCAyCC;AAED,SAAgB,eAAe,CAC7B,oBAMC,EACD,MAAc;IAEd,eAAM,CAAC,GAAG,CAAC;QACT,KAAK,EAAE,2BAA2B;QAClC,SAAS,EAAE;YACT,wHAAwH;YACxH,mJAAmJ;SACpJ;QACD,KAAK,EAAE,OAAO;KACf,CAAC,CAAC;IAEH,MAAM,iBAAiB,GAAG;QACxB,kBAAkB,EAAE,EAAE;QACtB,cAAc,EAAE,EAAE;KACnB,CAAC;IAEF,MAAM,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,OAAO,CAC1C,CAAC,CAAC,WAAW,EAAE,oBAAoB,CAAC,EAAE,EAAE;QACtC,MAAM,YAAY,GAAG,wCAAwC,oBAAoB,CAAC,SAAS,eAAe,oBAAoB,CAAC,WAAW,EAAE,CAAC;QAC7I,IAAI;YACF,eAAM,CAAC,GAAG,CAAC;gBACT,KAAK,EAAE,8BAA8B,WAAW,EAAE;gBAClD,SAAS,EAAE,CAAC,UAAU,EAAE,YAAY,CAAC;gBACrC,KAAK,EAAE,OAAO;aACf,CAAC,CAAC;YAEH,IAAA,wBAAQ,EACN,GAAG,YAAY,KAAK,MAAM,CAAC,oBAAoB,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,EAChE;gBACE,KAAK,EAAE,SAAS;aACjB,CACF,CAAC;YAEF,iBAAiB,CAAC,kBAAkB,CAAC,WAAW,CAAC,GAAG,YAAY,CAAC;SAClE;QAAC,OAAO,CAAC,EAAE;YACV,eAAM,CAAC,KAAK,CAAC;gBACX,KAAK,EAAE,kBAAkB;gBACzB,SAAS,EAAE;oBACT,yFAAyF;oBACzF,kBAAkB,CAAC,EAAE;oBACrB,yDAAyD;oBACzD,YAAY;iBACb;aACF,CAAC,CAAC;YACH,iBAAiB,CAAC,cAAc,CAAC,WAAW,CAAC,GAAG,YAAY,CAAC;SAC9D;IACH,CAAC,CACF,CAAC;IAEF,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AA1DD,0CA0DC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Storybook 7 Migration Summary
|
|
2
|
+
|
|
3
|
+
## Upgrade Storybook packages
|
|
4
|
+
|
|
5
|
+
The following command was ran to upgrade the Storybook packages:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx storybook@next upgrade --prerelease
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Your `.storybook/main.js|ts` files were prepared for Storybook's automigration scripts
|
|
12
|
+
|
|
13
|
+
Some adjustments were made to your `.storybook/main.js|ts` files so that
|
|
14
|
+
the Storybook automigration scripts could run successfully. The changes that were made are as follows:
|
|
15
|
+
|
|
16
|
+
- Remove the `as StorybookConfig` typecast from the main.ts files, if any,
|
|
17
|
+
since it is not needed any more.
|
|
18
|
+
- Remove the `path.resolve` calls from the Next.js Storybook configuration, if any, since it breaks the Storybook automigration scripts.
|
|
19
|
+
|
|
20
|
+
## The Storybook automigration scripts were ran
|
|
21
|
+
|
|
22
|
+
<% if ( hasSuccessfulProjects ) { %>
|
|
23
|
+
The following commands ran successfully and your Storybook configuration was successfully migrated to the latest version 7:
|
|
24
|
+
|
|
25
|
+
<% for (let command of successfulProjects) { %>
|
|
26
|
+
- `<%= command %>`
|
|
27
|
+
<% } %>
|
|
28
|
+
|
|
29
|
+
Please make sure to check the results yourself and make sure that everything is working as expected.
|
|
30
|
+
<% } %>
|
|
31
|
+
|
|
32
|
+
<% if ( hasFailedProjects ) { %>
|
|
33
|
+
### Some migrations failed
|
|
34
|
+
|
|
35
|
+
The following commands failed and your Storybook configuration for these projects was not
|
|
36
|
+
migrated to the latest version 7:
|
|
37
|
+
|
|
38
|
+
<% for (let command of failedProjects) { %>
|
|
39
|
+
- `<%= command %>`
|
|
40
|
+
<% } %>
|
|
41
|
+
|
|
42
|
+
You can run these commands again, manually, and follow the instructions in the
|
|
43
|
+
output of these commands to migrate your Storybook configuration to the latest version 7.
|
|
44
|
+
<% } %>
|
|
45
|
+
|
|
46
|
+
Also, we may have missed something. Please make sure to check the logs of the Storybook CLI commands that were run, and look for
|
|
47
|
+
the `❌ Failed trying to evaluate` message or `❌ The migration failed to update` message. This will indicate if a command was
|
|
48
|
+
unsuccessful, and will help you run the migration again, manually.
|
|
49
|
+
|
|
50
|
+
## Final adjustments
|
|
51
|
+
|
|
52
|
+
After the Storybook automigration scripts have run, some additional adjustments were made to your
|
|
53
|
+
workspace, to make sure that everything is working as expected. These adjustments are as follows:
|
|
54
|
+
|
|
55
|
+
- The `vite-tsconfig-paths` plugin was removed from the Storybook configuration files since it's no longer needed.
|
|
56
|
+
- The `viteConfigPath` option was added to the Storybook builder, where needed.
|
|
57
|
+
- The import package for the `StorybookConfig` type was changed to be framework specific.
|
|
58
|
+
- The `uiFramework` option was removed from your project's Storybook targets.
|
|
59
|
+
- The `lit` package was added to your workspace, if you are using the
|
|
60
|
+
Web Components `@storybook/web-components` package. Please note that the `lit-html` package is
|
|
61
|
+
no longer needed by Storybook v7. So, if you are not using it anywhere else, you can safely remove it.
|
|
62
|
+
|
|
63
|
+
## Next steps
|
|
64
|
+
|
|
65
|
+
You can make sure everything is working as expected by trying
|
|
66
|
+
to build or serve your Storybook as you normally would.
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
npx nx build-storybook project-name
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
npx nx storybook project-name
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Please read the [Storybook 7.0.0 release notes](https://storybook.js.org/blog/7-0-beta/) and the
|
|
77
|
+
official [Storybook 7.0.0 migration guide](https://chromatic-ui.notion.site/Storybook-7-migration-guide-dbf41fa347304eb2a5e9c69b34503937)
|
|
78
|
+
for more information.
|
|
79
|
+
|
|
80
|
+
You can also read the docs for the [@nrwl/storybook:migrate-7 generator](https://nx.dev/packages/storybook/generators/migrate-7) and our [Storybook 7 setup guide](https://nx.dev/packages/storybook/documents/storybook-7-setup).
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Tree } from '@nx/devkit';
|
|
2
|
+
export declare function onlyShowGuide(storybookProjects: {
|
|
3
|
+
[key: string]: {
|
|
4
|
+
configDir: string;
|
|
5
|
+
uiFramework: string;
|
|
6
|
+
viteConfigFilePath?: string;
|
|
7
|
+
};
|
|
8
|
+
}): void;
|
|
9
|
+
export declare function writeFile(file?: {
|
|
10
|
+
path?: string;
|
|
11
|
+
content?: string;
|
|
12
|
+
}): void;
|
|
13
|
+
export declare function removePathResolvesFromNextConfig(tree: Tree, mainJsTsPath: string): {
|
|
14
|
+
path: string;
|
|
15
|
+
content: string;
|
|
16
|
+
} | undefined;
|
|
17
|
+
export declare function removeViteTsConfigPathsPlugin(tree: Tree, mainJsTsPath: string): void;
|
|
18
|
+
export declare function addViteConfigFilePathInFrameworkOptions(tree: Tree, mainJsTsPath: string, viteConfigPath: string): void;
|
|
19
|
+
export declare function normalizeViteConfigFilePathWithTree(tree: Tree, projectRoot: string, configFile?: string): string;
|
|
20
|
+
export declare function removeTypecastFromMainTs(tree: Tree, mainTsPath: string): {
|
|
21
|
+
path: string;
|
|
22
|
+
content: string;
|
|
23
|
+
} | undefined;
|
|
24
|
+
export declare function removeUiFrameworkFromProjectJson(tree: Tree): void;
|
|
25
|
+
export declare function changeCoreCommonImportToFramework(tree: Tree, mainTsPath: string): void;
|
|
26
|
+
export declare function getAllStorybookInfo(tree: Tree): {
|
|
27
|
+
[key: string]: {
|
|
28
|
+
configDir: string;
|
|
29
|
+
uiFramework: string;
|
|
30
|
+
viteConfigFilePath?: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export declare function prepareFiles(tree: Tree, allStorybookProjects: {
|
|
34
|
+
[key: string]: {
|
|
35
|
+
configDir: string;
|
|
36
|
+
uiFramework: string;
|
|
37
|
+
viteConfigFilePath?: string;
|
|
38
|
+
};
|
|
39
|
+
}): void;
|
|
40
|
+
export declare function handleMigrationResult(migrateResult: {
|
|
41
|
+
successfulProjects: {};
|
|
42
|
+
failedProjects: {};
|
|
43
|
+
}, allStorybookProjects: {
|
|
44
|
+
[key: string]: {
|
|
45
|
+
configDir: string;
|
|
46
|
+
uiFramework: string;
|
|
47
|
+
viteConfigFilePath?: string;
|
|
48
|
+
};
|
|
49
|
+
}): {
|
|
50
|
+
successfulProjects: {};
|
|
51
|
+
failedProjects: {};
|
|
52
|
+
};
|
|
53
|
+
export declare function checkStorybookInstalled(packageJson: any): boolean;
|
|
54
|
+
export declare function checkWebComponentsInstalled(packageJson: any): boolean;
|
|
55
|
+
export declare function afterMigration(tree: Tree, allStorybookProjects: {
|
|
56
|
+
[key: string]: {
|
|
57
|
+
configDir: string;
|
|
58
|
+
uiFramework: string;
|
|
59
|
+
viteConfigFilePath?: string;
|
|
60
|
+
};
|
|
61
|
+
}): void;
|
|
62
|
+
export declare function logResult(tree: Tree, migrationSummary: {
|
|
63
|
+
successfulProjects: {
|
|
64
|
+
[key: string]: string;
|
|
65
|
+
};
|
|
66
|
+
failedProjects: {
|
|
67
|
+
[key: string]: string;
|
|
68
|
+
};
|
|
69
|
+
}): void;
|