@seayoo-web/scripts 1.0.0 → 1.0.2
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/dist/index.js +46 -1
- package/package.json +5 -1
- package/types/index.d.ts +1 -0
- package/types/src/eslint.d.ts +9 -0
- package/types/src/vite.lab.d.ts +1 -1
- package/types/src/vite.page.d.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -13,6 +13,9 @@ import { exec } from "child_process";
|
|
|
13
13
|
import { Command } from "commander";
|
|
14
14
|
import inquirer from "inquirer";
|
|
15
15
|
import ora from "ora";
|
|
16
|
+
import skipFormatting from "@vue/eslint-config-prettier/skip-formatting";
|
|
17
|
+
import { flatConfigs } from "eslint-plugin-import";
|
|
18
|
+
import pluginVue from "eslint-plugin-vue";
|
|
16
19
|
function defineLibBuildConfig(option) {
|
|
17
20
|
return defineConfig({
|
|
18
21
|
build: {
|
|
@@ -655,6 +658,46 @@ async function destroyRepo() {
|
|
|
655
658
|
spinner.succeed("页面已经销毁!".green);
|
|
656
659
|
}
|
|
657
660
|
program.action(startCreateJob);
|
|
661
|
+
const vueConfig = [
|
|
662
|
+
...pluginVue.configs["flat/essential"],
|
|
663
|
+
skipFormatting,
|
|
664
|
+
{
|
|
665
|
+
files: ["**/*.vue"],
|
|
666
|
+
rules: {
|
|
667
|
+
"vue/multi-word-component-names": "off"
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
];
|
|
671
|
+
const importConfig = [
|
|
672
|
+
flatConfigs,
|
|
673
|
+
{
|
|
674
|
+
rules: {
|
|
675
|
+
"import/no-unresolved": "off",
|
|
676
|
+
"import/named": "off",
|
|
677
|
+
"import/namespace": "off",
|
|
678
|
+
"import/no-named-as-default": "off",
|
|
679
|
+
"import/no-named-as-default-member": "off",
|
|
680
|
+
"import/export": ["error"],
|
|
681
|
+
"import/order": [
|
|
682
|
+
"error",
|
|
683
|
+
{
|
|
684
|
+
groups: ["builtin", "external", "internal", "parent", "sibling", "index", "type"],
|
|
685
|
+
pathGroups: [
|
|
686
|
+
{
|
|
687
|
+
pattern: "@/**",
|
|
688
|
+
group: "internal"
|
|
689
|
+
}
|
|
690
|
+
],
|
|
691
|
+
"newlines-between": "always",
|
|
692
|
+
alphabetize: {
|
|
693
|
+
order: "asc",
|
|
694
|
+
caseInsensitive: true
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
]
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
];
|
|
658
701
|
export {
|
|
659
702
|
EnvPrefix,
|
|
660
703
|
checkCommit,
|
|
@@ -662,7 +705,9 @@ export {
|
|
|
662
705
|
definePageBuildConfig,
|
|
663
706
|
getBuildEnv,
|
|
664
707
|
htmlInjectPlugin,
|
|
708
|
+
importConfig,
|
|
665
709
|
runCreateScript,
|
|
666
710
|
runDestoryScript,
|
|
667
|
-
transformEnvs
|
|
711
|
+
transformEnvs,
|
|
712
|
+
vueConfig
|
|
668
713
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seayoo-web/scripts",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "scripts for seayoo web monorepos",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "index.ts",
|
|
@@ -24,8 +24,11 @@
|
|
|
24
24
|
"@sentry/vite-plugin": "^3.2.1",
|
|
25
25
|
"@vitejs/plugin-legacy": "^6.0.2",
|
|
26
26
|
"@vitejs/plugin-vue": "^5.2.1",
|
|
27
|
+
"@vue/eslint-config-prettier": "^10.2.0",
|
|
27
28
|
"colors": "^1.4.0",
|
|
28
29
|
"commander": "^13.1.0",
|
|
30
|
+
"eslint-plugin-import": "^2.31.0",
|
|
31
|
+
"eslint-plugin-vue": "^9.32.0",
|
|
29
32
|
"fs-extra": "^11.3.0",
|
|
30
33
|
"inquirer": "^12.4.2",
|
|
31
34
|
"ora": "^8.2.0",
|
|
@@ -36,6 +39,7 @@
|
|
|
36
39
|
"devDependencies": {
|
|
37
40
|
"@types/fs-extra": "^11.0.4",
|
|
38
41
|
"@types/node": "^22.13.1",
|
|
42
|
+
"@typescript-eslint/utils": "^8.25.0",
|
|
39
43
|
"@seayoo-web/tsconfig": "^1.0.2"
|
|
40
44
|
},
|
|
41
45
|
"scripts": {
|
package/types/index.d.ts
CHANGED
package/types/src/vite.lab.d.ts
CHANGED
|
@@ -9,5 +9,5 @@ interface LibBuildOption {
|
|
|
9
9
|
/**
|
|
10
10
|
* 导出一个动态的配置工厂函数用于 lib 类工具的编译配置
|
|
11
11
|
*/
|
|
12
|
-
export declare function defineLibBuildConfig(option
|
|
12
|
+
export declare function defineLibBuildConfig(option?: LibBuildOption): import("vite").UserConfig;
|
|
13
13
|
export {};
|
package/types/src/vite.page.d.ts
CHANGED
|
@@ -9,5 +9,5 @@ interface ExternalConfig {
|
|
|
9
9
|
/**
|
|
10
10
|
* 导出一个动态的配置工厂函数
|
|
11
11
|
*/
|
|
12
|
-
export declare function definePageBuildConfig(option
|
|
12
|
+
export declare function definePageBuildConfig(option?: UserConfig & ExternalConfig): import("vite").UserConfigFnPromise;
|
|
13
13
|
export {};
|