Skip to content

Instantly share code, notes, and snippets.

@joscha
Last active June 18, 2024 14:17
Show Gist options
  • Save joscha/49e26fb6a2e3b9cbae0f1f44b5879ec6 to your computer and use it in GitHub Desktop.
Save joscha/49e26fb6a2e3b9cbae0f1f44b5879ec6 to your computer and use it in GitHub Desktop.
// I am empty, weeee!
// ex. scripts/build_npm.ts
import { build, emptyDir } from "@deno/dnt";
await emptyDir("./npm");
await build({
entryPoints: ["./foo.ts"],
outDir: "./npm",
shims: {
// see JS docs for overview and more options
deno: true,
},
package: {
// package.json properties
name: "your-package",
version: Deno.args[0],
description: "Your package.",
license: "MIT",
repository: {
type: "git",
url: "git+https://github.com/username/repo.git",
},
bugs: {
url: "https://github.com/username/repo/issues",
},
},
});
{
"imports": {
"@deno/dnt": "jsr:@deno/dnt@^0.41.2"
}
}
import './bla.ts';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment