pkgbld 1.21.1 → 1.22.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/README.md +5 -5
- package/dist/index.js +34 -31
- package/package.json +14 -14
package/README.md
CHANGED
|
@@ -60,7 +60,7 @@ If `package.json` defines the `umd` field option will default to `index``.
|
|
|
60
60
|
pkgbld --compress=es,umd
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
Where `es,umd` should be replaced by formats that should be compressed using terser.
|
|
63
|
+
Where `es,umd` should be replaced by formats that should be compressed using terser. Default `umd`.
|
|
64
64
|
|
|
65
65
|
### sourcemaps
|
|
66
66
|
|
|
@@ -88,18 +88,18 @@ pkgbld --preprocess=index
|
|
|
88
88
|
|
|
89
89
|
Defines what entry points/files should be preprocessed using `rollup-plugin-preprocess`. The entry point will be defined as variable es (for esm target), cjs (for commonjs) and umd (for umd) depending on the target type. Please request more variables / more granular logic if you want more.
|
|
90
90
|
|
|
91
|
-
###
|
|
91
|
+
### dest
|
|
92
92
|
|
|
93
93
|
```
|
|
94
|
-
pkgbld --
|
|
94
|
+
pkgbld --dest=dist
|
|
95
95
|
```
|
|
96
96
|
|
|
97
97
|
Directory to put output files.
|
|
98
98
|
|
|
99
|
-
###
|
|
99
|
+
### src
|
|
100
100
|
|
|
101
101
|
```
|
|
102
|
-
pkgbld --
|
|
102
|
+
pkgbld --src=src
|
|
103
103
|
```
|
|
104
104
|
|
|
105
105
|
Directory to search for input files.
|
package/dist/index.js
CHANGED
|
@@ -44,18 +44,19 @@ function CommaSeparatedStringOrBoolean(value) {
|
|
|
44
44
|
}
|
|
45
45
|
const cliFlagsDefaults = {
|
|
46
46
|
formats: ['es', 'cjs'],
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
umd: [],
|
|
48
|
+
compress: ['umd'],
|
|
49
|
+
sourcemaps: ['umd'],
|
|
50
50
|
preprocess: [],
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
dest: 'dist',
|
|
52
|
+
src: 'src',
|
|
53
|
+
bin: undefined,
|
|
53
54
|
includeExternals: false,
|
|
54
55
|
eject: false,
|
|
55
56
|
noTsConfig: false,
|
|
56
57
|
noUpdatePackageJson: false,
|
|
57
58
|
commonjsPattern: '[name].cjs',
|
|
58
|
-
|
|
59
|
+
esmPattern: '[name].mjs',
|
|
59
60
|
umdPattern: '[name].umd.js',
|
|
60
61
|
formatPackageJson: false
|
|
61
62
|
};
|
|
@@ -63,17 +64,17 @@ const cliFlags = {
|
|
|
63
64
|
umd: {
|
|
64
65
|
type: CommaSeparatedString,
|
|
65
66
|
description: 'Package subpath exports in UMD format',
|
|
66
|
-
default: cliFlagsDefaults.
|
|
67
|
+
default: cliFlagsDefaults.umd
|
|
67
68
|
},
|
|
68
69
|
compress: {
|
|
69
70
|
type: CommaSeparatedString,
|
|
70
71
|
description: 'Compress formats using terser',
|
|
71
|
-
default: cliFlagsDefaults.
|
|
72
|
+
default: cliFlagsDefaults.compress
|
|
72
73
|
},
|
|
73
74
|
sourcemaps: {
|
|
74
75
|
type: CommaSeparatedString,
|
|
75
76
|
description: 'Emit sourcemaps for the specified formats',
|
|
76
|
-
default: cliFlagsDefaults.
|
|
77
|
+
default: cliFlagsDefaults.sourcemaps
|
|
77
78
|
},
|
|
78
79
|
formats: {
|
|
79
80
|
type: CommaSeparatedString,
|
|
@@ -85,19 +86,20 @@ const cliFlags = {
|
|
|
85
86
|
description: 'Preprocess entry points / subpath exports',
|
|
86
87
|
default: cliFlagsDefaults.preprocess
|
|
87
88
|
},
|
|
88
|
-
|
|
89
|
+
dest: {
|
|
89
90
|
type: String,
|
|
90
91
|
description: 'Output directory',
|
|
91
|
-
default: cliFlagsDefaults.
|
|
92
|
+
default: cliFlagsDefaults.dest
|
|
92
93
|
},
|
|
93
|
-
|
|
94
|
+
src: {
|
|
94
95
|
type: String,
|
|
95
96
|
description: 'Source directory',
|
|
96
|
-
default: cliFlagsDefaults.
|
|
97
|
+
default: cliFlagsDefaults.src
|
|
97
98
|
},
|
|
98
99
|
bin: {
|
|
99
100
|
type: CommaSeparatedString,
|
|
100
|
-
description: 'Executable files'
|
|
101
|
+
description: 'Executable files',
|
|
102
|
+
default: cliFlagsDefaults.bin
|
|
101
103
|
},
|
|
102
104
|
includeExternals: {
|
|
103
105
|
type: CommaSeparatedStringOrBoolean,
|
|
@@ -127,7 +129,7 @@ const cliFlags = {
|
|
|
127
129
|
esmPattern: {
|
|
128
130
|
type: String,
|
|
129
131
|
description: 'ES output file name pattern',
|
|
130
|
-
default: cliFlagsDefaults.
|
|
132
|
+
default: cliFlagsDefaults.esmPattern
|
|
131
133
|
},
|
|
132
134
|
umdPattern: {
|
|
133
135
|
type: String,
|
|
@@ -145,6 +147,7 @@ const packageJsonFieldsOrder = new Set([
|
|
|
145
147
|
'type',
|
|
146
148
|
'version',
|
|
147
149
|
'name',
|
|
150
|
+
'scope',
|
|
148
151
|
'description',
|
|
149
152
|
'license',
|
|
150
153
|
'author',
|
|
@@ -217,8 +220,8 @@ function getCliOptions(plugins, pkg) {
|
|
|
217
220
|
formats: flags.formats,
|
|
218
221
|
formatsOverridden: flags.formats !== cliFlagsDefaults.formats,
|
|
219
222
|
preprocess: flags.preprocess,
|
|
220
|
-
dir: flags.
|
|
221
|
-
sourceDir: flags.
|
|
223
|
+
dir: flags.dest,
|
|
224
|
+
sourceDir: flags.src,
|
|
222
225
|
bin: flags.bin,
|
|
223
226
|
includeExternals: flags.includeExternals,
|
|
224
227
|
eject: flags.eject,
|
|
@@ -746,7 +749,7 @@ async function writeJson(path, json) {
|
|
|
746
749
|
await fs.writeFile(path, toFormattedJson(json));
|
|
747
750
|
}
|
|
748
751
|
|
|
749
|
-
var version = "1.
|
|
752
|
+
var version = "1.22.0";
|
|
750
753
|
var name = "pkgbld";
|
|
751
754
|
var license = "MIT";
|
|
752
755
|
var author = "Konstantin Shutkin";
|
|
@@ -778,28 +781,28 @@ var scripts = {
|
|
|
778
781
|
lint: "eslint ./src"
|
|
779
782
|
};
|
|
780
783
|
var dependencies = {
|
|
781
|
-
"@niceties/logger": "^1.1.
|
|
782
|
-
"@niceties/draftlog-appender": "^1.3.
|
|
784
|
+
"@niceties/logger": "^1.1.12",
|
|
785
|
+
"@niceties/draftlog-appender": "^1.3.2",
|
|
783
786
|
lodash: "^4.17.21",
|
|
784
787
|
rollup: "^4.0.0",
|
|
785
788
|
"rollup-plugin-typescript2": "^0.36.0",
|
|
786
789
|
"rollup-plugin-preprocess": "^0.0.4",
|
|
787
|
-
"@rollup/plugin-commonjs": "^25.0.
|
|
788
|
-
"@rollup/plugin-terser": "^0.4.
|
|
789
|
-
"@rollup/plugin-json": "^6.0.
|
|
790
|
-
"@rollup/plugin-node-resolve": "^15.
|
|
791
|
-
"@rollup-extras/plugin-clean": "^1.3.
|
|
792
|
-
"@rollup-extras/plugin-binify": "^1.1.
|
|
793
|
-
"@rollup-extras/plugin-externals": "^1.1.
|
|
794
|
-
"@slimlib/refine-partition": "^1.0.
|
|
795
|
-
"@slimlib/smart-mock": "^0.1.
|
|
790
|
+
"@rollup/plugin-commonjs": "^25.0.5",
|
|
791
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
792
|
+
"@rollup/plugin-json": "^6.0.1",
|
|
793
|
+
"@rollup/plugin-node-resolve": "^15.2.2",
|
|
794
|
+
"@rollup-extras/plugin-clean": "^1.3.8",
|
|
795
|
+
"@rollup-extras/plugin-binify": "^1.1.9",
|
|
796
|
+
"@rollup-extras/plugin-externals": "^1.1.11",
|
|
797
|
+
"@slimlib/refine-partition": "^1.0.2",
|
|
798
|
+
"@slimlib/smart-mock": "^0.1.5",
|
|
796
799
|
"is-builtin-module": "^3.2.1",
|
|
797
|
-
terser: "^5.
|
|
800
|
+
terser: "^5.21.0",
|
|
798
801
|
kleur: "^4.1.5",
|
|
799
802
|
cleye: "^1.3.2"
|
|
800
803
|
};
|
|
801
804
|
var devDependencies = {
|
|
802
|
-
"@types/lodash": "^4.14.
|
|
805
|
+
"@types/lodash": "^4.14.199",
|
|
803
806
|
"@total-typescript/ts-reset": "^0.5.1",
|
|
804
807
|
options: "workspace:*"
|
|
805
808
|
};
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.
|
|
2
|
+
"version": "1.22.0",
|
|
3
3
|
"name": "pkgbld",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Konstantin Shutkin",
|
|
@@ -27,28 +27,28 @@
|
|
|
27
27
|
"rollup"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@niceties/logger": "^1.1.
|
|
31
|
-
"@niceties/draftlog-appender": "^1.3.
|
|
30
|
+
"@niceties/logger": "^1.1.12",
|
|
31
|
+
"@niceties/draftlog-appender": "^1.3.2",
|
|
32
32
|
"lodash": "^4.17.21",
|
|
33
33
|
"rollup": "^4.0.0",
|
|
34
34
|
"rollup-plugin-typescript2": "^0.36.0",
|
|
35
35
|
"rollup-plugin-preprocess": "^0.0.4",
|
|
36
|
-
"@rollup/plugin-commonjs": "^25.0.
|
|
37
|
-
"@rollup/plugin-terser": "^0.4.
|
|
38
|
-
"@rollup/plugin-json": "^6.0.
|
|
39
|
-
"@rollup/plugin-node-resolve": "^15.
|
|
40
|
-
"@rollup-extras/plugin-clean": "^1.3.
|
|
41
|
-
"@rollup-extras/plugin-binify": "^1.1.
|
|
42
|
-
"@rollup-extras/plugin-externals": "^1.1.
|
|
43
|
-
"@slimlib/refine-partition": "^1.0.
|
|
44
|
-
"@slimlib/smart-mock": "^0.1.
|
|
36
|
+
"@rollup/plugin-commonjs": "^25.0.5",
|
|
37
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
38
|
+
"@rollup/plugin-json": "^6.0.1",
|
|
39
|
+
"@rollup/plugin-node-resolve": "^15.2.2",
|
|
40
|
+
"@rollup-extras/plugin-clean": "^1.3.8",
|
|
41
|
+
"@rollup-extras/plugin-binify": "^1.1.9",
|
|
42
|
+
"@rollup-extras/plugin-externals": "^1.1.11",
|
|
43
|
+
"@slimlib/refine-partition": "^1.0.2",
|
|
44
|
+
"@slimlib/smart-mock": "^0.1.5",
|
|
45
45
|
"is-builtin-module": "^3.2.1",
|
|
46
|
-
"terser": "^5.
|
|
46
|
+
"terser": "^5.21.0",
|
|
47
47
|
"kleur": "^4.1.5",
|
|
48
48
|
"cleye": "^1.3.2"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@types/lodash": "^4.14.
|
|
51
|
+
"@types/lodash": "^4.14.199",
|
|
52
52
|
"@total-typescript/ts-reset": "^0.5.1",
|
|
53
53
|
"options": "0.0.1"
|
|
54
54
|
},
|