vueless 1.1.1-beta.62 → 1.1.1-beta.64
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/bin/commands/init.js +10 -10
- package/package.json +1 -1
- package/utils/node/storybook.d.ts +1 -1
- package/utils/node/storybook.js +7 -3
package/bin/commands/init.js
CHANGED
|
@@ -45,10 +45,19 @@ export async function vuelessInit(options) {
|
|
|
45
45
|
ext: fileExt,
|
|
46
46
|
});
|
|
47
47
|
|
|
48
|
+
/* Backup existing config if it exists. */
|
|
49
|
+
await backupVuelessConfig(destPath);
|
|
50
|
+
|
|
51
|
+
/* Create a default config file. */
|
|
52
|
+
await createVuelessConfig(destPath);
|
|
53
|
+
|
|
54
|
+
/* Create a vueless config directory and index file. */
|
|
55
|
+
await createVuelessConfigDir(fileExt);
|
|
56
|
+
|
|
48
57
|
/* Create pnpm package manager config. */
|
|
49
58
|
if (options.includes("--pnpm")) {
|
|
50
59
|
await createPackageManagerConfig(".npmrc", [
|
|
51
|
-
"#
|
|
60
|
+
"# pnpm",
|
|
52
61
|
"# Vueless: disable hoisting for the package related modules.",
|
|
53
62
|
"public-hoist-pattern[] = tailwindcss",
|
|
54
63
|
"public-hoist-pattern[] = *storybook*",
|
|
@@ -64,15 +73,6 @@ export async function vuelessInit(options) {
|
|
|
64
73
|
"nodeLinker: node-modules",
|
|
65
74
|
]);
|
|
66
75
|
}
|
|
67
|
-
|
|
68
|
-
/* Backup existing config if it exists. */
|
|
69
|
-
await backupVuelessConfig(destPath);
|
|
70
|
-
|
|
71
|
-
/* Create a default config file. */
|
|
72
|
-
await createVuelessConfig(destPath);
|
|
73
|
-
|
|
74
|
-
/* Create a vueless config directory and index file. */
|
|
75
|
-
await createVuelessConfigDir(fileExt);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vueless",
|
|
3
|
-
"version": "1.1.1-beta.
|
|
3
|
+
"version": "1.1.1-beta.64",
|
|
4
4
|
"description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
|
|
5
5
|
"author": "Johnny Grid <hello@vueless.com> (https://vueless.com)",
|
|
6
6
|
"homepage": "https://vueless.com",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export function defineConfigWithVueless(config: Object): Promise<Object>;
|
|
2
|
-
export function getVuelessStoriesGlob(vuelessEnv: string): Promise<string[]>;
|
|
2
|
+
export function getVuelessStoriesGlob(vuelessEnv: string, basePath: string): Promise<string[]>;
|
package/utils/node/storybook.js
CHANGED
|
@@ -17,7 +17,10 @@ import {
|
|
|
17
17
|
export function defineConfigWithVueless(config) {
|
|
18
18
|
return (async () => ({
|
|
19
19
|
...config,
|
|
20
|
-
stories: [
|
|
20
|
+
stories: [
|
|
21
|
+
...config.stories,
|
|
22
|
+
...(await getVuelessStoriesGlob(config?.vuelessEnv, config?.basePath)),
|
|
23
|
+
],
|
|
21
24
|
addons: [
|
|
22
25
|
...new Set([
|
|
23
26
|
...(config.addons || []),
|
|
@@ -49,11 +52,12 @@ export function defineConfigWithVueless(config) {
|
|
|
49
52
|
* Retrieves the glob pattern for Vueless stories based on the provided Vueless environment.
|
|
50
53
|
*
|
|
51
54
|
* @param {string} vuelessEnv - The Vueless environment.
|
|
55
|
+
* @param {string} basePath - The Project base path.
|
|
52
56
|
* @return {Promise<string[]>} A promise that resolves to an array of glob patterns for Vueless stories.
|
|
53
57
|
*/
|
|
54
|
-
export async function getVuelessStoriesGlob(vuelessEnv) {
|
|
58
|
+
export async function getVuelessStoriesGlob(vuelessEnv, basePath) {
|
|
55
59
|
/* Auto import user configs. */
|
|
56
|
-
await autoImportUserConfigs();
|
|
60
|
+
await autoImportUserConfigs(basePath);
|
|
57
61
|
|
|
58
62
|
const vuelessSrcDir = vuelessEnv === INTERNAL_ENV ? VUELESS_LOCAL_DIR : VUELESS_PACKAGE_DIR;
|
|
59
63
|
const vuelessConfig = await getVuelessConfig();
|