mirror of
https://github.com/tribufu/sdk-js
synced 2025-06-16 10:44:17 +00:00
Prototype API (#2)
* Add oauth2 client * Update LICENSE.txt * Add oauth2 types * Prepare for publish
This commit is contained in:
30
scripts/esbuild.js
Normal file
30
scripts/esbuild.js
Normal file
@ -0,0 +1,30 @@
|
||||
// Copyright (c) Tribufu. All Rights Reserved.
|
||||
|
||||
import { build } from "esbuild";
|
||||
import { nodeExternalsPlugin } from "esbuild-node-externals";
|
||||
|
||||
const baseConfig = {
|
||||
entryPoints: ["src/index.ts"],
|
||||
platform: "neutral",
|
||||
target: "node18",
|
||||
bundle: true,
|
||||
minify: true,
|
||||
sourcemap: false,
|
||||
legalComments: "linked",
|
||||
plugins: [nodeExternalsPlugin()],
|
||||
};
|
||||
|
||||
const moduleConfig = {
|
||||
...baseConfig,
|
||||
outfile: "build/index.mjs",
|
||||
format: "esm",
|
||||
};
|
||||
|
||||
const legacyConfig = {
|
||||
...baseConfig,
|
||||
outfile: "build/index.cjs",
|
||||
format: "cjs",
|
||||
};
|
||||
|
||||
build(moduleConfig).catch(() => process.exit(1));
|
||||
build(legacyConfig).catch(() => process.exit(1));
|
Reference in New Issue
Block a user