Skip to content

Commit

Permalink
publish npm
Browse files Browse the repository at this point in the history
  • Loading branch information
JLarky committed Sep 21, 2023
1 parent c8b3cfd commit 2cc882d
Show file tree
Hide file tree
Showing 3 changed files with 142 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm
52 changes: 52 additions & 0 deletions _build_npm.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!/usr/bin/env -S deno run --allow-read --allow-write --allow-net --allow-env --allow-run
// Copyright 2018-2022 the oak authors. All rights reserved. MIT license.

/**
* This is the build script for building npm package.
*
* @module
*/

import { build, emptyDir } from "https://deno.land/x/[email protected]/mod.ts";

async function start() {
await emptyDir("./npm");

await build({
entryPoints: ["./mod.ts"],
outDir: "./npm",
shims: {},
test: false,
typeCheck: "both",
compilerOptions: {
importHelpers: false,
sourceMap: true,
target: "ES2021",
lib: ["esnext", "dom", "dom.iterable"],
},
package: {
name: "is-bun",
version: Deno.args[0],
description: "Return true if you are running in Bun.",
license: "MIT",
keywords: ["bun"],
engines: {
node: ">=8.0.0",
},
repository: {
type: "git",
url: "git+https://github.com/JLarky/is-bun.git",
},
bugs: {
url: "https://github.com/JLarky/is-bun/issues",
},
dependencies: {},
devDependencies: {},
},
});

await Deno.copyFile("LICENSE", "npm/LICENSE");
await Deno.copyFile("README.md", "npm/README.md");
}

start();
90 changes: 89 additions & 1 deletion deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2cc882d

Please sign in to comment.