kn-cli 1.0.124 → 1.0.126

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.
@@ -26,7 +26,7 @@ if(typeof entry != 'string'){
26
26
 
27
27
  if(CLI_CONFIG?.rules?.compileNpmPackage){
28
28
  optimizeDeps={
29
- include:CLI_CONFIG?.rules?.compileNpmPackage,
29
+ exclude:CLI_CONFIG?.rules?.compileNpmPackage,
30
30
  esbuildOptions:{
31
31
  loader: {
32
32
  '.js': 'jsx', // 显式告诉 esbuild,遇到 .js 后缀也用 jsx loader
@@ -143,7 +143,7 @@ export default defineConfig({
143
143
  },
144
144
  },
145
145
  modules: {
146
- localsConvention: 'camelCaseOnly',
146
+ localsConvention: 'camelCase',
147
147
  generateScopedName: '[local]--[hash:base64:5]',
148
148
  },
149
149
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kn-cli",
3
- "version": "1.0.124",
3
+ "version": "1.0.126",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/build.js CHANGED
@@ -134,6 +134,7 @@ module.exports= async (options={})=> {
134
134
  return false;
135
135
  }
136
136
  });
137
+
137
138
  if(logCount){
138
139
  // task.output=`清除文件:${logCount}`;
139
140
  }
@@ -153,6 +154,24 @@ module.exports= async (options={})=> {
153
154
  // })
154
155
  }
155
156
  },
157
+ {
158
+ title:"清理node_modules链接",
159
+ task:async (ctx,task)=>{
160
+ if(answer?.install=='需要'){
161
+ if(type=='dev'){
162
+ let link_node_modules= path.resolve(projectPath,'node_modules');
163
+ try{
164
+ const fileStat = fs.statSync(link_node_modules);
165
+ if(fileStat.isDirectory()){
166
+ fs.rmdirSync(link_node_modules,{recursive:true,force:true});
167
+ }
168
+ }catch(ex){
169
+
170
+ }
171
+ }
172
+ }
173
+ }
174
+ },
156
175
  {
157
176
  title:"创建构建临时缓存",
158
177
  task:async (ctx,task)=>{