@web/storybook-builder 0.2.2 → 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 +12 -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/dist/rollup-plugin-mdx.d.ts.map +1 -1
- package/dist/rollup-plugin-mdx.js +25 -2
- package/dist/rollup-plugin-mdx.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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rollup-plugin-mdx.d.ts","sourceRoot":"","sources":["../src/rollup-plugin-mdx.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rollup-plugin-mdx.d.ts","sourceRoot":"","sources":["../src/rollup-plugin-mdx.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAKhD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAsDxD"}
|
|
@@ -1,10 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
27
|
};
|
|
5
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
29
|
exports.rollupPluginMdx = void 0;
|
|
7
|
-
const mdx_1 = require("@mdx-js/mdx");
|
|
8
30
|
const promises_1 = require("node:fs/promises");
|
|
9
31
|
const node_path_1 = require("node:path");
|
|
10
32
|
const rehype_external_links_1 = __importDefault(require("rehype-external-links"));
|
|
@@ -39,7 +61,8 @@ function rollupPluginMdx(options) {
|
|
|
39
61
|
rehype_slug_1.default,
|
|
40
62
|
rehype_external_links_1.default,
|
|
41
63
|
] }), jsxOptions }));
|
|
42
|
-
const
|
|
64
|
+
const { compile } = await Promise.resolve().then(() => __importStar(require('@mdx-js/mdx'))); // for CJS compatibility
|
|
65
|
+
const mdxResult = await compile(mdxCode, mdxLoaderOptions.mdxCompileOptions);
|
|
43
66
|
return mdxResult.toString();
|
|
44
67
|
},
|
|
45
68
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rollup-plugin-mdx.js","sourceRoot":"","sources":["../src/rollup-plugin-mdx.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rollup-plugin-mdx.js","sourceRoot":"","sources":["../src/rollup-plugin-mdx.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,+CAA4C;AAC5C,yCAA+C;AAC/C,kFAAwD;AACxD,8DAAqC;AAGrC,SAAgB,eAAe,CAAC,OAAgB;IAC9C,IAAI,gBAAqC,CAAC;IAC1C,IAAI,UAA+B,CAAC;IAEpC,OAAO;QACL,IAAI,EAAE,mBAAmB;QAEzB,KAAK,CAAC,UAAU;YACd,CAAC,EAAE,gBAAgB,EAAE,UAAU,EAAE,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,KAAK,CAC7D,SAAS,EACT,EAAE,CACH,CAAC,CAAC;QACL,CAAC;QAED,KAAK,CAAC,SAAS,CAAC,EAAE;YAChB,IAAI,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;gBAC1B,OAAO,EAAE,CAAC;aACX;QACH,CAAC;QAED,KAAK,CAAC,IAAI,CAAC,EAAU;;YACnB,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC;gBAAE,OAAO;YAEpC,MAAM,OAAO,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YACxC,MAAM,OAAO,GAAG,MAAM,IAAA,mBAAQ,EAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,eAAG,CAAC,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;YAEnF,MAAM,gBAAgB,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,kBAAkB,kCAClE,gBAAgB,KACnB,iBAAiB;oBACf,mDAAmD;oBACnD,8GAA8G;oBAC9G,6FAA6F;oBAC7F,mGAAmG;oBACnG,0CAA0C;oBAC1C,oBAAoB,EAAE,IAAA,gBAAI,EACxB,IAAA,mBAAO,EAAC,OAAO,CAAC,OAAO,CAAC,oCAAoC,CAAC,CAAC,EAC9D,gCAAgC,CACjC,IACE,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,iBAAiB,KACtC,aAAa,EAAE;wBACb,GAAG,CAAC,MAAA,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,iBAAiB,0CAAE,aAAa,mCAAI,EAAE,CAAC;wBAC7D,qBAAU;wBACV,+BAAmB;qBACpB,KAEH,UAAU,IACV,CAAC;YAEH,MAAM,EAAE,OAAO,EAAE,GAAG,wDAAa,aAAa,GAAC,CAAC,CAAC,wBAAwB;YACzE,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,OAAO,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;YAE7E,OAAO,SAAS,CAAC,QAAQ,EAAE,CAAC;QAC9B,CAAC;KACF,CAAC;AACJ,CAAC;AAtDD,0CAsDC"}
|
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",
|