mirror of https://git.sr.ht/~statianzo/pmrpc
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
642 B
25 lines
642 B
3 years ago
|
import buildIndex from './buildIndex.js';
|
||
|
import {createRequire} from 'module';
|
||
|
import { resolve } from 'path';
|
||
|
import {fileURLToPath} from 'url';
|
||
|
const require = createRequire(import.meta.url)
|
||
|
const pkg = require("../package.json");
|
||
|
const __dirname = resolve(fileURLToPath(import.meta.url), '..');
|
||
|
|
||
|
const run = () =>
|
||
|
Promise.all([
|
||
|
buildIndex({
|
||
|
format: "cjs",
|
||
|
outfile: resolve(__dirname, "..", pkg.main),
|
||
|
}),
|
||
|
buildIndex({
|
||
|
format: "esm",
|
||
|
outfile: resolve(__dirname, "..", pkg.module),
|
||
|
}),
|
||
|
buildIndex({
|
||
|
format: "iife",
|
||
|
outfile: resolve(__dirname, "..", pkg.unpkg),
|
||
|
}),
|
||
|
]);
|
||
|
|
||
|
run();
|