@jayfong/x-server 1.10.3 → 1.11.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/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [1.11.0](https://github.com/jfWorks/x-server/compare/v1.10.3...v1.11.0) (2022-04-20)
6
+
7
+
8
+ ### Features
9
+
10
+ * minify & sideEffects ([12cdccd](https://github.com/jfWorks/x-server/commit/12cdccdd23273117e610a1f428f33b735f6b199b))
11
+
5
12
  ### [1.10.3](https://github.com/jfWorks/x-server/compare/v1.10.2...v1.10.3) (2022-04-19)
6
13
 
7
14
 
@@ -3,6 +3,7 @@ export interface BuildOptions {
3
3
  cwd: string;
4
4
  external?: string[];
5
5
  inlineEnvs?: ParsedEnv[];
6
+ minify?: boolean;
6
7
  }
7
8
  export declare class BuildUtil {
8
9
  static build(options: BuildOptions): Promise<void>;
@@ -65,7 +65,7 @@ class BuildUtil {
65
65
  platform: 'node',
66
66
  target: `node${process.version.slice(1)}`,
67
67
  external: external,
68
- minify: true,
68
+ minify: options.minify ?? true,
69
69
  format: 'cjs',
70
70
  sourcemap: false,
71
71
  treeShaking: true,
package/lib/cli/cli.js CHANGED
@@ -88,6 +88,11 @@ yargs_1.default
88
88
  describe: '不应该被打的包',
89
89
  type: 'string',
90
90
  array: true,
91
+ }).positional('minify', {
92
+ alias: 'm',
93
+ describe: '是否压缩',
94
+ type: 'boolean',
95
+ default: true,
91
96
  }), async (argv) => {
92
97
  process.env.NODE_ENV = 'production';
93
98
  const envs = await env_util_1.EnvUtil.parseFile({
@@ -112,6 +117,7 @@ yargs_1.default
112
117
  cwd: process.cwd(),
113
118
  external: argv.external,
114
119
  inlineEnvs: envs,
120
+ minify: argv.minify,
115
121
  });
116
122
  console.log('构建成功');
117
123
  })
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@jayfong/x-server",
3
- "version": "1.10.3",
3
+ "version": "1.11.0",
4
4
  "license": "ISC",
5
+ "sideEffects": false,
5
6
  "main": "lib/index.js",
6
7
  "types": "lib/index.d.ts",
7
8
  "bin": {