@cubing/dev-config 0.1.2 → 0.3.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 +4 -3
- package/esbuild/es2022/index.d.ts +5 -0
- package/esbuild/es2022/index.js +21 -0
- package/package.json +9 -3
- package/esbuild/es2022/index.ts +0 -14
package/README.md
CHANGED
|
@@ -5,12 +5,13 @@
|
|
|
5
5
|
### `esbuild`
|
|
6
6
|
|
|
7
7
|
```js
|
|
8
|
-
|
|
8
|
+
// Or use `es2022Lib`
|
|
9
|
+
import { es2022App } from "@cubing/dev-config/esbuild/es2022";
|
|
9
10
|
import { build } from "esbuild";
|
|
10
11
|
|
|
11
12
|
await build({
|
|
12
|
-
...
|
|
13
|
-
entryPoints: ["src/index.ts"],
|
|
13
|
+
...es2022App({ dev: true }),
|
|
14
|
+
entryPoints: ["./src/index.ts"],
|
|
14
15
|
outdir: "./dist/lib/",
|
|
15
16
|
});
|
|
16
17
|
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const common = {
|
|
3
|
+
format: "esm",
|
|
4
|
+
target: "es2022",
|
|
5
|
+
bundle: true,
|
|
6
|
+
splitting: true,
|
|
7
|
+
chunkNames: "chunks/[name]-[hash]",
|
|
8
|
+
sourcemap: true
|
|
9
|
+
};
|
|
10
|
+
export function es2022App(options) {
|
|
11
|
+
return {
|
|
12
|
+
...common,
|
|
13
|
+
minify: !options?.dev
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export function es2022Lib() {
|
|
17
|
+
return {
|
|
18
|
+
...es2022App,
|
|
19
|
+
packages: "external"
|
|
20
|
+
};
|
|
21
|
+
}
|
package/package.json
CHANGED
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cubing/dev-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"esbuild": "^0.25.3"
|
|
6
6
|
},
|
|
7
7
|
"devDependencies": {
|
|
8
|
-
"@biomejs/biome": "^1.9.4"
|
|
8
|
+
"@biomejs/biome": "^1.9.4",
|
|
9
|
+
"@types/bun": "^1.2.12",
|
|
10
|
+
"typescript": "^5.8.3"
|
|
9
11
|
},
|
|
10
12
|
"exports": {
|
|
11
13
|
"./esbuild/es2022": {
|
|
12
|
-
"
|
|
14
|
+
"types": "./esbuild/es2022/index.d.ts",
|
|
15
|
+
"import": "./esbuild/es2022/index.js"
|
|
13
16
|
}
|
|
14
17
|
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"prepublishOnly": "make prepublishOnly"
|
|
20
|
+
},
|
|
15
21
|
"files": [
|
|
16
22
|
"./esbuild/",
|
|
17
23
|
"./ts/"
|
package/esbuild/es2022/index.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { BuildOptions } from "esbuild";
|
|
2
|
-
|
|
3
|
-
export const es2022 = {
|
|
4
|
-
format: "esm",
|
|
5
|
-
target: "es2022",
|
|
6
|
-
|
|
7
|
-
bundle: true,
|
|
8
|
-
splitting: true,
|
|
9
|
-
|
|
10
|
-
chunkNames: "chunks/[name]-[hash]",
|
|
11
|
-
sourcemap: true,
|
|
12
|
-
|
|
13
|
-
packages: "external",
|
|
14
|
-
} as const satisfies BuildOptions;
|