diff --git a/build_npm.ts b/build_npm.ts index 05b48f2..25414c5 100644 --- a/build_npm.ts +++ b/build_npm.ts @@ -1,25 +1,17 @@ // ex. scripts/build_npm.ts import { build, emptyDir } from "https://deno.land/x/dnt@0.33.1/mod.ts"; +import pkg from "./package.json" assert { type: "json" }; await emptyDir("./npm"); -await build({ - entryPoints: ["./index.ts"], - outDir: "./npm", - shims: { deno: { test: true } }, - package: { - name: "promise.object", - version: Deno.args[0], - description: "Deep resolve promises in objects.", - keywords: ["Promise", "A+", "objects", "deep resolve"], - author: "Muthu Kumar <@MKRhere> (https://mkr.pw)", - contributors: ["Thomas Rory Gummerson <@TRGWII> (https://rory.no)"], - repository: { type: "git", url: "git+https://github.com/codefeathers/Promise.object.git" }, - bugs: { url: "https://github.com/codefeathers/Promise.object/issues" }, - homepage: "https://github.com/codefeathers/Promise.object#readme", - license: "MIT", - }, -}); +await build( + Object.assign({ + entryPoints: ["./index.ts"], + outDir: "./npm", + shims: { deno: { test: true } }, + package: Object.assign(pkg, { version: Deno.args[0] }), + }), +); // post build steps Deno.copyFileSync("LICENSE", "npm/LICENSE"); diff --git a/package.json b/package.json new file mode 100644 index 0000000..a00e73f --- /dev/null +++ b/package.json @@ -0,0 +1,23 @@ +{ + "name": "@codefeathers/promise.object", + "description": "Deep resolve promises in objects.", + "keywords": [ + "Promise", + "A+", + "objects", + "deep resolve" + ], + "author": "Muthu Kumar <@MKRhere> (https://mkr.pw)", + "contributors": [ + "Thomas Rory Gummerson <@TRGWII> (https://rory.no)" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/codefeathers/Promise.object.git" + }, + "bugs": { + "url": "https://github.com/codefeathers/Promise.object/issues" + }, + "homepage": "https://github.com/codefeathers/Promise.object#readme", + "license": "MIT" +}