Skip to content

Commit f76107a

Browse files
committed
fix: cherry-pick
1 parent 9cfd8a9 commit f76107a

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

scripts/build.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,24 @@ import "./clean";
33
import { copyPackageSet } from "./tools/copyPackageSet";
44
import { generateExportsField } from "./tools/dualPackageSupport";
55
import { shell } from "./tools/shell";
6+
import * as fs from "fs";
7+
8+
const { default: cherryPick } = require("cherry-pick");
69

710
const main = async () => {
811
await Promise.all([
912
shell("yarn tsc -p tsconfig.esm.json -d --emitDeclarationOnly --outDir ./lib/\\$types"),
1013
shell("yarn tsc -p tsconfig.cjs.json"),
1114
shell("yarn tsc -p tsconfig.esm.json"),
1215
]);
13-
await shell("cherry-pick --cwd ./lib --input-dir ../src --types-dir ./\\$types --cjs-dir ./\\$cjs --esm-dir ./\\$esm");
16+
17+
await cherryPick({ inputDir: "../src", cwd: "./lib", typesDir: "./$types", cjsDir: "./$cjs", esmDir: "./$esm" });
18+
19+
20+
const outputList = fs.readdirSync("./lib");
21+
22+
console.log("Output list");
23+
console.log(outputList);
1424

1525
const exportsFiled = generateExportsField("./src", {
1626
directory: {

0 commit comments

Comments
 (0)