Skip to content

Commit 58fabfc

Browse files
authored
✨ Add "experimental" entry point for new apis (#1210)
1 parent c4d14f6 commit 58fabfc

3 files changed

Lines changed: 11 additions & 4 deletions

File tree

deno.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"name": "@effection/effection",
3-
"exports": "./mod.ts",
43
"license": "ISC",
5-
"publish": { "include": ["lib", "mod.ts", "README.md"] },
4+
"publish": { "include": ["lib", "mod.ts", "experimental.ts", "README.md"] },
65
"lock": false,
76
"tasks": {
87
"test": "deno test --allow-run --allow-read --allow-env --allow-ffi",
@@ -28,6 +27,10 @@
2827
"tinyexec": "npm:tinyexec@1.0.1",
2928
"https://deno.land/x/path_to_regexp@v6.2.1/index.ts": "npm:path-to-regexp@8.2.0"
3029
},
30+
"exports": {
31+
".": "./mod.ts",
32+
"./experimental": "./experimental.ts"
33+
},
3134
"nodeModulesDir": "auto",
3235
"workspace": [
3336
"./www"

experimental.ts

Whitespace-only changes.

tasks/build-npm.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { build, emptyDir } from "jsr:@deno/dnt@0.41.3";
1+
import { build, emptyDir } from "jsr:@deno/dnt@0.42.3";
2+
import denoJSON from "../deno.json" with { type: "json" };
23

34
const outDir = "./build/npm";
45

@@ -10,7 +11,10 @@ if (!version) {
1011
}
1112

1213
await build({
13-
entryPoints: ["./mod.ts"],
14+
entryPoints: Object.entries(denoJSON.exports).map(([key, value]) => ({
15+
name: key,
16+
path: value,
17+
})),
1418
outDir,
1519
shims: {
1620
deno: false,

0 commit comments

Comments
 (0)