add npm script
This commit is contained in:
parent
eb5e78346e
commit
536eb76dce
5 changed files with 33 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
||||||
dist/
|
dist/
|
||||||
|
npm/
|
1
.npmrc
Normal file
1
.npmrc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
@hamcha:registry=https://git.fromouter.space/api/packages/hamcha/npm/
|
|
@ -1 +1 @@
|
||||||
export * from "./makeDOM";
|
export * from "./makeDOM.ts";
|
||||||
|
|
27
scripts/npm.ts
Normal file
27
scripts/npm.ts
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
import { build, emptyDir } from "https://deno.land/x/dnt@0.38.1/mod.ts";
|
||||||
|
|
||||||
|
await emptyDir("./npm");
|
||||||
|
|
||||||
|
await build({
|
||||||
|
entryPoints: ["./domutil.ts"],
|
||||||
|
outDir: "./npm",
|
||||||
|
shims: {},
|
||||||
|
esModule: true,
|
||||||
|
compilerOptions: {
|
||||||
|
lib: ["ES2017", "DOM"],
|
||||||
|
},
|
||||||
|
package: {
|
||||||
|
name: "@hamcha/domutil",
|
||||||
|
version: Deno.args[0],
|
||||||
|
description: "Cursed DOM microlibrary",
|
||||||
|
license: "AGPL-3.0",
|
||||||
|
repository: {
|
||||||
|
type: "git",
|
||||||
|
url: "git+https://git.fromouter.space/Hamcha/domutil",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
postBuild() {
|
||||||
|
Deno.copyFileSync("LICENSE", "npm/LICENSE");
|
||||||
|
Deno.copyFileSync(".npmrc", "npm/.npmrc");
|
||||||
|
},
|
||||||
|
});
|
|
@ -14,8 +14,9 @@
|
||||||
"alwaysStrict": true,
|
"alwaysStrict": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
"allowImportingTsExtensions": true,
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"lib": ["ES2017", "dom"]
|
"lib": ["ES2017", "dom"]
|
||||||
},
|
},
|
||||||
"exclude": ["dist", "scripts"],
|
"exclude": ["dist", "scripts", "npm"],
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue