@cubing/dev-config 0.2.0 → 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 +3 -2
- package/esbuild/es2022/index.d.ts +5 -9
- package/esbuild/es2022/index.js +15 -8
- package/package.json +1 -1
- package/esbuild/es2022/index.js.map +0 -7
package/README.md
CHANGED
|
@@ -5,11 +5,12 @@
|
|
|
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
|
+
...es2022App({ dev: true }),
|
|
13
14
|
entryPoints: ["./src/index.ts"],
|
|
14
15
|
outdir: "./dist/lib/",
|
|
15
16
|
});
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
readonly chunkNames: "chunks/[name]-[hash]";
|
|
7
|
-
readonly sourcemap: true;
|
|
8
|
-
readonly packages: "external";
|
|
9
|
-
};
|
|
1
|
+
import type { BuildOptions } from "esbuild";
|
|
2
|
+
export declare function es2022App(options?: {
|
|
3
|
+
dev?: boolean;
|
|
4
|
+
}): BuildOptions;
|
|
5
|
+
export declare function es2022Lib(): BuildOptions;
|
package/esbuild/es2022/index.js
CHANGED
|
@@ -1,14 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
const common = {
|
|
3
3
|
format: "esm",
|
|
4
4
|
target: "es2022",
|
|
5
5
|
bundle: true,
|
|
6
6
|
splitting: true,
|
|
7
7
|
chunkNames: "chunks/[name]-[hash]",
|
|
8
|
-
sourcemap: true
|
|
9
|
-
packages: "external"
|
|
8
|
+
sourcemap: true
|
|
10
9
|
};
|
|
11
|
-
export {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/esbuild/es2022/index.ts"],
|
|
4
|
-
"sourcesContent": ["import type { BuildOptions } from \"esbuild\";\n\nexport const es2022 = {\n format: \"esm\",\n target: \"es2022\",\n\n bundle: true,\n splitting: true,\n\n chunkNames: \"chunks/[name]-[hash]\",\n sourcemap: true,\n\n packages: \"external\",\n} as const satisfies BuildOptions;\n"],
|
|
5
|
-
"mappings": ";AAEO,IAAM,SAAS;AAAA,EACpB,QAAQ;AAAA,EACR,QAAQ;AAAA,EAER,QAAQ;AAAA,EACR,WAAW;AAAA,EAEX,YAAY;AAAA,EACZ,WAAW;AAAA,EAEX,UAAU;AACZ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|