@nebula.js/cli-build 2.5.0 → 2.8.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 +12 -0
- package/lib/build.js +6 -6
- package/lib/init-config.js +4 -4
- package/package.json +14 -14
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [2.8.0](https://github.com/qlik-oss/nebula.js/compare/v2.7.0...v2.8.0) (2022-03-25)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @nebula.js/cli-build
|
|
9
|
+
|
|
10
|
+
# [2.7.0](https://github.com/qlik-oss/nebula.js/compare/v2.6.1...v2.7.0) (2022-03-21)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @nebula.js/cli-build
|
|
13
|
+
|
|
14
|
+
## [2.6.1](https://github.com/qlik-oss/nebula.js/compare/v2.6.0...v2.6.1) (2022-02-25)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @nebula.js/cli-build
|
|
17
|
+
|
|
6
18
|
# [2.5.0](https://github.com/qlik-oss/nebula.js/compare/v2.4.1...v2.5.0) (2022-02-15)
|
|
7
19
|
|
|
8
20
|
### Bug Fixes
|
package/lib/build.js
CHANGED
|
@@ -30,7 +30,7 @@ const resolveReplacementStrings = (replacementStrings) => {
|
|
|
30
30
|
return replacementStrings;
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
const
|
|
33
|
+
const setupReactNative = (argv) => {
|
|
34
34
|
const { reactNative } = argv;
|
|
35
35
|
let reactNativePath;
|
|
36
36
|
if (reactNative) {
|
|
@@ -38,7 +38,7 @@ const setupReactnative = (argv) => {
|
|
|
38
38
|
if (!fs.existsSync(`${reactNativePath}/package.json`)) {
|
|
39
39
|
// eslint-disable-next-line no-console
|
|
40
40
|
console.warn(
|
|
41
|
-
`WARNING: No ${reactNativePath}/package.json was found. If you really intended to build a react-native version of this package, please provide one.\nOther wise, to
|
|
41
|
+
`WARNING: No ${reactNativePath}/package.json was found. If you really intended to build a react-native version of this package, please provide one.\nOther wise, to suppress this warning, omit the --reactNative flag.`
|
|
42
42
|
);
|
|
43
43
|
return false;
|
|
44
44
|
}
|
|
@@ -54,7 +54,7 @@ const config = ({
|
|
|
54
54
|
core,
|
|
55
55
|
} = {}) => {
|
|
56
56
|
const CWD = argv.cwd || cwd;
|
|
57
|
-
const { reactNative, reactNativePath } =
|
|
57
|
+
const { reactNative, reactNativePath } = setupReactNative(argv);
|
|
58
58
|
let dir = CWD;
|
|
59
59
|
let pkg = require(path.resolve(CWD, 'package.json')); // eslint-disable-line
|
|
60
60
|
const corePkg = core ? require(path.resolve(core, 'package.json')) : null; // eslint-disable-line
|
|
@@ -152,7 +152,7 @@ const config = ({
|
|
|
152
152
|
output: {
|
|
153
153
|
banner,
|
|
154
154
|
format,
|
|
155
|
-
file: path.resolve(dir, fileTarget),
|
|
155
|
+
file: path.resolve(dir, fileTarget),
|
|
156
156
|
name: moduleName,
|
|
157
157
|
sourcemap,
|
|
158
158
|
globals: {
|
|
@@ -174,7 +174,7 @@ const minified = async (argv) => {
|
|
|
174
174
|
|
|
175
175
|
const esm = async (argv, core) => {
|
|
176
176
|
const c = config({
|
|
177
|
-
mode: argv.mode || '
|
|
177
|
+
mode: argv.mode || 'production',
|
|
178
178
|
format: 'esm',
|
|
179
179
|
argv,
|
|
180
180
|
core,
|
|
@@ -259,7 +259,7 @@ const watch = async (argv) => {
|
|
|
259
259
|
async function build(argv = {}) {
|
|
260
260
|
let defaultBuildConfig = {};
|
|
261
261
|
|
|
262
|
-
// if not
|
|
262
|
+
// if not running via command line, run the config to inject default values
|
|
263
263
|
if (!argv.$0) {
|
|
264
264
|
const yargsArgs = argv.config ? ['--config', argv.config] : [];
|
|
265
265
|
defaultBuildConfig = initConfig(yargs(yargsArgs)).argv;
|
package/lib/init-config.js
CHANGED
|
@@ -12,24 +12,24 @@ const options = {
|
|
|
12
12
|
alias: 'c',
|
|
13
13
|
},
|
|
14
14
|
watch: {
|
|
15
|
-
description: '
|
|
15
|
+
description: 'Rebuild the bundle when its source files change on disk',
|
|
16
16
|
type: 'boolean',
|
|
17
17
|
alias: 'w',
|
|
18
18
|
default: false,
|
|
19
19
|
},
|
|
20
20
|
sourcemap: {
|
|
21
|
-
description: 'Generate source
|
|
21
|
+
description: 'Generate source maps',
|
|
22
22
|
type: 'boolean',
|
|
23
23
|
alias: 'm',
|
|
24
24
|
default: true,
|
|
25
25
|
},
|
|
26
26
|
mode: {
|
|
27
|
-
description: 'Explicitly set mode ("
|
|
27
|
+
description: 'Explicitly set mode ("development"|"production")',
|
|
28
28
|
type: 'string',
|
|
29
29
|
default: undefined,
|
|
30
30
|
},
|
|
31
31
|
core: {
|
|
32
|
-
description: 'Set a core build target',
|
|
32
|
+
description: 'Set a core build target to compile an ES Module for release',
|
|
33
33
|
type: 'string',
|
|
34
34
|
default: undefined,
|
|
35
35
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nebula.js/cli-build",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "QlikTech International AB",
|
|
@@ -21,28 +21,28 @@
|
|
|
21
21
|
"lint": "eslint src"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@babel/cli": "7.
|
|
25
|
-
"@babel/core": "7.
|
|
26
|
-
"@babel/plugin-transform-react-jsx": "7.
|
|
27
|
-
"@babel/preset-env": "7.16.
|
|
28
|
-
"@rollup/plugin-commonjs": "21.0.
|
|
24
|
+
"@babel/cli": "7.17.6",
|
|
25
|
+
"@babel/core": "7.17.5",
|
|
26
|
+
"@babel/plugin-transform-react-jsx": "7.17.3",
|
|
27
|
+
"@babel/preset-env": "7.16.11",
|
|
28
|
+
"@rollup/plugin-commonjs": "21.0.2",
|
|
29
29
|
"@rollup/plugin-json": "4.1.0",
|
|
30
|
-
"@rollup/plugin-node-resolve": "13.
|
|
31
|
-
"@rollup/plugin-replace": "
|
|
32
|
-
"@rollup/plugin-typescript": "8.3.
|
|
30
|
+
"@rollup/plugin-node-resolve": "13.1.3",
|
|
31
|
+
"@rollup/plugin-replace": "4.0.0",
|
|
32
|
+
"@rollup/plugin-typescript": "8.3.1",
|
|
33
33
|
"chalk": "4.1.2",
|
|
34
34
|
"extend": "3.0.2",
|
|
35
|
-
"postcss": "^8.4.
|
|
36
|
-
"rollup": "2.
|
|
35
|
+
"postcss": "^8.4.8",
|
|
36
|
+
"rollup": "2.70.0",
|
|
37
37
|
"rollup-plugin-babel": "4.4.0",
|
|
38
38
|
"rollup-plugin-postcss": "4.0.2",
|
|
39
39
|
"rollup-plugin-sourcemaps": "0.6.3",
|
|
40
40
|
"rollup-plugin-terser": "7.0.2",
|
|
41
|
-
"yargs": "17.3.
|
|
41
|
+
"yargs": "17.3.1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"tslib": "*",
|
|
45
|
-
"typescript": ">=4.
|
|
45
|
+
"typescript": ">=4.6.2"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "a89a9f79dbd5ac7f5f0421fca2b4bb4b4199a640"
|
|
48
48
|
}
|