@analogjs/storybook-angular 1.20.1 → 1.20.2-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/README.md CHANGED
@@ -89,6 +89,29 @@ To register global styles, add them to the `@analogjs/storybook-angular` builder
89
89
  }
90
90
  ```
91
91
 
92
+ ## Setting up Static Assets
93
+
94
+ Static assets are configured in the `.storybook/main.ts` file using the `staticDirs` array.
95
+
96
+ The example below shows how to add the `public` directory from `src/public` relative to the `.storybook/main.ts` file.
97
+
98
+ ```ts
99
+ import { StorybookConfig } from '@analogjs/storybook-angular';
100
+
101
+ const config: StorybookConfig = {
102
+ // other config, addons, etc.
103
+ framework: {
104
+ name: '@analogjs/storybook-angular',
105
+ options: {},
106
+ },
107
+ staticDirs: ['../public'],
108
+ };
109
+
110
+ export default config;
111
+ ```
112
+
113
+ See the [Storybook docs on images and assets](https://storybook.js.org/docs/configure/integration/images-and-assets) for more information.
114
+
92
115
  ## Running Storybook
93
116
 
94
117
  Run the command for starting the development server.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@analogjs/storybook-angular",
3
- "version": "1.20.1",
3
+ "version": "1.20.2-beta.1",
4
4
  "description": "Storybook Integration for Angular & Vite",
5
5
  "keywords": [
6
6
  "storybook",
@@ -38,12 +38,12 @@
38
38
  },
39
39
  "main": "src/index.js",
40
40
  "dependencies": {
41
- "@storybook/builder-vite": ">=8.6.0 || ^9.0.0 || next"
41
+ "@storybook/builder-vite": ">=8.6.0 || ^9.0.0"
42
42
  },
43
43
  "peerDependencies": {
44
- "@storybook/angular": ">=8.6.0 || ^9.0.0 || next",
44
+ "@storybook/angular": ">=8.6.0 || ^9.0.0",
45
45
  "@analogjs/vite-plugin-angular": "*",
46
- "storybook": ">=8.6.0 || ^9.0.0 || next",
46
+ "storybook": ">=8.6.0 || ^9.0.0",
47
47
  "vite": "^5.0.0 || ^6.0.0 || ^7.0.0"
48
48
  },
49
49
  "engines": {
package/preset.mjs CHANGED
@@ -73,12 +73,15 @@ function angularOptionsPlugin(options, { normalizePath }) {
73
73
  config() {
74
74
  const loadPaths =
75
75
  options?.angularBuilderOptions?.stylePreprocessorOptions?.loadPaths;
76
+ const sassOptions =
77
+ options?.angularBuilderOptions?.stylePreprocessorOptions?.sass;
76
78
 
77
79
  if (Array.isArray(loadPaths)) {
78
80
  return {
79
81
  css: {
80
82
  preprocessorOptions: {
81
83
  scss: {
84
+ ...sassOptions,
82
85
  loadPaths: loadPaths.map(
83
86
  (loadPath) =>
84
87
  `${resolve(options.angularBuilderContext.workspaceRoot, loadPath)}`,
@@ -88,6 +88,34 @@
88
88
  "items": {
89
89
  "type": "string"
90
90
  }
91
+ },
92
+ "sass": {
93
+ "description": "Options to pass to the sass preprocessor.",
94
+ "type": "object",
95
+ "properties": {
96
+ "fatalDeprecations": {
97
+ "description": "A set of deprecations to treat as fatal. If a deprecation warning of any provided type is encountered during compilation, the compiler will error instead. If a Version is provided, then all deprecations that were active in that compiler version will be treated as fatal.",
98
+ "type": "array",
99
+ "items": {
100
+ "type": "string"
101
+ }
102
+ },
103
+ "silenceDeprecations": {
104
+ "description": " A set of active deprecations to ignore. If a deprecation warning of any provided type is encountered during compilation, the compiler will ignore it instead.",
105
+ "type": "array",
106
+ "items": {
107
+ "type": "string"
108
+ }
109
+ },
110
+ "futureDeprecations": {
111
+ "description": "A set of future deprecations to opt into early. Future deprecations passed here will be treated as active by the compiler, emitting warnings as necessary.",
112
+ "type": "array",
113
+ "items": {
114
+ "type": "string"
115
+ }
116
+ }
117
+ },
118
+ "additionalProperties": false
91
119
  }
92
120
  },
93
121
  "additionalProperties": false
@@ -124,6 +124,34 @@
124
124
  "items": {
125
125
  "type": "string"
126
126
  }
127
+ },
128
+ "sass": {
129
+ "description": "Options to pass to the sass preprocessor.",
130
+ "type": "object",
131
+ "properties": {
132
+ "fatalDeprecations": {
133
+ "description": "A set of deprecations to treat as fatal. If a deprecation warning of any provided type is encountered during compilation, the compiler will error instead. If a Version is provided, then all deprecations that were active in that compiler version will be treated as fatal.",
134
+ "type": "array",
135
+ "items": {
136
+ "type": "string"
137
+ }
138
+ },
139
+ "silenceDeprecations": {
140
+ "description": " A set of active deprecations to ignore. If a deprecation warning of any provided type is encountered during compilation, the compiler will ignore it instead.",
141
+ "type": "array",
142
+ "items": {
143
+ "type": "string"
144
+ }
145
+ },
146
+ "futureDeprecations": {
147
+ "description": "A set of future deprecations to opt into early. Future deprecations passed here will be treated as active by the compiler, emitting warnings as necessary.",
148
+ "type": "array",
149
+ "items": {
150
+ "type": "string"
151
+ }
152
+ }
153
+ },
154
+ "additionalProperties": false
127
155
  }
128
156
  },
129
157
  "additionalProperties": false