rework misskey-js build to preserve original package structure
This commit is contained in:
parent
b8a3bd6182
commit
2faeabe79c
7 changed files with 55 additions and 15 deletions
12
packages/misskey-js/scripts/post-build.mjs
Normal file
12
packages/misskey-js/scripts/post-build.mjs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import {libBuild, outDir, testDBuild, testDSource} from './_common.mjs';
|
||||
import {rm, cp} from 'fs/promises';
|
||||
|
||||
// Always clean the output, because artifacts are cached in the build directory instead.
|
||||
console.log(`Cleaning output directory ${outDir}...`);
|
||||
await rm(outDir, { recursive: true, force: true });
|
||||
|
||||
// Copy built lib to output directory.
|
||||
await cp(libBuild, outDir, { recursive: true });
|
||||
|
||||
// Stage test-d sources in the build directory so tsd will work.
|
||||
await cp(testDSource, testDBuild, { recursive: true });
|
||||
Loading…
Add table
Add a link
Reference in a new issue