@deot/dev-builder 2.0.3 → 2.1.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/dist/index.cjs.js CHANGED
@@ -43,7 +43,7 @@ const run$3 = async (options) => {
43
43
  const locals = devShared.Locals.impl();
44
44
  const { cwd, workspace } = locals;
45
45
  const { packageName, packageDir, packageOptions, commandOptions } = options || {};
46
- const { scriptFormats } = commandOptions;
46
+ const { scriptFormats, nodePackage } = commandOptions;
47
47
  const stats = [];
48
48
  const srcDir = path__namespace.resolve(packageDir, "./src");
49
49
  const outDir = path__namespace.resolve(packageDir, "./dist");
@@ -74,7 +74,10 @@ const run$3 = async (options) => {
74
74
  let viteBuild = await vite.build(options$);
75
75
  return viteBuild;
76
76
  };
77
- const formats = scriptFormats.split(",");
77
+ const needFilter = typeof nodePackage === "string" && (nodePackage === "*" || nodePackage.includes(packageName));
78
+ const formats = scriptFormats.split(",").filter((i) => {
79
+ return !needFilter || ["es", "cjs"].includes(i);
80
+ });
78
81
  await formats.reduce(
79
82
  (preProcess, format) => {
80
83
  preProcess = preProcess.then(() => build(format)).then((outputs2) => {
package/dist/index.es.js CHANGED
@@ -20,7 +20,7 @@ const run$3 = async (options) => {
20
20
  const locals = Locals.impl();
21
21
  const { cwd, workspace } = locals;
22
22
  const { packageName, packageDir, packageOptions, commandOptions } = options || {};
23
- const { scriptFormats } = commandOptions;
23
+ const { scriptFormats, nodePackage } = commandOptions;
24
24
  const stats = [];
25
25
  const srcDir = path.resolve(packageDir, "./src");
26
26
  const outDir = path.resolve(packageDir, "./dist");
@@ -51,7 +51,10 @@ const run$3 = async (options) => {
51
51
  let viteBuild = await build$1(options$);
52
52
  return viteBuild;
53
53
  };
54
- const formats = scriptFormats.split(",");
54
+ const needFilter = typeof nodePackage === "string" && (nodePackage === "*" || nodePackage.includes(packageName));
55
+ const formats = scriptFormats.split(",").filter((i) => {
56
+ return !needFilter || ["es", "cjs"].includes(i);
57
+ });
55
58
  await formats.reduce(
56
59
  (preProcess, format) => {
57
60
  preProcess = preProcess.then(() => build(format)).then((outputs2) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deot/dev-builder",
3
- "version": "2.0.3",
3
+ "version": "2.1.0",
4
4
  "main": "dist/index.es.js",
5
5
  "module": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",
@@ -23,21 +23,21 @@
23
23
  }
24
24
  },
25
25
  "dependencies": {
26
- "@deot/dev-shared": "^2.0.0",
27
- "@microsoft/api-extractor": "^7.35.1",
26
+ "@deot/dev-shared": "^2.1.0",
27
+ "@microsoft/api-extractor": "^7.36.1",
28
28
  "autoprefixer": "^10.4.14",
29
- "chalk": "^5.2.0",
30
- "cssnano": "^5.1.15",
29
+ "chalk": "^5.3.0",
30
+ "cssnano": "^6.0.1",
31
31
  "fs-extra": "^11.1.1",
32
- "ora": "^6.1.2",
33
- "postcss": "^8.4.24",
32
+ "ora": "^6.3.1",
33
+ "postcss": "^8.4.25",
34
34
  "postcss-flexbugs-fixes": "^5.0.2",
35
35
  "postcss-import": "^15.1.0",
36
36
  "postcss-url": "^10.1.3",
37
- "sass": "~1.62.1",
38
- "vite": "^4.3.9"
37
+ "sass": "^1.63.6",
38
+ "vite": "^4.4.1"
39
39
  },
40
40
  "devDependencies": {
41
- "typescript": "^5.1.3"
41
+ "typescript": "^5.1.6"
42
42
  }
43
43
  }