Skip to content

Commit

Permalink
fix: tools
Browse files Browse the repository at this point in the history
  • Loading branch information
odorajbotoj committed Jun 25, 2024
1 parent c22de65 commit 604b380
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
5 changes: 3 additions & 2 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "freecamera",
"scripts": {
"build": "tsc",
"clean": "node tools/clean.js",
Expand Down
2 changes: 1 addition & 1 deletion tools/clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ const path = require("path");

const DEFAULT_CLEAN_DIRECTORIES = ['build', 'src_out'];

for (var dir in DEFAULT_CLEAN_DIRECTORIES) {
for (var dir of DEFAULT_CLEAN_DIRECTORIES) {
rimraf.rimrafSync(path.resolve(process.cwd(), dir));
}
5 changes: 1 addition & 4 deletions tools/pack.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,5 @@ const output = fs.createWriteStream(`build/${NAME}-bp.mcpack`);
const archive = archiver("zip");
archive.on("error", (err) => { throw err; });
archive.pipe(output);
archive.directory(`build/${NAME}/`);
archive.directory(`build/${NAME}/`, `${NAME}`);
archive.finalize();

// clean
rimraf.rimrafSync(`build/${NAME}/`);

0 comments on commit 604b380

Please sign in to comment.