@vueless/storybook 0.0.3 → 0.0.5
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/.eslintignore +5 -0
- package/.eslintrc.cjs +34 -0
- package/.storybook/configs/main.config.js +1 -1
- package/.storybook/decorators/vue3SourceDecorator.js +1 -1
- package/.storybook/index.pcss +0 -2
- package/.storybook/main.js +1 -6
- package/.storybook/preview.js +6 -14
- package/.storybook/themes/vueless.docs.theme.js +1 -1
- package/.storybook/themes/vueless.theme.js +2 -2
- package/package.json +8 -4
package/.eslintignore
ADDED
package/.eslintrc.cjs
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
root: true,
|
|
3
|
+
env: {
|
|
4
|
+
node: true,
|
|
5
|
+
browser: true,
|
|
6
|
+
es2020: true,
|
|
7
|
+
},
|
|
8
|
+
extends: [
|
|
9
|
+
"eslint:recommended",
|
|
10
|
+
"plugin:prettier/recommended",
|
|
11
|
+
],
|
|
12
|
+
rules: {
|
|
13
|
+
"no-console": "warn",
|
|
14
|
+
"no-debugger": "warn",
|
|
15
|
+
"arrow-parens": ["error", "always"],
|
|
16
|
+
curly: ["error", "multi-line"],
|
|
17
|
+
"padding-line-between-statements": [
|
|
18
|
+
"error",
|
|
19
|
+
{ blankLine: "always", prev: ["const", "let", "var"], next: "*" },
|
|
20
|
+
{ blankLine: "any", prev: ["const", "let", "var"], next: ["const", "let", "var"] },
|
|
21
|
+
{ blankLine: "always", prev: "directive", next: "*" },
|
|
22
|
+
{ blankLine: "any", prev: "directive", next: "directive" },
|
|
23
|
+
{ blankLine: "always", prev: "block-like", next: "*" },
|
|
24
|
+
{ blankLine: "always", prev: "*", next: "block-like" },
|
|
25
|
+
{ blankLine: "always", prev: "*", next: "return" },
|
|
26
|
+
],
|
|
27
|
+
"prettier/prettier": ["warn", { printWidth: 100, tabWidth: 2 }],
|
|
28
|
+
},
|
|
29
|
+
parserOptions: {
|
|
30
|
+
module: "esnext",
|
|
31
|
+
sourceType: "module",
|
|
32
|
+
ecmaVersion: "latest",
|
|
33
|
+
},
|
|
34
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { addons, makeDecorator } from "@storybook/preview-api";
|
|
2
2
|
import { h, onMounted, watch } from "vue";
|
|
3
|
-
import { setBrandColor } from "vueless/service.ui";
|
|
3
|
+
import { setBrandColor } from "vueless/src/service.ui";
|
|
4
4
|
|
|
5
5
|
export const vue3SourceDecorator = makeDecorator({
|
|
6
6
|
name: "vue3SourceDecorator",
|
package/.storybook/index.pcss
CHANGED
package/.storybook/main.js
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
/** @type { import('@storybook/vue3-vite').StorybookConfig } */
|
|
2
2
|
export default {
|
|
3
|
-
stories: [
|
|
4
|
-
"../node_modules/vueless/**/*.stories.@(js|jsx|ts|tsx)",
|
|
5
|
-
"../node_modules/vueless/**/*.@(mdx)",
|
|
6
|
-
// TODO: Remove it later
|
|
7
|
-
"../.vueless/**/*.stories.@(js|jsx|ts|tsx)",
|
|
8
|
-
"../.vueless/**/*.@(mdx)"],
|
|
3
|
+
stories: ["../src/**/*.stories.@(js|jsx|ts|tsx)", "../src/**/*.@(mdx)"],
|
|
9
4
|
addons: [
|
|
10
5
|
"@storybook/addon-links",
|
|
11
6
|
"@storybook/addon-essentials",
|
package/.storybook/preview.js
CHANGED
|
@@ -3,33 +3,25 @@ import { backgrounds, docs, layout } from "./configs/main.config";
|
|
|
3
3
|
import { vue3SourceDecorator } from "./decorators/vue3SourceDecorator";
|
|
4
4
|
|
|
5
5
|
// Vue plugins
|
|
6
|
-
import { createStore } from "vuex";
|
|
7
|
-
import
|
|
8
|
-
import NotifyServiceDefault from "vueless/ui.notify/services"; // TODO: move to UI components
|
|
6
|
+
import { createStore } from "vuex";
|
|
7
|
+
import NotifyServiceDefault from "vueless/src/ui.notify/services";
|
|
9
8
|
|
|
10
9
|
// Tailwind styles
|
|
11
10
|
import "./index.pcss";
|
|
12
11
|
|
|
13
|
-
// Common stores
|
|
14
|
-
import loader from "vueless/ui.loader-rendering/store";
|
|
15
|
-
import loaderTop from "vueless/ui.loader-top/store";
|
|
16
|
-
import breakpoint from "vueless/ui.viewport/store";
|
|
12
|
+
// Common stores
|
|
13
|
+
import loader from "vueless/src/ui.loader-rendering/store";
|
|
14
|
+
import loaderTop from "vueless/src/ui.loader-top/store";
|
|
15
|
+
import breakpoint from "vueless/src/ui.viewport/store";
|
|
17
16
|
|
|
18
17
|
// Create store instance
|
|
19
18
|
const store = createStore({
|
|
20
19
|
modules: { loader, loaderTop, breakpoint },
|
|
21
20
|
});
|
|
22
21
|
|
|
23
|
-
// Create router instance
|
|
24
|
-
const router = createRouter({
|
|
25
|
-
history: createWebHistory("/"),
|
|
26
|
-
routes: [{ path: "/:pathMatch(.*)*", component: () => import("vueless/ui.container-page") }],
|
|
27
|
-
});
|
|
28
|
-
|
|
29
22
|
// Create storybook app instance
|
|
30
23
|
const storybookApp = (app) => {
|
|
31
24
|
app.use(store);
|
|
32
|
-
app.use(router);
|
|
33
25
|
app.use(new NotifyServiceDefault().notifyInstance);
|
|
34
26
|
};
|
|
35
27
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { create } from "@storybook/theming/create";
|
|
2
|
-
import colors from "tailwindcss/colors";
|
|
2
|
+
import colors from "tailwindcss/colors.js";
|
|
3
3
|
|
|
4
4
|
export default create({
|
|
5
5
|
base: "light",
|
|
@@ -9,7 +9,7 @@ export default create({
|
|
|
9
9
|
|
|
10
10
|
brandTitle: "Vueless UI",
|
|
11
11
|
brandUrl: "https://vueless.com",
|
|
12
|
-
brandImage: "/
|
|
12
|
+
brandImage: "/images/logo.png",
|
|
13
13
|
brandTarget: "_blank",
|
|
14
14
|
|
|
15
15
|
// Main colors
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vueless/storybook",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "The package simplifies Storybook configuration for Vueless UI library.",
|
|
5
5
|
"homepage": "https://vueless.com",
|
|
6
6
|
"author": "Johnny Grid",
|
|
@@ -35,8 +35,12 @@
|
|
|
35
35
|
"prettier2": "npm:prettier@2.8.8",
|
|
36
36
|
"storybook": "^8.0.0"
|
|
37
37
|
},
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"eslint": "^8.57.0",
|
|
40
|
+
"eslint-config-prettier": "^9.1.0",
|
|
41
|
+
"eslint-plugin-node": "^11.1.0",
|
|
42
|
+
"eslint-plugin-prettier": "^5.1.3",
|
|
43
|
+
"prettier": "^3.2.5",
|
|
44
|
+
"prettier-eslint": "^16.3.0"
|
|
41
45
|
}
|
|
42
46
|
}
|