mirror of
https://github.com/ruilisi/fortune-sheet.git
synced 2025-01-09 04:07:33 +08:00
24 lines
616 B
JavaScript
24 lines
616 B
JavaScript
const fs = require("fs");
|
|
const { spawnSync } = require("child_process");
|
|
|
|
const tsconfig = JSON.parse(fs.readFileSync("tsconfig.json"));
|
|
|
|
delete tsconfig.compilerOptions.paths;
|
|
tsconfig.include = ["./src"];
|
|
tsconfig.exclude = [
|
|
"node_modules",
|
|
"**/*.test.ts",
|
|
"**/*.spec.ts",
|
|
"dist",
|
|
"lib",
|
|
];
|
|
|
|
const tsconfigJson = JSON.stringify(tsconfig);
|
|
fs.writeFileSync("packages/core/tsconfig.json", tsconfigJson);
|
|
fs.writeFileSync("packages/react/tsconfig.json", tsconfigJson);
|
|
|
|
spawnSync("father-build", { stdio: "inherit" });
|
|
|
|
fs.rmSync("packages/core/tsconfig.json");
|
|
fs.rmSync("packages/react/tsconfig.json");
|