@vueless/storybook 1.8.1 → 1.8.2-beta.0
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/package.json +1 -1
- package/webTypes/index.js +1 -1
- package/webTypes/lib/build.js +3 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vueless/storybook",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.2-beta.0",
|
|
4
4
|
"description": "Simplifies Storybook configuration for Vueless UI library.",
|
|
5
5
|
"author": "Johnny Grid <hello@vueless.com> (https://vueless.com)",
|
|
6
6
|
"homepage": "https://vueless.com",
|
package/webTypes/index.js
CHANGED
package/webTypes/lib/build.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import { readFile } from "node:fs/promises";
|
|
3
|
+
import { readFile, writeFile } from "node:fs/promises";
|
|
4
4
|
import { mkdirp } from "mkdirp";
|
|
5
5
|
import chokidar from "chokidar";
|
|
6
6
|
import { globbySync } from "globby";
|
|
@@ -32,7 +32,7 @@ export default async function build(config, vuelessConfig, srcDir) {
|
|
|
32
32
|
|
|
33
33
|
function getSources(components, cwd) {
|
|
34
34
|
const watcher = chokidar.watch(components, { cwd });
|
|
35
|
-
const allComponentFiles = globbySync(components, { cwd });
|
|
35
|
+
const allComponentFiles = globbySync(components, { cwd, ignore: ["**/tests/**"] });
|
|
36
36
|
|
|
37
37
|
return { watcher, componentFiles: allComponentFiles };
|
|
38
38
|
}
|
|
@@ -66,7 +66,6 @@ async function writeDownWebTypesFile(config, definitions, destFilePath) {
|
|
|
66
66
|
const destFolder = path.dirname(destFilePath);
|
|
67
67
|
|
|
68
68
|
await mkdirp(destFolder);
|
|
69
|
-
let writeStream = fs.createWriteStream(destFilePath);
|
|
70
69
|
|
|
71
70
|
const contents = {
|
|
72
71
|
framework: "vue",
|
|
@@ -98,8 +97,7 @@ async function writeDownWebTypesFile(config, definitions, destFilePath) {
|
|
|
98
97
|
if (!html.attributes?.length) html.attributes = undefined;
|
|
99
98
|
if (!html["vue-filters"]?.length) html["vue-filters"] = undefined;
|
|
100
99
|
|
|
101
|
-
|
|
102
|
-
writeStream.close();
|
|
100
|
+
await writeFile(destFilePath, JSON.stringify(contents, null, 2));
|
|
103
101
|
}
|
|
104
102
|
|
|
105
103
|
function ensureRelative(path) {
|