Skip to content

Commit e453750

Browse files
committed
docs(soba): update storybook config
1 parent 3fcd150 commit e453750

File tree

4 files changed

+19
-49
lines changed

4 files changed

+19
-49
lines changed

libs/soba/.storybook/main.ts

Lines changed: 6 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,11 @@
11
import { StorybookConfig } from '@storybook/angular';
2-
import { StorybookConfigVite } from '@storybook/builder-vite';
3-
import { UserConfig } from 'vite';
42

5-
const config: StorybookConfig & StorybookConfigVite = {
6-
stories: ['../**/*.mdx', '../**/*.stories.@(js|ts)'],
7-
addons: ['@storybook/addon-essentials', 'storybook-addon-deep-controls', '@chromatic-com/storybook'],
8-
9-
async viteFinal(config: UserConfig) {
10-
// Merge custom configuration into the default config
11-
const { mergeConfig } = await import('vite');
12-
const { default: angular } = await import('@analogjs/vite-plugin-angular');
13-
const { nxViteTsPaths } = await import('@nx/vite/plugins/nx-tsconfig-paths.plugin');
14-
15-
return mergeConfig(config, {
16-
// Add dependencies to pre-optimization
17-
optimizeDeps: {
18-
include: [
19-
'@storybook/angular',
20-
'@storybook/angular/dist/client',
21-
'@angular/compiler',
22-
'@mdx-js/react',
23-
'@storybook/blocks',
24-
'tslib',
25-
],
26-
},
27-
plugins: [angular({ jit: true, tsconfig: './.storybook/tsconfig.json' }), nxViteTsPaths()],
28-
});
29-
},
30-
31-
staticDirs: ['./public', './public/cube'],
32-
33-
framework: {
34-
name: '@storybook/angular',
35-
options: {
36-
builder: {
37-
viteConfigPath: undefined
38-
}
39-
},
40-
},
41-
42-
docs: {}
3+
const config: StorybookConfig = {
4+
stories: ['../**/*.mdx', '../**/*.stories.@(js|ts)'],
5+
addons: ['@storybook/addon-essentials', 'storybook-addon-deep-controls', '@chromatic-com/storybook'],
6+
staticDirs: ['./public', './public/cube'],
7+
framework: '@storybook/angular',
8+
docs: {},
439
};
4410

4511
export default config;

libs/soba/.storybook/preview.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ export default {
99
page: DocumentationTemplate,
1010
},
1111
},
12-
tags: ['autodocs', 'autodocs'],
12+
tags: ['autodocs'],
1313
} as Preview;

libs/soba/project.json

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,26 @@
3030
"outputs": ["{options.outputFile}"]
3131
},
3232
"storybook": {
33-
"executor": "nx:run-commands",
33+
"executor": "@storybook/angular:start-storybook",
3434
"options": {
35-
"cwd": "libs/soba",
36-
"command": "storybook dev --port 4400"
35+
"port": 4400,
36+
"compodoc": false,
37+
"configDir": "libs/soba/.storybook",
38+
"browserTarget": "soba:build:development"
3739
}
3840
},
3941
"build-storybook": {
40-
"executor": "nx:run-commands",
42+
"executor": "@storybook/angular:build-storybook",
4143
"outputs": ["{options.outputDir}"],
4244
"options": {
43-
"cwd": "libs/soba",
44-
"command": "storybook build --output-dir ../../dist/storybook/soba"
45+
"compodoc": false,
46+
"configDir": "libs/soba/.storybook",
47+
"outputDir": "dist/storybook/soba",
48+
"browserTarget": "soba:build:production"
4549
},
4650
"configurations": {
4751
"ci": {
48-
"command": "storybook build --output-dir ../../dist/storybook/soba --quiet"
52+
"quiet": true
4953
}
5054
}
5155
},

libs/soba/src/staging/accumulative-shadows.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
NgtsRandomizedLights,
1111
} from 'angular-three-soba/staging';
1212
import { CanvasTexture, MeshStandardMaterial, RepeatWrapping, UVMapping } from 'three';
13-
import { FlakesTexture } from 'three/examples/jsm/textures/FlakesTexture';
13+
import { FlakesTexture } from 'three/examples/jsm/textures/FlakesTexture.js';
1414
import { color, makeDecorators, makeStoryObject } from '../setup-canvas';
1515

1616
@Component({

0 commit comments

Comments
 (0)