create-packer 1.33.0 → 1.34.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-packer",
3
- "version": "1.33.0",
3
+ "version": "1.34.0",
4
4
  "main": "index.js",
5
5
  "repository": "https://github.com/kevily/create-packer",
6
6
  "author": "1k <bug_zero@163.com>",
@@ -0,0 +1,14 @@
1
+ # editorconfig.org
2
+
3
+ root = true
4
+
5
+ [*]
6
+ charset = utf-8
7
+ indent_size = 4
8
+ indent_style = space
9
+ insert_final_newline = true
10
+ trim_trailing_whitespace = true
11
+
12
+
13
+ [*.md]
14
+ trim_trailing_whitespace = false
@@ -0,0 +1,119 @@
1
+ {
2
+ "root": true,
3
+ "parser": "@typescript-eslint/parser",
4
+ "plugins": [
5
+ "prettier"
6
+ ],
7
+ "extends": [
8
+ "eslint:recommended",
9
+ "plugin:@typescript-eslint/recommended",
10
+ "plugin:storybook/recommended",
11
+ "plugin:react/recommended",
12
+ "plugin:react-hooks/recommended",
13
+ "plugin:import/recommended",
14
+ "plugin:import/typescript"
15
+ ],
16
+ "settings": {
17
+ "import/resolver": {
18
+ "typescript": true,
19
+ "node": true
20
+ },
21
+ "react": {
22
+ "version": "18"
23
+ }
24
+ },
25
+ "env": {
26
+ "browser": true,
27
+ "node": true,
28
+ "es6": true,
29
+ "jest": true
30
+ },
31
+ "parserOptions": {
32
+ "ecmaVersion": 2018,
33
+ "sourceType": "module",
34
+ "ecmaFeatures": {
35
+ "jsx": true
36
+ },
37
+ "useJSXTextNode": true
38
+ },
39
+ "rules": {
40
+ "import/export": "off",
41
+ "import/namespace": "off",
42
+ "import/order": [
43
+ "error",
44
+ {
45
+ "groups": [
46
+ "builtin",
47
+ "external",
48
+ "internal",
49
+ "parent",
50
+ "sibling",
51
+ "index",
52
+ "object",
53
+ "type"
54
+ ],
55
+ "pathGroups": [
56
+ {
57
+ "pattern": "react",
58
+ "group": "external",
59
+ "position": "before"
60
+ },
61
+ {
62
+ "pattern": "react-dom/*",
63
+ "group": "external",
64
+ "position": "before"
65
+ },
66
+ {
67
+ "pattern": "react-router",
68
+ "group": "external",
69
+ "position": "before"
70
+ },
71
+ {
72
+ "pattern": "react-router-dom",
73
+ "group": "external",
74
+ "position": "before"
75
+ },
76
+ ],
77
+ "pathGroupsExcludedImportTypes": [
78
+ "react",
79
+ "react-router",
80
+ "react-router-dom"
81
+ ]
82
+ }
83
+ ],
84
+ "@typescript-eslint/no-var-requires": 0,
85
+ "@typescript-eslint/explicit-function-return-type": "off",
86
+ "@typescript-eslint/no-explicit-any": 0,
87
+ "@typescript-eslint/no-non-null-assertion": "off",
88
+ "@typescript-eslint/no-inferrable-types": [
89
+ "warn",
90
+ {
91
+ "ignoreParameters": true
92
+ }
93
+ ],
94
+ "@typescript-eslint/no-unused-vars": [
95
+ "warn",
96
+ {
97
+ "argsIgnorePattern": "^_"
98
+ }
99
+ ],
100
+ "@typescript-eslint/member-delimiter-style": 0,
101
+ "@typescript-eslint/class-name-casing": 0,
102
+ "@typescript-eslint/explicit-module-boundary-types": "off",
103
+ "@typescript-eslint/ban-ts-comment": "off",
104
+ "@typescript-eslint/no-empty-interface": "off",
105
+ "react/prop-types": "off",
106
+ "react/no-find-dom-node": "off",
107
+ "react-hooks/exhaustive-deps": "warn",
108
+ "react/display-name": "off",
109
+ "react/react-in-jsx-scope": "off",
110
+ "react-hooks/rules-of-hooks": "off",
111
+ "prettier/prettier": [
112
+ "error",
113
+ {
114
+ "endOfLine": "auto"
115
+ }
116
+ ],
117
+ "no-constant-condition": "off"
118
+ }
119
+ }
@@ -0,0 +1,4 @@
1
+ **/*.md
2
+ **/*.svg
3
+ **/*.ejs
4
+ **/*.html
@@ -0,0 +1,18 @@
1
+ {
2
+ "overrides": [
3
+ {
4
+ "files": ".prettierrc",
5
+ "options": { "parser": "json" }
6
+ }
7
+ ],
8
+ "printWidth": 100,
9
+ "tabWidth": 4,
10
+ "useTabs": false,
11
+ "semi": false,
12
+ "singleQuote": true,
13
+ "trailingComma": "none",
14
+ "bracketSpacing": true,
15
+ "bracketSameLine": false,
16
+ "arrowParens": "avoid",
17
+ "rangeStart": 0
18
+ }
@@ -1,7 +1,15 @@
1
1
  import svgr from 'vite-plugin-svgr'
2
2
  import type { StorybookConfig } from '@storybook/react-vite'
3
+
4
+ function createStories(lib: string): string[] {
5
+ return [
6
+ `../packages/${lib}/src/**/*.mdx`,
7
+ `../packages/${lib}/src/**/*.stories.@(js|jsx|ts|tsx)`
8
+ ]
9
+ }
10
+
3
11
  const config: StorybookConfig = {
4
- stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
12
+ stories: [...createStories('ts'), ...createStories('react')],
5
13
  addons: [
6
14
  '@storybook/addon-links',
7
15
  '@storybook/addon-essentials',
@@ -12,7 +20,7 @@ const config: StorybookConfig = {
12
20
  options: {}
13
21
  },
14
22
  async viteFinal(config) {
15
- config.plugins.unshift(svgr())
23
+ config.plugins?.unshift(svgr())
16
24
 
17
25
  return config
18
26
  },
@@ -1,7 +1,8 @@
1
+ import * as React from 'react'
1
2
  import type { Preview } from '@storybook/react'
2
- import '../src/index.css'
3
3
 
4
4
  const preview: Preview = {
5
+ decorators: [Story => <Story />],
5
6
  parameters: {
6
7
  actions: { argTypesRegex: '^on[A-Z].*' },
7
8
  controls: {
@@ -0,0 +1,29 @@
1
+ {
2
+ "extends": "stylelint-config-standard-scss",
3
+ "rules": {
4
+ "comment-empty-line-before": "never",
5
+ "no-empty-source": null,
6
+ "alpha-value-notation": null,
7
+ "color-function-notation": null,
8
+ "at-rule-no-unknown": [
9
+ true,
10
+ {
11
+ "ignoreAtRules": ["tailwind", "apply", "use"]
12
+ }
13
+ ],
14
+ "declaration-block-no-redundant-longhand-properties": null,
15
+ "selector-pseudo-class-no-unknown": [
16
+ true,
17
+ {
18
+ "ignorePseudoClasses": ["global"]
19
+ }
20
+ ],
21
+ "selector-class-pattern": null,
22
+ "scss/at-rule-no-unknown": [
23
+ true,
24
+ {
25
+ "ignoreAtRules": ["tailwind", "a pply"]
26
+ }
27
+ ]
28
+ }
29
+ }
@@ -12,7 +12,10 @@
12
12
  "push": "pnpm run commit && git push",
13
13
  "login": "npm login --registry https://registry.npmjs.org",
14
14
  "clean:dist": "pnpm -r exec rimraf dist",
15
- "pub": "pnpm run build && pnpm run changeVersion && pnpm run push && pnpm -r publish --registry https://registry.npmjs.org"
15
+ "pub": "pnpm run build && pnpm run changeVersion && pnpm run push && pnpm -r publish --registry https://registry.npmjs.org",
16
+ "storybook": "storybook dev -p 6006",
17
+ "build-storybook": "storybook build",
18
+ "up:storybook": "pnpm up storybook eslint-plugin-storybook @storybook/* -L"
16
19
  },
17
20
  "keywords": [],
18
21
  "author": "kevily",
@@ -31,10 +34,40 @@
31
34
  },
32
35
  "devDependencies": {
33
36
  "@changesets/cli": "2.26.2",
37
+ "@storybook/addon-essentials": "8.2.7",
38
+ "@storybook/addon-interactions": "8.2.7",
39
+ "@storybook/addon-links": "8.2.7",
40
+ "@storybook/blocks": "8.2.7",
41
+ "@storybook/react": "8.2.7",
42
+ "@storybook/react-vite": "8.2.7",
43
+ "@storybook/testing-library": "0.2.2",
44
+ "@types/react": "18.3.3",
45
+ "@types/react-dom": "18.3.0",
46
+ "@typescript-eslint/eslint-plugin": "7.0.2",
47
+ "@typescript-eslint/parser": "7.0.2",
34
48
  "@types/node": "20.3.2",
49
+ "autoprefixer": "10.4.14",
50
+ "eslint": "8.56.0",
51
+ "eslint-import-resolver-typescript": "3.6.1",
52
+ "eslint-plugin-import": "2.29.1",
53
+ "eslint-plugin-prettier": "5.1.3",
54
+ "eslint-plugin-react": "7.33.2",
55
+ "eslint-plugin-react-hooks": "4.6.0",
56
+ "eslint-plugin-storybook": "0.8.0",
35
57
  "inquirer": "8",
36
- "prettier": "2.8.8",
58
+ "postcss": "8.4.31",
59
+ "postcss-import": "15.1.0",
60
+ "postcss-nesting": "12.0.0",
61
+ "postcss-scss": "4.0.6",
62
+ "prettier": "3.2.5",
63
+ "prop-types": "15.8.1",
64
+ "react": "18.2.0",
65
+ "react-dom": "18.2.0",
66
+ "storybook": "8.2.7",
67
+ "stylelint": "16.8.1",
68
+ "stylelint-config-standard-scss": "13.0.0",
37
69
  "ts-node": "10.9.1",
38
- "typescript": "5.1.3"
70
+ "typescript": "5.5.2",
71
+ "vite-plugin-svgr": "4.2.0"
39
72
  }
40
73
  }
@@ -21,13 +21,6 @@
21
21
  "react-dom": "18.2.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@storybook/addon-essentials": "8.2.7",
25
- "@storybook/addon-interactions": "8.2.7",
26
- "@storybook/addon-links": "8.2.7",
27
- "@storybook/blocks": "8.2.7",
28
- "@storybook/react": "8.2.7",
29
- "@storybook/react-vite": "8.2.7",
30
- "@storybook/testing-library": "0.2.2",
31
24
  "@types/react": "18.3.3",
32
25
  "@types/react-dom": "18.3.0",
33
26
  "@typescript-eslint/eslint-plugin": "7.0.2",
@@ -40,13 +33,10 @@
40
33
  "eslint-plugin-react-hooks": "4.6.0",
41
34
  "eslint-plugin-storybook": "0.8.0",
42
35
  "prettier": "3.2.5",
43
- "prop-types": "15.8.1",
44
36
  "react": "18.2.0",
45
37
  "react-dom": "18.2.0",
46
- "storybook": "8.2.7",
47
38
  "stylelint": "16.8.1",
48
39
  "stylelint-config-standard-scss": "13.0.0",
49
- "typescript": "5.5.2",
50
- "vite-plugin-svgr": "4.2.0"
40
+ "typescript": "5.5.2"
51
41
  }
52
42
  }
@@ -1,3 +1,3 @@
1
- import { Meta } from '@storybook/blocks';
1
+ import { Meta } from '@storybook/blocks'
2
2
 
3
- <Meta title="Example/Introduction" />
3
+ <Meta title="react-components/Introduction" />
@@ -1,30 +1,30 @@
1
1
  .storybook-button {
2
- font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
3
- font-weight: 700;
4
- border: 0;
5
- border-radius: 3em;
6
- cursor: pointer;
7
- display: inline-block;
8
- line-height: 1;
2
+ font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
3
+ font-weight: 700;
4
+ border: 0;
5
+ border-radius: 3em;
6
+ cursor: pointer;
7
+ display: inline-block;
8
+ line-height: 1;
9
9
  }
10
10
  .storybook-button--primary {
11
- color: white;
12
- background-color: #1ea7fd;
11
+ color: white;
12
+ background-color: #1ea7fd;
13
13
  }
14
14
  .storybook-button--secondary {
15
- color: #333;
16
- background-color: transparent;
17
- box-shadow: rgba(0, 0, 0, 0.15) 0px 0px 0px 1px inset;
15
+ color: #333;
16
+ background-color: transparent;
17
+ box-shadow: rgba(0, 0, 0, 0.15) 0px 0px 0px 1px inset;
18
18
  }
19
19
  .storybook-button--small {
20
- font-size: 12px;
21
- padding: 10px 16px;
20
+ font-size: 12px;
21
+ padding: 10px 16px;
22
22
  }
23
23
  .storybook-button--medium {
24
- font-size: 14px;
25
- padding: 11px 20px;
24
+ font-size: 14px;
25
+ padding: 11px 20px;
26
26
  }
27
27
  .storybook-button--large {
28
- font-size: 16px;
29
- padding: 12px 24px;
28
+ font-size: 16px;
29
+ padding: 12px 24px;
30
30
  }
@@ -3,7 +3,7 @@ import type { Meta, StoryObj } from '@storybook/react'
3
3
 
4
4
  // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
5
5
  const meta: Meta<typeof Button> = {
6
- title: 'Example/Button',
6
+ title: 'react-components/Button',
7
7
  component: Button,
8
8
  tags: ['autodocs'],
9
9
  argTypes: {
@@ -26,5 +26,5 @@
26
26
  ],
27
27
  "exclude": [
28
28
  "node_modules/**/*"
29
- ]
29
+ ],
30
30
  }
@@ -1,22 +1,31 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "module": "CommonJS",
3
+ "useDefineForClassFields": true,
4
+ "strict": true,
5
+ "forceConsistentCasingInFileNames": true,
6
+ "strictPropertyInitialization": false,
7
+ "resolveJsonModule": true,
8
+ "module": "ESNext",
4
9
  "esModuleInterop": true,
10
+ "jsx": "react-jsx",
5
11
  "allowSyntheticDefaultImports": true,
6
12
  "allowJs": true,
7
- "strictNullChecks": true,
8
13
  "target": "ESNext",
9
14
  "noImplicitAny": false,
15
+ "skipLibCheck": true,
10
16
  "moduleResolution": "node",
11
17
  "sourceMap": false,
12
18
  "declaration": true,
13
- "outDir": "lib",
14
- "baseUrl": "."
19
+ "outDir": "dist",
20
+ "baseUrl": ".",
21
+ "emitDeclarationOnly": true
15
22
  },
16
23
  "include": [
17
- "scripts/**/*"
24
+ ".storybook"
18
25
  ],
19
- "exclude": [
20
- "node_modules/**/*"
26
+ "references": [
27
+ {
28
+ "path": "./tsconfig.node.json"
29
+ }
21
30
  ]
22
31
  }
@@ -0,0 +1,23 @@
1
+ {
2
+ "compilerOptions": {
3
+ "composite": true,
4
+ "module": "CommonJS",
5
+ "esModuleInterop": true,
6
+ "allowSyntheticDefaultImports": true,
7
+ "allowJs": true,
8
+ "strictNullChecks": true,
9
+ "target": "ESNext",
10
+ "noImplicitAny": false,
11
+ "moduleResolution": "node",
12
+ "sourceMap": false,
13
+ "declaration": true,
14
+ "outDir": "lib",
15
+ "baseUrl": "."
16
+ },
17
+ "include": [
18
+ "scripts/**/*"
19
+ ],
20
+ "exclude": [
21
+ "node_modules/**/*"
22
+ ]
23
+ }
@@ -1,21 +0,0 @@
1
- // 配置文档: https://prettier.io/docs/en/options.html
2
- // ----------------------------------------------------------------------
3
- module.exports = {
4
- overrides: [
5
- {
6
- files: '.prettierrc',
7
- options: { parser: 'json' }
8
- }
9
- ],
10
- printWidth: 100,
11
- tabWidth: 4,
12
- useTabs: false,
13
- semi: false,
14
- singleQuote: true,
15
- trailingComma: 'none',
16
- bracketSpacing: true,
17
- jsxBracketSameLine: true,
18
- arrowParens: 'avoid',
19
- rangeStart: 0,
20
- Parser: 'none'
21
- }
@@ -1,3 +0,0 @@
1
- @tailwind base;
2
- @tailwind components;
3
- @tailwind utilities;