@nrwl/react 15.5.3 → 15.6.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 +1 -1
- package/README.md +4 -24
- package/babel.d.ts +16 -1
- package/babel.js +4 -3
- package/babel.js.map +1 -1
- package/package.json +6 -7
- package/plugins/storybook/index.d.ts +0 -4
- package/plugins/storybook/index.js +14 -57
- package/plugins/storybook/index.js.map +1 -1
- package/plugins/storybook/merge-plugins.d.ts +2 -2
- package/plugins/storybook/merge-plugins.js.map +1 -1
- package/src/generators/storybook-configuration/configuration.js +4 -0
- package/src/generators/storybook-configuration/configuration.js.map +1 -1
- package/src/generators/storybook-configuration/schema.d.ts +1 -0
- package/src/generators/storybook-configuration/schema.json +6 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
# [15.6.0-beta.1](https://github.com/nrwl/nx/compare/15.5.1...15.6.0-beta.1) (2023-01-23)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @nrwl/react
|
package/README.md
CHANGED
|
@@ -43,38 +43,18 @@ npm init nx-workspace
|
|
|
43
43
|
yarn create nx-workspace
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
```
|
|
49
|
-
? What to create in the new workspace (Use arrow keys)
|
|
50
|
-
❯ apps [an empty workspace with no plugins with a layout that works best for building apps]
|
|
51
|
-
core [an empty workspace with no plugins set up to publish npm packages (similar to yarn workspaces)]
|
|
52
|
-
ts [an empty workspace with the JS/TS plugin preinstalled]
|
|
53
|
-
react [a workspace with a single React application]
|
|
54
|
-
angular [a workspace with a single Angular application]
|
|
55
|
-
next.js [a workspace with a single Next.js application]
|
|
56
|
-
nest [a workspace with a single Nest application]
|
|
57
|
-
express [a workspace with a single Express application]
|
|
58
|
-
web components [a workspace with a single app built using web components]
|
|
59
|
-
react-native [a workspace with a single React Native application]
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
Select the preset that works best for you
|
|
63
|
-
|
|
64
|
-
### Adding Nx to an Existing Monorepo
|
|
46
|
+
### Adding Nx to an Existing Repository
|
|
65
47
|
|
|
66
48
|
Run:
|
|
67
49
|
|
|
68
50
|
```bash
|
|
69
|
-
npx
|
|
51
|
+
npx nx@latest init
|
|
70
52
|
```
|
|
71
53
|
|
|
72
54
|
## Documentation & Resources
|
|
73
55
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
- [Nx.Dev: Documentation, Guides, Interactive Tutorials](https://nx.dev)
|
|
77
|
-
- [Tutorial: Adding Nx to an Existing Monorepo](/recipes/adopting-nx/adding-to-monorepo)
|
|
56
|
+
- [Nx.Dev: Documentation, Guides, Tutorials](https://nx.dev)
|
|
57
|
+
- [Intro to Nx](https://nx.dev/getting-started/intro)
|
|
78
58
|
- [Official Nx YouTube Channel](https://www.youtube.com/c/Nrwl_io)
|
|
79
59
|
- [Blog Posts About Nx](https://blog.nrwl.io/nx/home)
|
|
80
60
|
|
package/babel.d.ts
CHANGED
|
@@ -1 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
interface NxReactBabelOptions {
|
|
2
|
+
runtime?: string;
|
|
3
|
+
importSource?: string;
|
|
4
|
+
useBuiltIns?: boolean | string;
|
|
5
|
+
decorators?: {
|
|
6
|
+
decoratorsBeforeExport?: boolean;
|
|
7
|
+
legacy?: boolean;
|
|
8
|
+
};
|
|
9
|
+
classProperties?: {
|
|
10
|
+
loose?: boolean;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
declare function getReactPresetOptions({ presetOptions, env }: {
|
|
14
|
+
presetOptions: any;
|
|
15
|
+
env: any;
|
|
16
|
+
}): Record<string, string | boolean>;
|
package/babel.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/*
|
|
2
|
+
* Babel preset to provide React support for Nx.
|
|
3
|
+
*/
|
|
3
4
|
module.exports = function (api, options) {
|
|
4
5
|
api.assertVersion(7);
|
|
5
6
|
const env = api.env();
|
|
@@ -7,7 +8,7 @@ module.exports = function (api, options) {
|
|
|
7
8
|
* pagesDir is set when being transpiled by Next.js
|
|
8
9
|
*/
|
|
9
10
|
const isNextJs = api.caller((caller) => caller === null || caller === void 0 ? void 0 : caller.pagesDir);
|
|
10
|
-
const presets = [['@nrwl/
|
|
11
|
+
const presets = [['@nrwl/js/babel', options]];
|
|
11
12
|
/**
|
|
12
13
|
* Next.js already includes the preset-react, and including it
|
|
13
14
|
* the second time here results in having two instances of this preset.
|
package/babel.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"babel.js","sourceRoot":"","sources":["../../../packages/react/babel.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"babel.js","sourceRoot":"","sources":["../../../packages/react/babel.ts"],"names":[],"mappings":"AAAA;;GAEG;AAeH,MAAM,CAAC,OAAO,GAAG,UAAU,GAAQ,EAAE,OAA4B;IAC/D,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IACrB,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,EAAE,CAAC;IACtB;;OAEG;IACH,MAAM,QAAQ,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,QAAQ,CAAC,CAAC;IAE1D,MAAM,OAAO,GAAU,CAAC,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC,CAAC;IAErD;;;;;;;;;;OAUG;IACH,IAAI,CAAC,QAAQ,EAAE;QACb,OAAO,CAAC,IAAI,CAAC;YACX,OAAO,CAAC,OAAO,CAAC,qBAAqB,CAAC;YACtC,qBAAqB,CAAC;gBACpB,aAAa,EAAE,OAAO;gBACtB,GAAG;aACJ,CAAC;SACH,CAAC,CAAC;KACJ;IAED,OAAO;QACL,OAAO;KACR,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,qBAAqB,CAAC,EAAE,aAAa,EAAE,GAAG,EAAE;;IACnD,MAAM,kBAAkB,GAAqC;QAC3D,OAAO,EAAE,MAAA,aAAa,CAAC,OAAO,mCAAI,WAAW;QAC7C,WAAW,EAAE,GAAG,KAAK,YAAY;KAClC,CAAC;IAEF,sFAAsF;IACtF,4CAA4C;IAC5C,IAAI,kBAAkB,CAAC,OAAO,KAAK,WAAW,EAAE;QAC9C,kBAAkB,CAAC,WAAW,GAAG,IAAI,CAAC;KACvC;IAED,IAAI,aAAa,CAAC,YAAY,EAAE;QAC9B,kBAAkB,CAAC,YAAY,GAAG,aAAa,CAAC,YAAY,CAAC;KAC9D;IAED,OAAO,kBAAkB,CAAC;AAC5B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nrwl/react",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.6.0-beta.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The React plugin for Nx contains executors and generators for managing React applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Cypress, and Storybook.\n\n- Generators for applications, libraries, components, hooks, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
|
|
6
6
|
"repository": {
|
|
@@ -31,17 +31,16 @@
|
|
|
31
31
|
"migrations": "./migrations.json"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@nrwl/devkit": "15.
|
|
35
|
-
"@nrwl/linter": "15.
|
|
36
|
-
"@nrwl/workspace": "15.
|
|
34
|
+
"@nrwl/devkit": "15.6.0-beta.1",
|
|
35
|
+
"@nrwl/linter": "15.6.0-beta.1",
|
|
36
|
+
"@nrwl/workspace": "15.6.0-beta.1",
|
|
37
37
|
"@phenomnomnominal/tsquery": "4.1.1",
|
|
38
38
|
"chalk": "^4.1.0",
|
|
39
|
-
"minimatch": "3.0.5"
|
|
40
|
-
"semver": "7.3.4"
|
|
39
|
+
"minimatch": "3.0.5"
|
|
41
40
|
},
|
|
42
41
|
"publishConfig": {
|
|
43
42
|
"access": "public"
|
|
44
43
|
},
|
|
45
44
|
"types": "./index.d.ts",
|
|
46
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "b424d0c4f2c93177b1aff808f8b269c1b55f2d06"
|
|
47
46
|
}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
1
|
import { Configuration } from 'webpack';
|
|
2
|
-
export declare const babelDefault: () => Record<string, (string | [
|
|
3
|
-
string,
|
|
4
|
-
object
|
|
5
|
-
])[]>;
|
|
6
2
|
export declare const core: (prev: any, options: any) => any;
|
|
7
3
|
export declare const webpack: (storybookWebpackConfig: Configuration, options: any) => Promise<Configuration>;
|
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.webpack = exports.core =
|
|
3
|
+
exports.webpack = exports.core = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nrwl/devkit");
|
|
6
6
|
const config_1 = require("@nrwl/webpack/src/utils/config");
|
|
7
|
-
const version_utils_1 = require("@nrwl/workspace/src/utilities/version-utils");
|
|
8
7
|
const path_1 = require("path");
|
|
9
|
-
const semver_1 = require("semver");
|
|
10
8
|
const webpack_1 = require("webpack");
|
|
11
|
-
const mergeWebpack = require("webpack-merge");
|
|
12
9
|
const merge_plugins_1 = require("./merge-plugins");
|
|
13
10
|
const with_react_1 = require("../with-react");
|
|
14
|
-
const webpack_2 = require("@nrwl/webpack");
|
|
15
11
|
// This is shamelessly taken from CRA and modified for NX use
|
|
16
12
|
// https://github.com/facebook/create-react-app/blob/4784997f0682e75eb32a897b4ffe34d735912e6c/packages/react-scripts/config/env.js#L71
|
|
17
13
|
function getClientEnvironment(mode) {
|
|
@@ -46,28 +42,20 @@ function getClientEnvironment(mode) {
|
|
|
46
42
|
};
|
|
47
43
|
return { stringified };
|
|
48
44
|
}
|
|
49
|
-
const babelDefault = () => {
|
|
50
|
-
// Add babel plugin for styled-components or emotion.
|
|
51
|
-
// We don't have a good way to know when a project uses one or the other, so
|
|
52
|
-
// add the plugin only if the other style package isn't used.
|
|
53
|
-
const packageJson = (0, devkit_1.readJsonFile)((0, path_1.join)(devkit_1.workspaceRoot, 'package.json'));
|
|
54
|
-
const deps = Object.assign(Object.assign({}, packageJson.dependencies), packageJson.devDependencies);
|
|
55
|
-
const hasStyledComponents = !!deps['styled-components'];
|
|
56
|
-
const plugins = [];
|
|
57
|
-
if (hasStyledComponents) {
|
|
58
|
-
plugins.push(['styled-components', { ssr: false }]);
|
|
59
|
-
}
|
|
60
|
-
return {
|
|
61
|
-
presets: [],
|
|
62
|
-
plugins: [...plugins],
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
exports.babelDefault = babelDefault;
|
|
66
45
|
const core = (prev, options) => (Object.assign(Object.assign({}, prev), { disableWebpackDefaults: true }));
|
|
67
46
|
exports.core = core;
|
|
68
47
|
const webpack = (storybookWebpackConfig = {}, options) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
69
48
|
var _a, _b, _c, _d, _e;
|
|
70
49
|
devkit_1.logger.info('=> Loading Nrwl React Storybook preset from "@nrwl/react/plugins/storybook"');
|
|
50
|
+
// In case anyone is missing dep and did not run migrations.
|
|
51
|
+
// See: https://github.com/nrwl/nx/issues/14455
|
|
52
|
+
try {
|
|
53
|
+
require.resolve('@nrwl/webpack');
|
|
54
|
+
}
|
|
55
|
+
catch (_f) {
|
|
56
|
+
throw new Error(`'@nrwl/webpack' package is not installed. Install it and try again.`);
|
|
57
|
+
}
|
|
58
|
+
const { withNx, withWeb } = require('@nrwl/webpack');
|
|
71
59
|
const tsconfigPath = (0, path_1.join)(options.configDir, 'tsconfig.json');
|
|
72
60
|
const builderOptions = Object.assign(Object.assign({}, options), { root: options.configDir,
|
|
73
61
|
// These are blank because root is the absolute path to .storybook folder
|
|
@@ -76,50 +64,19 @@ const webpack = (storybookWebpackConfig = {}, options) => tslib_1.__awaiter(void
|
|
|
76
64
|
scripts: true,
|
|
77
65
|
styles: true,
|
|
78
66
|
vendors: false,
|
|
79
|
-
}, styles: [], optimization: {}, tsConfig: tsconfigPath, extractCss: storybookWebpackConfig.mode === 'production', target: 'web' });
|
|
80
|
-
const isScriptOptimizeOn = storybookWebpackConfig.mode !== 'development';
|
|
81
|
-
const extractCss = storybookWebpackConfig.mode === 'production';
|
|
67
|
+
}, styles: (_a = options.styles) !== null && _a !== void 0 ? _a : [], optimization: {}, tsConfig: tsconfigPath, extractCss: storybookWebpackConfig.mode === 'production', target: 'web' });
|
|
82
68
|
// ESM build for modern browsers.
|
|
83
69
|
let baseWebpackConfig = {};
|
|
84
|
-
const configure = (0, config_1.composePlugins)(
|
|
70
|
+
const configure = (0, config_1.composePlugins)(withNx({ skipTypeChecking: true }), withWeb(), (0, with_react_1.withReact)());
|
|
85
71
|
const finalConfig = configure(baseWebpackConfig, {
|
|
86
72
|
options: builderOptions,
|
|
87
73
|
context: {}, // The context is not used here.
|
|
88
74
|
});
|
|
89
|
-
|
|
90
|
-
// a Storybook issue (https://github.com/storybookjs/storybook/issues/13277) which apparently
|
|
91
|
-
// doesn't work with `@emotion/*` >= v11
|
|
92
|
-
// this is a workaround to fix that
|
|
93
|
-
let resolvedEmotionAliases = {};
|
|
94
|
-
const packageJson = (0, devkit_1.readJsonFile)((0, path_1.join)(devkit_1.workspaceRoot, 'package.json'));
|
|
95
|
-
const deps = Object.assign(Object.assign({}, packageJson.dependencies), packageJson.devDependencies);
|
|
96
|
-
const emotionReactVersion = deps['@emotion/react'];
|
|
97
|
-
if (emotionReactVersion &&
|
|
98
|
-
(0, semver_1.gte)((0, version_utils_1.checkAndCleanWithSemver)('@emotion/react', emotionReactVersion), '11.0.0')) {
|
|
99
|
-
try {
|
|
100
|
-
const babelrc = (0, devkit_1.readJsonFile)(options.babelrcPath ||
|
|
101
|
-
(0, devkit_1.joinPathFragments)(options.configDir, '../', '.babelrc'));
|
|
102
|
-
if ((_a = babelrc === null || babelrc === void 0 ? void 0 : babelrc.plugins) === null || _a === void 0 ? void 0 : _a.includes('@emotion/babel-plugin')) {
|
|
103
|
-
resolvedEmotionAliases = {
|
|
104
|
-
resolve: {
|
|
105
|
-
alias: {
|
|
106
|
-
'@emotion/core': (0, devkit_1.joinPathFragments)(devkit_1.workspaceRoot, 'node_modules', '@emotion/react'),
|
|
107
|
-
'@emotion/styled': (0, devkit_1.joinPathFragments)(devkit_1.workspaceRoot, 'node_modules', '@emotion/styled'),
|
|
108
|
-
'emotion-theming': (0, devkit_1.joinPathFragments)(devkit_1.workspaceRoot, 'node_modules', '@emotion/react'),
|
|
109
|
-
},
|
|
110
|
-
},
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
catch (error) {
|
|
115
|
-
// silently ignore if the .babelrc doesn't exist
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
return mergeWebpack.merge(Object.assign(Object.assign({}, storybookWebpackConfig), { module: Object.assign(Object.assign({}, storybookWebpackConfig.module), { rules: [
|
|
75
|
+
return Object.assign(Object.assign({}, storybookWebpackConfig), { module: Object.assign(Object.assign({}, storybookWebpackConfig.module), { rules: [
|
|
119
76
|
...storybookWebpackConfig.module.rules,
|
|
120
77
|
...finalConfig.module.rules,
|
|
121
78
|
] }), resolve: Object.assign(Object.assign({}, storybookWebpackConfig.resolve), { plugins: (0, merge_plugins_1.mergePlugins)(...((_b = storybookWebpackConfig.resolve.plugins) !== null && _b !== void 0 ? _b : []), ...((_c = finalConfig.resolve
|
|
122
|
-
.plugins) !== null && _c !== void 0 ? _c : [])) }), plugins: (0, merge_plugins_1.mergePlugins)(new webpack_1.DefinePlugin(getClientEnvironment(storybookWebpackConfig.mode).stringified), ...((_d = storybookWebpackConfig.plugins) !== null && _d !== void 0 ? _d : []), ...((_e = finalConfig.plugins) !== null && _e !== void 0 ? _e : [])) })
|
|
79
|
+
.plugins) !== null && _c !== void 0 ? _c : [])) }), plugins: (0, merge_plugins_1.mergePlugins)(new webpack_1.DefinePlugin(getClientEnvironment(storybookWebpackConfig.mode).stringified), ...((_d = storybookWebpackConfig.plugins) !== null && _d !== void 0 ? _d : []), ...((_e = finalConfig.plugins) !== null && _e !== void 0 ? _e : [])) });
|
|
123
80
|
});
|
|
124
81
|
exports.webpack = webpack;
|
|
125
82
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/react/plugins/storybook/index.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/react/plugins/storybook/index.ts"],"names":[],"mappings":";;;;AAAA,yCAAuD;AACvD,2DAAgE;AAEhE,+BAA4B;AAC5B,qCAKiB;AACjB,mDAA+C;AAC/C,8CAA0C;AAE1C,6DAA6D;AAC7D,sIAAsI;AACtI,SAAS,oBAAoB,CAAC,IAAI;IAChC,sFAAsF;IACtF,2EAA2E;IAC3E,MAAM,SAAS,GAAG,OAAO,CAAC;IAC1B,MAAM,gBAAgB,GAAG,cAAc,CAAC;IAExC,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC;SACjC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAClE,MAAM,CACL,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QACX,GAAG,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAC5B,OAAO,GAAG,CAAC;IACb,CA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CAAC,MAAC,WAAW,CAAC,OAAO;iBACrB,OAA8C,mCAAI,EAAE,CAAC,CAC9B,KAE9B,OAAO,EAAE,IAAA,4BAAY,EACnB,IAAI,sBAAY,CACd,oBAAoB,CAAC,sBAAsB,CAAC,IAAI,CAAC,CAAC,WAAW,CAC9D,EACD,GAAG,CAAC,MAAA,sBAAsB,CAAC,OAAO,mCAAI,EAAE,CAAC,EACzC,GAAG,CAAC,MAAA,WAAW,CAAC,OAAO,mCAAI,EAAE,CAAC,CACJ,IAC5B;AACJ,CAAC,CAAA,CAAC;AA9EW,QAAA,OAAO,WA8ElB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { RuleSetRule, WebpackPluginInstance } from 'webpack';
|
|
1
|
+
import { ResolvePluginInstance, RuleSetRule, WebpackPluginInstance } from 'webpack';
|
|
2
2
|
export declare const mergeRules: (...args: RuleSetRule[]) => (RuleSetRule | WebpackPluginInstance)[];
|
|
3
|
-
export declare const mergePlugins: (...args: WebpackPluginInstance[]) => WebpackPluginInstance[];
|
|
3
|
+
export declare const mergePlugins: (...args: (WebpackPluginInstance | ResolvePluginInstance)[]) => (WebpackPluginInstance | ResolvePluginInstance)[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge-plugins.js","sourceRoot":"","sources":["../../../../../packages/react/plugins/storybook/merge-plugins.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"merge-plugins.js","sourceRoot":"","sources":["../../../../../packages/react/plugins/storybook/merge-plugins.ts"],"names":[],"mappings":";;;AAMO,MAAM,UAAU,GAAG,CAAC,GAAG,IAAmB,EAAE,EAAE,CACnD,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;IAC1B,IACE,KAAK,CAAC,IAAI,CACR,CAAC,cAAc,EAAE,EAAE,CACjB,cAAc,CAAC,WAAW,CAAC,IAAI,KAAK,IAAI,CAAC,WAAW,CAAC,IAAI,CAC5D,EACD;QACA,OAAO,KAAK,CAAC;KACd;IACD,OAAO,CAAC,GAAG,KAAK,EAAE,IAAI,CAAC,CAAC;AAC1B,CAAC,EAAE,EAA6B,CAAC,CAAC;AAXvB,QAAA,UAAU,cAWa;AAE7B,MAAM,YAAY,GAAG,CAC1B,GAAG,IAAuD,EACP,EAAE,CACrD,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;IAC9B,IACE,OAAO,CAAC,IAAI,CACV,CAAC,cAAc,EAAE,EAAE,CACjB,cAAc,CAAC,WAAW,CAAC,IAAI,KAAK,MAAM,CAAC,WAAW,CAAC,IAAI,CAC9D,EACD;QACA,OAAO,OAAO,CAAC;KAChB;IACD,OAAO,CAAC,GAAG,OAAO,EAAE,MAAM,CAAC,CAAC;AAC9B,CAAC,EAAE,EAAuD,CAAC,CAAC;AAbjD,QAAA,YAAY,gBAaqC"}
|
|
@@ -75,6 +75,10 @@ function storybookConfigurationGenerator(host, schema) {
|
|
|
75
75
|
tsConfiguration: schema.tsConfiguration,
|
|
76
76
|
configureTestRunner: schema.configureTestRunner,
|
|
77
77
|
bundler,
|
|
78
|
+
storybook7betaConfiguration: schema.storybook7betaConfiguration,
|
|
79
|
+
storybook7UiFramework: bundler === 'vite'
|
|
80
|
+
? '@storybook/react-vite'
|
|
81
|
+
: '@storybook/react-webpack5',
|
|
78
82
|
});
|
|
79
83
|
if (schema.generateStories) {
|
|
80
84
|
yield generateStories(host, schema);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/storybook-configuration/configuration.ts"],"names":[],"mappings":";;;;AACA,gDAAkD;AAClD,yCAOsB;AACtB,mDAAiD;AAEjD,SAAe,eAAe,CAAC,IAAU,EAAE,MAAgC;;QACzE,MAAM,IAAA,sBAAa,EAAC,IAAI,EAAE,eAAe,EAAE,oBAAS,CAAC,CAAC;QACtD,MAAM,EAAE,iBAAiB,EAAE,GAAG,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,CAAC,IAAI,CAAC,MAAM,CAAC,IAAA,0BAAiB,EAAC,aAAa,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,EAC/D;YACA,IAAI,CAAC,KAAK,CACR,IAAA,0BAAiB,EAAC,aAAa,CAAC,IAAI,EAAE,UAAU,CAAC,EACjD,IAAI,CAAC,SAAS,CAAC;gBACb,OAAO,EAAE;oBACP;wBACE,mBAAmB;wBACnB;4BACE,OAAO,EAAE,WAAW;4BACpB,WAAW,EAAE,OAAO;yBACrB;qBACF;iBACF;gBACD,OAAO,EAAE,EAAE;aACZ,CAAC,CACH,CAAC;SACH;QAED,MAAM,WAAW,GAAG,MAAM,sBAAsB,CAAC,IAAI,EAAE;YACrD,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,WAAW,EAAE,kBAAkB;YAC/B,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;YACzC,EAAE,EAAE,MAAM,CAAC,EAAE;YACb,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;YACzC,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;YACzC,eAAe,EAAE,MAAM,CAAC,eAAe;YACvC,mBAAmB,EAAE,MAAM,CAAC,mBAAmB;YAC/C,OAAO;
|
|
1
|
+
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/storybook-configuration/configuration.ts"],"names":[],"mappings":";;;;AACA,gDAAkD;AAClD,yCAOsB;AACtB,mDAAiD;AAEjD,SAAe,eAAe,CAAC,IAAU,EAAE,MAAgC;;QACzE,MAAM,IAAA,sBAAa,EAAC,IAAI,EAAE,eAAe,EAAE,oBAAS,CAAC,CAAC;QACtD,MAAM,EAAE,iBAAiB,EAAE,GAAG,2CAC5B,sCAAsC,EACvC,CAAC;QACF,MAAM,aAAa,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;QAClE,MAAM,cAAc,GAAG,iBAA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EAAC,aAAa,CAAC,IAAI,EAAE,UAAU,CAAC,EACjD,IAAI,CAAC,SAAS,CAAC;gBACb,OAAO,EAAE;oBACP;wBACE,mBAAmB;wBACnB;4BACE,OAAO,EAAE,WAAW;4BACpB,WAAW,EAAE,OAAO;yBACrB;qBACF;iBACF;gBACD,OAAO,EAAE,EAAE;aACZ,CAAC,CACH,CAAC;SACH;QAED,MAAM,WAAW,GAAG,MAAM,sBAAsB,CAAC,IAAI,EAAE;YACrD,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,WAAW,EAAE,kBAAkB;YAC/B,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;YACzC,EAAE,EAAE,MAAM,CAAC,EAAE;YACb,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;YACzC,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;YACzC,eAAe,EAAE,MAAM,CAAC,eAAe;YACvC,mBAAmB,EAAE,MAAM,CAAC,mBAAmB;YAC/C,OAAO;YACP,2BAA2B,EAAE,MAAM,CAAC,2BAA2B;YAC/D,qBAAqB,EACnB,OAAO,KAAK,MAAM;gBAChB,CAAC,CAAC,uBAAuB;gBACzB,CAAC,CAAC,2BAA2B;SAClC,CAAC,CAAC;QAEH,IAAI,MAAM,CAAC,eAAe,EAAE;YAC1B,MAAM,eAAe,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;SACrC;QAED,OAAO,WAAW,CAAC;;CACpB;AAlFD,0EAkFC;AAED,kBAAe,+BAA+B,CAAC;AAClC,QAAA,+BAA+B,GAAG,IAAA,2BAAkB,EAC/D,+BAA+B,CAChC,CAAC"}
|
|
@@ -86,6 +86,12 @@
|
|
|
86
86
|
"description": "The Storybook builder to use.",
|
|
87
87
|
"enum": ["vite", "webpack"],
|
|
88
88
|
"x-priority": "important"
|
|
89
|
+
},
|
|
90
|
+
"storybook7betaConfiguration": {
|
|
91
|
+
"description": "Configure your workspace to use Storybook 7, even though Storybook v7 is still in beta.",
|
|
92
|
+
"type": "boolean",
|
|
93
|
+
"default": false,
|
|
94
|
+
"hidden": true
|
|
89
95
|
}
|
|
90
96
|
},
|
|
91
97
|
"required": ["name"],
|