Skip to content

Commit

Permalink
⬆️ upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
kingsword09 committed Aug 8, 2023
1 parent 6bd836d commit a72e4be
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 26 deletions.
5 changes: 4 additions & 1 deletion deno.jsonc → deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,8 @@
"proseWrap": "preserve"
}
},
"importMap": "./import_map.json"
"imports": {
"dnt": "https://deno.land/x/dnt@0.38.0/mod.ts",
"std_path": "https://deno.land/std@0.197.0/path/mod.ts"
}
}
6 changes: 0 additions & 6 deletions import_map.json

This file was deleted.

1 change: 0 additions & 1 deletion scripts/npm.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "dnt-starter",
"version": "0.0.1",
"description": "Fast dnt template project.",
"importMap": "./import_map.json",
"outDir": "./.npm",
"entryPoints": [
{
Expand Down
31 changes: 13 additions & 18 deletions scripts/npm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { build, emptyDir, type BuildOptions, type EntryPoint } from "dnt";
import npmConfig from "./npm.json" assert { type: "json" };

export const buildOptions: BuildOptions = {
importMap: npmConfig.importMap,
entryPoints: npmConfig.entryPoints as EntryPoint[],
outDir: npmConfig.outDir,
typeCheck: true,
declaration: "separate",
typeCheck: "both",
shims: {
deno: "dev",
},
Expand All @@ -19,26 +19,21 @@ export const buildOptions: BuildOptions = {
name: npmConfig.name,
version: npmConfig.version,
description: npmConfig.description,
license: "MIT",
repository: {
type: "git",
url: "git+https://github.com/BioforestChain/plaoc.git",
},
bugs: {
url: "https://github.com/BioforestChain/plaoc/issues",
},
license: "MIT"
},
postBuild() {
Deno.copyFileSync(
path.relative(Deno.cwd(), "./LICENSE"),
path.relative(Deno.cwd(), path.resolve(npmConfig.outDir, "LICENSE")
));
Deno.copyFileSync(
path.relative(Deno.cwd(), "./README.md"),
path.relative(Deno.cwd(), path.resolve(npmConfig.outDir, "README.md")
));
}
};

if (import.meta.main) {
emptyDir("./.npm");
await build(buildOptions);
await Deno.copyFile(
"./LICENSE",
path.relative(Deno.cwd(), path.resolve(npmConfig.outDir, "LICENSE"))
);
await Deno.copyFile(
"./README.md",
path.relative(Deno.cwd(), path.resolve(npmConfig.outDir, "README.md"))
);
}

0 comments on commit a72e4be

Please sign in to comment.