forked from cadence/Carbon
Build script creates required directories
This commit is contained in:
parent
e13c4fdb00
commit
352084b4df
2 changed files with 4 additions and 1 deletions
3
build.js
3
build.js
|
@ -217,6 +217,9 @@ async function addBabel(sourcePath, targetPath) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const dirs = [...new Set(spec.map(item => path.dirname(item.target))).values()]
|
||||||
|
await Promise.all(dirs.map(d => fs.mkdir(pj(buildDir, d), {recursive: true})))
|
||||||
|
|
||||||
// Stage 2: Build
|
// Stage 2: Build
|
||||||
for (const item of spec) {
|
for (const item of spec) {
|
||||||
if (item.type === "file") {
|
if (item.type === "file") {
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "node build.js",
|
"build": "node build.js",
|
||||||
"watch": "fish -c 'while true; echo -n \"Build started at \"; date; npm run build; inotifywait (find src -type f) build.js -e close_write -qq; end'",
|
"watch": "fish -c 'while true; echo -n \"Build started at \"; date; npm run build; inotifywait (find src -type f) build.js -e close_write -qq; end'",
|
||||||
"rebuild": "find build -type f -exec rm {} \\; && node build.js"
|
"rebuild": "rm build -rf && node build.js"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "",
|
||||||
|
|
Loading…
Reference in a new issue