@storybook/ember 8.0.0-alpha.8 → 8.0.0-beta.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/preset.d.ts +2 -1
- package/dist/preset.js +32 -1
- package/dist/preset.mjs +30 -0
- package/dist/server/framework-preset-babel-ember.d.ts +2 -2
- package/dist/server/framework-preset-babel-ember.js +0 -1
- package/package.json +8 -6
- package/dist/client/preview/index.d.ts +0 -1
- package/dist/client/preview/index.js +0 -3
package/dist/preset.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import type { PresetProperty } from '@storybook/types';
|
2
2
|
import type { StorybookConfig } from './types';
|
3
3
|
export declare const addons: PresetProperty<'addons'>;
|
4
|
-
export declare const
|
4
|
+
export declare const webpackFinal: StorybookConfig['webpackFinal'];
|
5
|
+
export declare const core: PresetProperty<'core'>;
|
package/dist/preset.js
CHANGED
@@ -1,12 +1,43 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.core = exports.addons = void 0;
|
3
|
+
exports.core = exports.webpackFinal = exports.addons = void 0;
|
4
4
|
const path_1 = require("path");
|
5
|
+
const builder_webpack5_1 = require("@storybook/builder-webpack5");
|
6
|
+
const core_common_1 = require("@storybook/core-common");
|
5
7
|
const getAbsolutePath = (input) => (0, path_1.dirname)(require.resolve((0, path_1.join)(input, 'package.json')));
|
6
8
|
exports.addons = [
|
7
9
|
require.resolve('./server/framework-preset-babel-ember'),
|
8
10
|
require.resolve('./server/framework-preset-ember-docs'),
|
9
11
|
];
|
12
|
+
const webpackFinal = async (baseConfig, options) => {
|
13
|
+
const { virtualModules } = await (0, builder_webpack5_1.getVirtualModules)(options);
|
14
|
+
const babelOptions = await options.presets.apply('babel', {}, options);
|
15
|
+
const typescriptOptions = await options.presets.apply('typescript', {}, options);
|
16
|
+
return {
|
17
|
+
...baseConfig,
|
18
|
+
module: {
|
19
|
+
...baseConfig.module,
|
20
|
+
rules: [
|
21
|
+
...(baseConfig.module?.rules ?? []),
|
22
|
+
{
|
23
|
+
test: typescriptOptions.skipCompiler ? /\.((c|m)?jsx?)$/ : /\.((c|m)?(j|t)sx?)$/,
|
24
|
+
use: [
|
25
|
+
{
|
26
|
+
loader: require.resolve('babel-loader'),
|
27
|
+
options: {
|
28
|
+
cacheDirectory: (0, core_common_1.resolvePathInStorybookCache)('babel'),
|
29
|
+
...babelOptions,
|
30
|
+
},
|
31
|
+
},
|
32
|
+
],
|
33
|
+
include: [(0, core_common_1.getProjectRoot)()],
|
34
|
+
exclude: [/node_modules/, ...Object.keys(virtualModules)],
|
35
|
+
},
|
36
|
+
],
|
37
|
+
},
|
38
|
+
};
|
39
|
+
};
|
40
|
+
exports.webpackFinal = webpackFinal;
|
10
41
|
const core = async (config, options) => {
|
11
42
|
const framework = await options.presets.apply('framework');
|
12
43
|
return {
|
package/dist/preset.mjs
CHANGED
@@ -1,9 +1,39 @@
|
|
1
1
|
import { dirname, join } from 'path';
|
2
|
+
import { getVirtualModules } from '@storybook/builder-webpack5';
|
3
|
+
import { getProjectRoot, resolvePathInStorybookCache } from '@storybook/core-common';
|
2
4
|
const getAbsolutePath = (input) => dirname(require.resolve(join(input, 'package.json')));
|
3
5
|
export const addons = [
|
4
6
|
require.resolve('./server/framework-preset-babel-ember'),
|
5
7
|
require.resolve('./server/framework-preset-ember-docs'),
|
6
8
|
];
|
9
|
+
export const webpackFinal = async (baseConfig, options) => {
|
10
|
+
const { virtualModules } = await getVirtualModules(options);
|
11
|
+
const babelOptions = await options.presets.apply('babel', {}, options);
|
12
|
+
const typescriptOptions = await options.presets.apply('typescript', {}, options);
|
13
|
+
return {
|
14
|
+
...baseConfig,
|
15
|
+
module: {
|
16
|
+
...baseConfig.module,
|
17
|
+
rules: [
|
18
|
+
...(baseConfig.module?.rules ?? []),
|
19
|
+
{
|
20
|
+
test: typescriptOptions.skipCompiler ? /\.((c|m)?jsx?)$/ : /\.((c|m)?(j|t)sx?)$/,
|
21
|
+
use: [
|
22
|
+
{
|
23
|
+
loader: require.resolve('babel-loader'),
|
24
|
+
options: {
|
25
|
+
cacheDirectory: resolvePathInStorybookCache('babel'),
|
26
|
+
...babelOptions,
|
27
|
+
},
|
28
|
+
},
|
29
|
+
],
|
30
|
+
include: [getProjectRoot()],
|
31
|
+
exclude: [/node_modules/, ...Object.keys(virtualModules)],
|
32
|
+
},
|
33
|
+
],
|
34
|
+
},
|
35
|
+
};
|
36
|
+
};
|
7
37
|
export const core = async (config, options) => {
|
8
38
|
const framework = await options.presets.apply('framework');
|
9
39
|
return {
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import type { PresetProperty } from '@storybook/types';
|
2
|
-
export declare const babel:
|
1
|
+
import type { PresetProperty, PresetPropertyFn } from '@storybook/types';
|
2
|
+
export declare const babel: PresetPropertyFn<'babel'>;
|
3
3
|
export declare const previewAnnotations: PresetProperty<'previewAnnotations'>;
|
@@ -17,7 +17,6 @@ const babel = (config, options) => {
|
|
17
17
|
if (e.preset && e.preset.emberOptions) {
|
18
18
|
emberOptions = e.preset.emberOptions;
|
19
19
|
if (options.presetsList) {
|
20
|
-
// eslint-disable-next-line no-param-reassign
|
21
20
|
delete options.presetsList[index].preset.emberOptions;
|
22
21
|
}
|
23
22
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@storybook/ember",
|
3
|
-
"version": "8.0.0-
|
3
|
+
"version": "8.0.0-beta.0",
|
4
4
|
"description": "Storybook for Ember: Develop Ember Component in isolation with Hot Reloading.",
|
5
5
|
"homepage": "https://github.com/storybookjs/storybook/tree/next/code/frameworks/ember",
|
6
6
|
"bugs": {
|
@@ -32,16 +32,18 @@
|
|
32
32
|
"prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/tsc.ts"
|
33
33
|
},
|
34
34
|
"dependencies": {
|
35
|
-
"@storybook/builder-webpack5": "8.0.0-
|
36
|
-
"@storybook/core-common": "8.0.0-
|
37
|
-
"@storybook/docs-tools": "8.0.0-
|
35
|
+
"@storybook/builder-webpack5": "8.0.0-beta.0",
|
36
|
+
"@storybook/core-common": "8.0.0-beta.0",
|
37
|
+
"@storybook/docs-tools": "8.0.0-beta.0",
|
38
38
|
"@storybook/global": "^5.0.0",
|
39
|
-
"@storybook/preview-api": "8.0.0-
|
40
|
-
"@storybook/types": "8.0.0-
|
39
|
+
"@storybook/preview-api": "8.0.0-beta.0",
|
40
|
+
"@storybook/types": "8.0.0-beta.0",
|
41
|
+
"babel-loader": "9.1.3",
|
41
42
|
"find-up": "^5.0.0",
|
42
43
|
"ts-dedent": "^2.0.0"
|
43
44
|
},
|
44
45
|
"devDependencies": {
|
46
|
+
"@types/babel__preset-env": "^7",
|
45
47
|
"ember-source": "~3.28.1",
|
46
48
|
"typescript": "^5.3.2"
|
47
49
|
},
|
@@ -1 +0,0 @@
|
|
1
|
-
import './globals';
|