create script for builing npm package
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
npm/*
|
||||
17
build-for-npm.ts
Normal file
17
build-for-npm.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { build, emptyDir } from "https://deno.land/x/dnt@0.40.0/mod.ts";
|
||||
|
||||
await emptyDir("./npm");
|
||||
|
||||
await build({
|
||||
entryPoints: ["./mod.ts"],
|
||||
outDir: "./npm",
|
||||
shims: {
|
||||
// see JS docs for overview and more options
|
||||
deno: true,
|
||||
},
|
||||
package: {
|
||||
// package.json properties
|
||||
name: "result",
|
||||
version: Deno.args[0],
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user