@b9g/libuild 0.1.3 → 0.1.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 -13
- package/package.json +15 -15
- package/src/cli.cjs +62 -795
- package/src/cli.js +167 -11
- package/src/libuild.cjs +344 -183
- package/src/libuild.d.ts +1 -1
- package/src/libuild.js +934 -8
- package/src/chunk-EVLPGECD.js +0 -71
- package/src/chunk-EVLPGECD.js.map +0 -7
- package/src/chunk-YRPHTAV4.js +0 -713
- package/src/chunk-YRPHTAV4.js.map +0 -7
- package/src/cli.cjs.map +0 -7
- package/src/cli.js.map +0 -7
- package/src/libuild.cjs.map +0 -7
- package/src/libuild.js.map +0 -7
- package/src/package-4E3XK74J.js +0 -132
- package/src/package-4E3XK74J.js.map +0 -7
- package/src/umd-plugin.cjs +0 -105
- package/src/umd-plugin.cjs.map +0 -7
- package/src/umd-plugin.d.ts +0 -8
- package/src/umd-plugin.js +0 -8
- package/src/umd-plugin.js.map +0 -7
package/README.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Zero-config library builds with ESBuild.
|
|
4
4
|
|
|
5
|
+
Libuild is a build tool for JavaScript/TypeScript libraries which publish to
|
|
6
|
+
NPM. It solves ESM/CJS support, type generation, and produces clean packages
|
|
7
|
+
with just the files and configuration needed by consumers.
|
|
8
|
+
|
|
5
9
|
## Installation
|
|
6
10
|
|
|
7
11
|
```bash
|
|
@@ -24,20 +28,15 @@ libuild publish
|
|
|
24
28
|
|
|
25
29
|
## Features
|
|
26
30
|
|
|
27
|
-
- **
|
|
28
|
-
- **
|
|
29
|
-
- **
|
|
30
|
-
- **
|
|
31
|
-
- **Smart entry detection** - Automatically finds all library entry points
|
|
32
|
-
- **Development-friendly** - Optional --save flag prevents git noise during development
|
|
33
|
-
- **Perfect npm link** - Works from both project root and dist directory
|
|
34
|
-
- **UMD builds** - Optional browser-compatible builds
|
|
35
|
-
- **Clean output** - Optimized package.json for consumers
|
|
31
|
+
- **No configuration** - Source files and standard package.json are all you need
|
|
32
|
+
- **Multiple formats** - Supports ESM, CJS, UMD, and generates d.ts files
|
|
33
|
+
- **Clean output** - Only necessary files and fields go into the package
|
|
34
|
+
- **Development-friendly** - NPM link just works and changes can be saved to package.json
|
|
36
35
|
|
|
37
|
-
##
|
|
36
|
+
## Convention = Configuration
|
|
38
37
|
|
|
39
38
|
### Entry Points
|
|
40
|
-
- **Library modules**: All top-level `.ts
|
|
39
|
+
- **Library modules**: All top-level `.js`/`.ts` files in `src/` (excluding `_` prefixed files)
|
|
41
40
|
- **CLI binaries**: Any file referenced in `package.json` `bin` field gets compiled to standalone executable
|
|
42
41
|
- **UMD builds**: If `src/umd.ts` exists, creates browser-compatible UMD build
|
|
43
42
|
|
|
@@ -54,8 +53,7 @@ libuild publish
|
|
|
54
53
|
- **UMD builds**: Add `src/umd.ts` for browser-compatible builds
|
|
55
54
|
|
|
56
55
|
### Export Aliases
|
|
57
|
-
- **Legacy support**: `./
|
|
58
|
-
- **JSX runtime**: `src/jsx-runtime.ts` auto-creates `./jsx-dev-runtime` alias
|
|
56
|
+
- **Legacy support**: `./entry.js` automatically aliases to `./entry`
|
|
59
57
|
- **Package.json**: Always exported as `./package.json`
|
|
60
58
|
- **Custom exports**: Existing exports in package.json are preserved and enhanced
|
|
61
59
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@b9g/libuild",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Zero-config library builds",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"build",
|
|
@@ -13,19 +13,29 @@
|
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
16
|
-
"url": "https://github.com/bikeshaving/libuild.git"
|
|
16
|
+
"url": "git+https://github.com/bikeshaving/libuild.git"
|
|
17
17
|
},
|
|
18
18
|
"bugs": {
|
|
19
19
|
"url": "https://github.com/bikeshaving/libuild/issues"
|
|
20
20
|
},
|
|
21
21
|
"bin": {
|
|
22
|
-
"libuild": "
|
|
22
|
+
"libuild": "src/cli.js"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"esbuild": "^0.19.0"
|
|
26
|
-
|
|
25
|
+
"esbuild": "^0.19.0"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@types/bun": "latest",
|
|
29
|
+
"typescript": "^5.0.0"
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
27
32
|
"typescript": "^5.0.0"
|
|
28
33
|
},
|
|
34
|
+
"peerDependenciesMeta": {
|
|
35
|
+
"typescript": {
|
|
36
|
+
"optional": true
|
|
37
|
+
}
|
|
38
|
+
},
|
|
29
39
|
"engines": {
|
|
30
40
|
"bun": ">=1.0.0"
|
|
31
41
|
},
|
|
@@ -63,16 +73,6 @@
|
|
|
63
73
|
"import": "./src/libuild.js",
|
|
64
74
|
"require": "./src/libuild.cjs"
|
|
65
75
|
},
|
|
66
|
-
"./umd-plugin": {
|
|
67
|
-
"types": "./src/umd-plugin.d.ts",
|
|
68
|
-
"import": "./src/umd-plugin.js",
|
|
69
|
-
"require": "./src/umd-plugin.cjs"
|
|
70
|
-
},
|
|
71
|
-
"./umd-plugin.js": {
|
|
72
|
-
"types": "./src/umd-plugin.d.ts",
|
|
73
|
-
"import": "./src/umd-plugin.js",
|
|
74
|
-
"require": "./src/umd-plugin.cjs"
|
|
75
|
-
},
|
|
76
76
|
"./package.json": "./package.json"
|
|
77
77
|
}
|
|
78
78
|
}
|