@seayoo-web/scripts 1.0.6 → 1.0.7
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 +18 -2
- package/package.json +12 -1
- package/types/index.d.ts +2 -0
- package/types/src/postcss.d.ts +7 -0
- package/types/src/stylelint.d.ts +11 -0
- package/types/src/vite.lab.d.ts +2 -2
package/dist/index.js
CHANGED
|
@@ -18,15 +18,16 @@ import { vueTsConfigs } from "@vue/eslint-config-typescript";
|
|
|
18
18
|
import { defineConfigWithVueTs } from "@vue/eslint-config-typescript";
|
|
19
19
|
import { flatConfigs } from "eslint-plugin-import";
|
|
20
20
|
import pluginVue from "eslint-plugin-vue";
|
|
21
|
+
import nestingPlugin from "postcss-nesting";
|
|
21
22
|
function defineLibBuildConfig(option) {
|
|
22
23
|
return defineConfig({
|
|
23
24
|
build: {
|
|
24
|
-
outDir: (option == null ? void 0 : option.outDir) || "
|
|
25
|
+
outDir: (option == null ? void 0 : option.outDir) || "dist",
|
|
25
26
|
lib: {
|
|
26
27
|
entry: join(process.cwd(), (option == null ? void 0 : option.rootEntry) || "index.ts"),
|
|
27
28
|
formats: ["es"],
|
|
28
29
|
fileName: (format, entryName) => {
|
|
29
|
-
return format === "es" ? `${entryName}.js` :
|
|
30
|
+
return format === "es" ? `${entryName}.js` : `${entryName}.${format}.js`;
|
|
30
31
|
}
|
|
31
32
|
},
|
|
32
33
|
rollupOptions: {
|
|
@@ -701,6 +702,19 @@ const importEslintConfig = [
|
|
|
701
702
|
}
|
|
702
703
|
}
|
|
703
704
|
];
|
|
705
|
+
const stylelintConfig = {
|
|
706
|
+
extends: ["stylelint-config-standard", "stylelint-config-recess-order"],
|
|
707
|
+
overrides: [
|
|
708
|
+
{
|
|
709
|
+
files: ["**/*.vue", "**/*.html"],
|
|
710
|
+
customSyntax: "postcss-html"
|
|
711
|
+
}
|
|
712
|
+
],
|
|
713
|
+
rules: {}
|
|
714
|
+
};
|
|
715
|
+
const postcssConfig = {
|
|
716
|
+
plugins: [nestingPlugin]
|
|
717
|
+
};
|
|
704
718
|
export {
|
|
705
719
|
EnvPrefix,
|
|
706
720
|
checkCommit,
|
|
@@ -710,8 +724,10 @@ export {
|
|
|
710
724
|
getBuildEnv,
|
|
711
725
|
htmlInjectPlugin,
|
|
712
726
|
importEslintConfig,
|
|
727
|
+
postcssConfig,
|
|
713
728
|
runCreateScript,
|
|
714
729
|
runDestoryScript,
|
|
730
|
+
stylelintConfig,
|
|
715
731
|
transformEnvs,
|
|
716
732
|
vueEslintConfig
|
|
717
733
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seayoo-web/scripts",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "scripts for seayoo web monorepos",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "index.ts",
|
|
@@ -34,6 +34,10 @@
|
|
|
34
34
|
"inquirer": "^12.4.2",
|
|
35
35
|
"jiti": "^2.4.2",
|
|
36
36
|
"ora": "^8.2.0",
|
|
37
|
+
"postcss-html": "^1.8.0",
|
|
38
|
+
"postcss-nesting": "^13.0.1",
|
|
39
|
+
"stylelint-config-recess-order": "^6.0.0",
|
|
40
|
+
"stylelint-config-standard": "^37.0.0",
|
|
37
41
|
"vite-plugin-stylelint": "^6.0.0",
|
|
38
42
|
"vite-plugin-vue-devtools": "^7.7.2",
|
|
39
43
|
"@seayoo-web/finder": "^2.0.13"
|
|
@@ -42,8 +46,15 @@
|
|
|
42
46
|
"@types/fs-extra": "^11.0.4",
|
|
43
47
|
"@types/node": "^22.13.1",
|
|
44
48
|
"@typescript-eslint/utils": "^8.25.0",
|
|
49
|
+
"eslint": "^9.19.0",
|
|
50
|
+
"postcss": "^8.5.3",
|
|
51
|
+
"stylelint": "^16.14.1",
|
|
45
52
|
"@seayoo-web/tsconfig": "^1.0.2"
|
|
46
53
|
},
|
|
54
|
+
"peerDependencies": {
|
|
55
|
+
"eslint": "^9.19.0",
|
|
56
|
+
"stylelint": "^16.14.1"
|
|
57
|
+
},
|
|
47
58
|
"scripts": {
|
|
48
59
|
"build": "vite build && tsc --emitDeclarationOnly",
|
|
49
60
|
"prepublish": "pnpm build"
|
package/types/index.d.ts
CHANGED
package/types/src/vite.lab.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
interface LibBuildOption {
|
|
2
|
-
/** 输出目录,默认为 "
|
|
2
|
+
/** 输出目录,默认为 "dist" */
|
|
3
3
|
outDir?: string;
|
|
4
4
|
/** 入口文件,默认为 "index.ts" */
|
|
5
5
|
rootEntry?: string;
|
|
6
|
-
/**
|
|
6
|
+
/** 要排除的工具包,默认排除 "@seayoo-web/request" 和 "@seayoo-web/utils" */
|
|
7
7
|
external?: string[];
|
|
8
8
|
}
|
|
9
9
|
/**
|