pkgbld 1.16.3 → 1.16.5
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 +11 -15
- package/dist/index.js +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
*Build your libraries with ease*
|
|
4
4
|
|
|
5
|
-
Rollup
|
|
5
|
+
Rollup-based build tool for building libraries based on package.json config and simple CLI options.
|
|
6
6
|
|
|
7
|
-
It is a simple building tool that supports building to different targets like
|
|
7
|
+
It is a simple building tool that supports building to different targets like `es`, `cjs`, `umd` without additional transformation other than minification using `terser` or preprocess using `rollup-plugin-preprocess`.
|
|
8
8
|
|
|
9
9
|
[Changelog](./CHANGELOG.md)
|
|
10
10
|
|
|
11
11
|
## Why
|
|
12
12
|
|
|
13
|
-
It is created to easily build libraries that
|
|
13
|
+
It is created to easily build libraries that contain multiple subpath exports (entry points, sub-packages) because it is not that easy to do at the moment with `microbundle`, `tsdx` or `ng-packagr` (if you are on Typescript).
|
|
14
14
|
|
|
15
15
|
## Installation
|
|
16
16
|
|
|
@@ -21,10 +21,10 @@ npm install --save-dev pkgbld
|
|
|
21
21
|
|
|
22
22
|
### Getting started (minimalistic start from scratch)
|
|
23
23
|
|
|
24
|
-
1. Start
|
|
24
|
+
1. Start by creating package.json using `npm init`
|
|
25
25
|
2. Add pkgbld `npm install --save-dev pkgbld`
|
|
26
26
|
3. Create `src/index.ts`
|
|
27
|
-
4. Add pkgbld in scripts field of your package.json like:
|
|
27
|
+
4. Add pkgbld in the 'scripts' field of your package.json like:
|
|
28
28
|
|
|
29
29
|
```json
|
|
30
30
|
"scripts": {
|
|
@@ -46,9 +46,9 @@ Run `npm run build`.
|
|
|
46
46
|
pkgbld --umd=index,core
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
Where `index,core` should be replaced by entry points that should be
|
|
49
|
+
Where `index,core` should be replaced by entry points that should be compiled in umd format, `index` is the top level `'.'` entry point.
|
|
50
50
|
|
|
51
|
-
If `package.json`
|
|
51
|
+
If `package.json` defines the `umd` field option will default to `index``.
|
|
52
52
|
|
|
53
53
|
### compress
|
|
54
54
|
|
|
@@ -64,7 +64,7 @@ Where `es,umd` should be replaced by formats that should be compressed using ter
|
|
|
64
64
|
pkgbld --sourcemaps=es,cjs
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
Where `es,cjs` should be replaced by targets for which
|
|
67
|
+
Where `es,cjs` should be replaced by targets for which source maps should be generated. Default `umd`.
|
|
68
68
|
|
|
69
69
|
Supported targets for this option: `es`, `cjs` and `umd`.
|
|
70
70
|
|
|
@@ -106,7 +106,7 @@ Directory to search for input files.
|
|
|
106
106
|
pkgbld --bin=./dist/index.cjs,./dist/index.mjs
|
|
107
107
|
```
|
|
108
108
|
|
|
109
|
-
File(s) to make executable.
|
|
109
|
+
File(s) to make executable. The first entry will be added to package.json
|
|
110
110
|
|
|
111
111
|
### include-externals
|
|
112
112
|
|
|
@@ -126,11 +126,7 @@ Ejects Rollup config.
|
|
|
126
126
|
|
|
127
127
|
### no-ts-config
|
|
128
128
|
|
|
129
|
-
|
|
130
|
-
pkgbld --no-ts-config
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
Do not check / write tsconfig.json.
|
|
129
|
+
Do not check/write tsconfig.json.
|
|
134
130
|
|
|
135
131
|
### no-update-package-json
|
|
136
132
|
|
|
@@ -144,7 +140,7 @@ Do not write package.json.
|
|
|
144
140
|
|
|
145
141
|
`pkgbld` reads all installed packages named `pkgbld-plugin-*` and assumes they are plugins
|
|
146
142
|
|
|
147
|
-
Plugins suppose to implement one or more of following interface methods as their package exports:
|
|
143
|
+
Plugins suppose to implement one or more of the following interface methods as their package exports:
|
|
148
144
|
|
|
149
145
|
```
|
|
150
146
|
interface PkgbldPlugin {
|
package/dist/index.js
CHANGED
|
@@ -561,7 +561,7 @@ async function writeJson(path, json) {
|
|
|
561
561
|
await fs.writeFile(path, JSON.stringify(json, null, 2) + '\n');
|
|
562
562
|
}
|
|
563
563
|
|
|
564
|
-
var version = "1.16.
|
|
564
|
+
var version = "1.16.5";
|
|
565
565
|
var license = "MIT";
|
|
566
566
|
var name = "pkgbld";
|
|
567
567
|
var author = {
|
|
@@ -604,7 +604,7 @@ var dependencies = {
|
|
|
604
604
|
"@niceties/draftlog-appender": "^1.3.0",
|
|
605
605
|
lodash: "^4.17.21",
|
|
606
606
|
rollup: "^3.20.2",
|
|
607
|
-
"rollup-plugin-typescript2": "^0.
|
|
607
|
+
"rollup-plugin-typescript2": "^0.35.0",
|
|
608
608
|
"rollup-plugin-preprocess": "^0.0.4",
|
|
609
609
|
"@rollup/plugin-commonjs": "^25.0.0",
|
|
610
610
|
"@rollup/plugin-terser": "^0.4.0",
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.16.
|
|
2
|
+
"version": "1.16.5",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"name": "pkgbld",
|
|
5
5
|
"author": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@niceties/draftlog-appender": "^1.3.0",
|
|
39
39
|
"lodash": "^4.17.21",
|
|
40
40
|
"rollup": "^3.20.2",
|
|
41
|
-
"rollup-plugin-typescript2": "^0.
|
|
41
|
+
"rollup-plugin-typescript2": "^0.35.0",
|
|
42
42
|
"rollup-plugin-preprocess": "^0.0.4",
|
|
43
43
|
"@rollup/plugin-commonjs": "^25.0.0",
|
|
44
44
|
"@rollup/plugin-terser": "^0.4.0",
|