Use esbuild js
This commit is contained in:
parent
d3f4cde372
commit
7ff6714ff8
|
@ -1,19 +1,18 @@
|
||||||
#!/usr/bin/node
|
#!/usr/bin/node
|
||||||
const coreBuild = require("../../../scripts/build")
|
const coreBuild = require("../../../scripts/build")
|
||||||
const { exec } = require("child_process")
|
|
||||||
|
|
||||||
coreBuild("./src/plugin/index.ts", "./dist/plugins.js")
|
coreBuild("./src/plugin/index.ts", "./dist/plugins.js")
|
||||||
coreBuild("./src/index.ts", "./dist/index.js")
|
coreBuild("./src/index.ts", "./dist/index.js")
|
||||||
|
|
||||||
const child = exec(
|
const esbuild = require("esbuild")
|
||||||
`esbuild ./tests/*.[tj]s ./tests/**/*.[tj]s --outdir=./dist/tests`
|
const glob = require("glob")
|
||||||
)
|
|
||||||
child.stdout.on("data", data => {
|
const inputFiles = glob.sync("./tests/**/*.[tj]s", { nodir: true })
|
||||||
console.log(`stdout: ${data}`)
|
const outputDir = "./dist/tests"
|
||||||
})
|
|
||||||
child.stderr.on("data", data => {
|
esbuild
|
||||||
console.error(`stderr: ${data}`)
|
.build({
|
||||||
})
|
entryPoints: inputFiles,
|
||||||
child.on("close", code => {
|
outdir: outputDir,
|
||||||
console.log(`esbuild process exited with code ${code}`)
|
})
|
||||||
})
|
.catch(() => process.exit(1))
|
||||||
|
|
Loading…
Reference in New Issue