Skip to content

Commit

Permalink
fix: missing meta files no longer crash the dist package
Browse files Browse the repository at this point in the history
  • Loading branch information
ashblue committed May 31, 2019
1 parent dc37d4c commit 32f782d
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 4 deletions.
1 change: 1 addition & 0 deletions Assets/FluidBehaviorTree/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Placeholder for meta files
7 changes: 7 additions & 0 deletions Assets/FluidBehaviorTree/CHANGELOG.md.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Assets/FluidBehaviorTree/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Placeholder for meta files
7 changes: 7 additions & 0 deletions Assets/FluidBehaviorTree/LICENSE.md.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Assets/FluidBehaviorTree/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Placeholder for meta files
7 changes: 7 additions & 0 deletions Assets/FluidBehaviorTree/README.md.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions create-dist.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,22 @@ const COPY_FILES = [

async function init () {
await del([OUTPUT]);
copyFiles();

copyDir.sync(SOURCE, OUTPUT, {});
crossPopulatePackages();
fs.copyFileSync(`${SOURCE}/package.json`, `${OUTPUT}/package.json`);
copyFiles();
await zip(OUTPUT, `${OUTPUT}.zip`);

console.log(`Copied files from ${SOURCE} to ${OUTPUT}`);
}

function copyFiles() {
copyDir.sync(SOURCE, OUTPUT, {});
COPY_FILES.forEach((file) => {
const dest = `${OUTPUT}/${file}`;
if (!fs.existsSync(file)) return;
fs.copyFileSync(file, `${OUTPUT}/${file}`);
if (fs.existsSync(dest)) fs.unlinkSync(dest);
fs.copyFileSync(file, dest);
});
}

Expand Down

0 comments on commit 32f782d

Please sign in to comment.