@web/storybook-builder 0.2.3 → 0.2.4
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 +6 -0
- package/dist/list-stories.d.ts.map +1 -1
- package/dist/list-stories.js +6 -3
- package/dist/list-stories.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-stories.d.ts","sourceRoot":"","sources":["../src/list-stories.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"list-stories.d.ts","sourceRoot":"","sources":["../src/list-stories.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAOhD,wBAAsB,WAAW,CAAC,OAAO,EAAE,OAAO,qBAqBjD"}
|
package/dist/list-stories.js
CHANGED
|
@@ -26,8 +26,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
26
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
27
|
exports.listStories = void 0;
|
|
28
28
|
const core_common_1 = require("@storybook/core-common");
|
|
29
|
-
const
|
|
29
|
+
const glob_1 = require("glob");
|
|
30
30
|
const node_path_1 = require("node:path");
|
|
31
|
+
const excludeNodeModulesGlobOptions = (glob) => /node_modules/.test(glob) ? {} : { ignore: ['**/node_modules/**'] };
|
|
31
32
|
async function listStories(options) {
|
|
32
33
|
const slash = (await Promise.resolve().then(() => __importStar(require('slash')))).default; // for CJS compatibility
|
|
33
34
|
return (await Promise.all((0, core_common_1.normalizeStories)(await options.presets.apply('stories', [], options), {
|
|
@@ -36,8 +37,10 @@ async function listStories(options) {
|
|
|
36
37
|
}).map(({ directory, files }) => {
|
|
37
38
|
const pattern = (0, node_path_1.join)(directory, files);
|
|
38
39
|
const absolutePattern = (0, node_path_1.isAbsolute)(pattern) ? pattern : (0, node_path_1.join)(options.configDir, pattern);
|
|
39
|
-
return (0,
|
|
40
|
-
})))
|
|
40
|
+
return (0, glob_1.glob)(slash(absolutePattern), Object.assign(Object.assign({}, excludeNodeModulesGlobOptions(absolutePattern)), { follow: true }));
|
|
41
|
+
})))
|
|
42
|
+
.reduce((carry, stories) => carry.concat(stories.map(slash)), [])
|
|
43
|
+
.sort();
|
|
41
44
|
}
|
|
42
45
|
exports.listStories = listStories;
|
|
43
46
|
//# sourceMappingURL=list-stories.js.map
|
package/dist/list-stories.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-stories.js","sourceRoot":"","sources":["../src/list-stories.ts"],"names":[],"mappings":";AAAA,+GAA+G;;;;;;;;;;;;;;;;;;;;;;;;;;AAE/G,wDAA0D;AAE1D,+
|
|
1
|
+
{"version":3,"file":"list-stories.js","sourceRoot":"","sources":["../src/list-stories.ts"],"names":[],"mappings":";AAAA,+GAA+G;;;;;;;;;;;;;;;;;;;;;;;;;;AAE/G,wDAA0D;AAE1D,+BAA4B;AAC5B,yCAA6C;AAE7C,MAAM,6BAA6B,GAAG,CAAC,IAAY,EAAE,EAAE,CACrD,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,oBAAoB,CAAC,EAAE,CAAC;AAE/D,KAAK,UAAU,WAAW,CAAC,OAAgB;IAChD,MAAM,KAAK,GAAG,CAAC,wDAAa,OAAO,GAAC,CAAC,CAAC,OAAO,CAAC,CAAC,wBAAwB;IAEvE,OAAO,CACL,MAAM,OAAO,CAAC,GAAG,CACf,IAAA,8BAAgB,EAAC,MAAM,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,EAAE,EAAE,EAAE,OAAO,CAAC,EAAE;QACpE,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,UAAU,EAAE,OAAO,CAAC,SAAS;KAC9B,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE;QAC9B,MAAM,OAAO,GAAG,IAAA,gBAAI,EAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QACvC,MAAM,eAAe,GAAG,IAAA,sBAAU,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAA,gBAAI,EAAC,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAEzF,OAAO,IAAA,WAAI,EAAC,KAAK,CAAC,eAAe,CAAC,kCAC7B,6BAA6B,CAAC,eAAe,CAAC,KACjD,MAAM,EAAE,IAAI,IACZ,CAAC;IACL,CAAC,CAAC,CACH,CACF;SACE,MAAM,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC;SAChE,IAAI,EAAE,CAAC;AACZ,CAAC;AArBD,kCAqBC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@web/storybook-builder",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"cjs-module-lexer": "^1.2.3",
|
|
64
64
|
"es-module-lexer": "^1.2.1",
|
|
65
65
|
"esbuild": "^0.25.0",
|
|
66
|
-
"glob
|
|
66
|
+
"glob": "^12.0.0",
|
|
67
67
|
"lodash-es": "^4.17.21",
|
|
68
68
|
"path-browserify": "^1.0.1",
|
|
69
69
|
"rehype-external-links": "^3.0.0",
|