@ixon-cdk/static-builder 1.19.0-next.0 → 1.20.0-next.1

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.
Files changed (3) hide show
  1. package/browser.js +21 -4
  2. package/index.js +2 -1
  3. package/package.json +2 -2
package/browser.js CHANGED
@@ -9,7 +9,15 @@ const {
9
9
  watchAssets,
10
10
  } = require('@ixon-cdk/core');
11
11
 
12
- async function _build(inputFile, outputFile, tag, assets, production, watch) {
12
+ async function _build(
13
+ inputFile,
14
+ outputFile,
15
+ tag,
16
+ assets,
17
+ production,
18
+ watch,
19
+ sourceMap,
20
+ ) {
13
21
  const inputDir = path.dirname(path.join(getRootDir(), inputFile));
14
22
  const outputDir = path.dirname(path.join(getRootDir(), outputFile));
15
23
 
@@ -26,7 +34,7 @@ async function _build(inputFile, outputFile, tag, assets, production, watch) {
26
34
  name: 'app',
27
35
  fileName: () => `${tag}.min.js`,
28
36
  },
29
- sourcemap: true,
37
+ sourcemap: sourceMap,
30
38
  outDir: outputDir,
31
39
  emptyOutDir: false,
32
40
  rollupOptions: {
@@ -56,7 +64,7 @@ async function _build(inputFile, outputFile, tag, assets, production, watch) {
56
64
  // watch source files
57
65
  if (watch) {
58
66
  watchAssets(assets, inputDir, outputDir);
59
- await watchInputDir(inputDir, isAsset => {
67
+ watchInputDir(inputDir, isAsset => {
60
68
  if (isAsset) {
61
69
  // do nothing
62
70
  } else {
@@ -76,6 +84,15 @@ module.exports = function runBuild(
76
84
  assets,
77
85
  production = true,
78
86
  watch = false,
87
+ sourceMap = true,
79
88
  ) {
80
- return _build(inputFile, outputFile, tag, assets, production, watch);
89
+ return _build(
90
+ inputFile,
91
+ outputFile,
92
+ tag,
93
+ assets,
94
+ production,
95
+ watch,
96
+ sourceMap,
97
+ );
81
98
  };
package/index.js CHANGED
@@ -11,6 +11,7 @@ function main() {
11
11
  const output = argv.output || 'dist/bundle/main.min.js';
12
12
  const assets = JSON.parse(argv.assets || '[]');
13
13
  const watch = !!argv.watch;
14
+ const sourceMap = !!argv.sourceMap;
14
15
 
15
16
  if (!input) {
16
17
  logErrorMessage(
@@ -32,7 +33,7 @@ function main() {
32
33
  }
33
34
 
34
35
  if (buildTarget === 'browser') {
35
- require('./browser')(input, output, tag, assets, true, watch);
36
+ require('./browser')(input, output, tag, assets, true, watch, sourceMap);
36
37
  }
37
38
  }
38
39
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ixon-cdk/static-builder",
3
- "version": "1.19.0-next.0",
3
+ "version": "1.20.0-next.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "",
@@ -10,6 +10,6 @@
10
10
  "vite": "^4.5.3"
11
11
  },
12
12
  "peerDependencies": {
13
- "@ixon-cdk/core": "^1.19.0-next.0"
13
+ "@ixon-cdk/core": "^1.20.0-next.1"
14
14
  }
15
15
  }