Skip to content

Commit

Permalink
chore: Fix build on Windows in git bash
Browse files Browse the repository at this point in the history
  • Loading branch information
personalizedrefrigerator committed Feb 16, 2024
1 parent 7ef6659 commit 78fa316
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
7 changes: 6 additions & 1 deletion packages/build-tool/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env ts-node
import { argv, exit } from 'node:process';
import path from 'node:path';
import { existsSync, readFileSync, realpathSync } from 'node:fs';
import { existsSync, mkdirSync, readFileSync, realpathSync } from 'node:fs';
import CompiledTypeScriptDirectory from './CompiledTypeScriptDirectory';
import BundledFile from './BundledFile';
import buildTranslationTemplates from './buildTranslationTemplates';
Expand Down Expand Up @@ -221,6 +221,11 @@ const main = async () => {
console.log('Building translation templates...');
buildTranslationTemplates(config);
} else {
if (config.outDirectory && !existsSync(config.outDirectory)) {
console.log('Creating output directory...');
mkdirSync(config.outDirectory, { recursive: true });
}

void bundleFiles(config, buildMode);

void compileSCSS(config, buildMode);
Expand Down
4 changes: 2 additions & 2 deletions packages/debugging/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"private": true,
"scripts": {
"dist": "npm run build",
"build": "rm -rf ./dist && mkdir dist && build-tool build",
"watch": "rm -rf ./dist/* && mkdir -p dist && build-tool watch"
"build": "rm -rf ./dist && build-tool build",
"watch": "build-tool watch"
},
"devDependencies": {
"@js-draw/build-tool": "^1.11.1"
Expand Down
4 changes: 2 additions & 2 deletions packages/js-draw/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
"scripts": {
"dist-test": "cd dist-test/test_imports && npm install && npm run test",
"dist": "npm run build && npm run dist-test",
"build": "rm -rf ./dist/* && mkdir -p dist && build-tool build",
"watch": "rm -rf ./dist/* && mkdir -p dist && build-tool watch",
"build": "rm -rf ./dist/* && build-tool build",
"watch": "build-tool watch",
"build-translation-templates": "build-tool build-translation-templates",
"prepack": "npm run dist && cd ../../ && npm run test && cd packages/js-draw && ts-node tools/copyREADME.ts copy",
"postpack": "ts-node tools/copyREADME.ts revert"
Expand Down
4 changes: 2 additions & 2 deletions packages/material-icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"private": false,
"scripts": {
"dist": "npm run build",
"build": "rm -rf ./dist/* && mkdir -p dist && build-tool build",
"watch": "rm -rf ./dist/* && mkdir -p dist && build-tool watch"
"build": "rm -rf ./dist/* && build-tool build",
"watch": "build-tool watch"
},
"devDependencies": {
"@js-draw/build-tool": "^1.11.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/math/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"scripts": {
"dist-test": "cd dist-test/test_imports && npm install && npm run test",
"dist": "npm run build && npm run dist-test",
"build": "rm -rf ./dist && mkdir dist && build-tool build",
"watch": "rm -rf ./dist/* && mkdir -p dist && build-tool watch"
"build": "rm -rf ./dist && build-tool build",
"watch": "build-tool watch"
},
"dependencies": {
"bezier-js": "6.1.3"
Expand Down

0 comments on commit 78fa316

Please sign in to comment.