Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions TODOs
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
= for VERSION 1.0 =
Branding
Create README

BUGS:
Blank lines counted as double at the end of the file

= for VERSION 1.1 =
Save last state of the editor upon close
Dynamic Skins
96 changes: 53 additions & 43 deletions scripts/postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,62 +12,72 @@ switch (platform) {
// macOS specific code
switch (arch) {
case "x64": {
const scripts = fs.readdirSync(
path.join(__dirname, "darwin-x64", "postinstall")
);
scripts.forEach((script) => {
if (script.endsWith(".js")) {
require(
path.join(__dirname, "darwin-x64", "postinstall", script)
)();
}
});
if (fs.existsSync(path.join(__dirname, "darwin-x64", "postinstall"))) {
const scripts = fs.readdirSync(
path.join(__dirname, "darwin-x64", "postinstall")
);
scripts.forEach((script) => {
if (script.endsWith(".js")) {
require(
path.join(__dirname, "darwin-x64", "postinstall", script)
)();
}
});
} else return;
break;
}
case "arm64": {
const scripts = fs.readdirSync(
path.join(__dirname, "darwin-arm64", "postinstall")
);
scripts.forEach((script) => {
if (script.endsWith(".js")) {
require(
path.join(__dirname, "darwin-arm64", "postinstall", script)
)();
}
});
if (
fs.existsSync(path.join(__dirname, "darwin-arm64", "postinstall"))
) {
const scripts = fs.readdirSync(
path.join(__dirname, "darwin-arm64", "postinstall")
);
scripts.forEach((script) => {
if (script.endsWith(".js")) {
require(
path.join(__dirname, "darwin-arm64", "postinstall", script)
)();
}
});
} else return;
break;
}
default:
console.log("Are you still using PowerPC?");
}
break;
case "linux": {
const scripts = fs.readdirSync(
path.join(__dirname, "linux", "postinstall")
);
scripts.forEach((script) => {
if (script.endsWith(".js")) {
require(path.join(__dirname, "linux", "postinstall", script))();
} else if (script.endsWith(".sh")) {
execSync(
`chmod +x ${path.join(__dirname, "linux", "postinstall", script)}`
);
execSync(`${path.join(__dirname, "linux", "postinstall", script)}`);
}
});
if (fs.existsSync(path.join(__dirname, "linux", "postinstall"))) {
const scripts = fs.readdirSync(
path.join(__dirname, "linux", "postinstall")
);
scripts.forEach((script) => {
if (script.endsWith(".js")) {
require(path.join(__dirname, "linux", "postinstall", script))();
} else if (script.endsWith(".sh")) {
execSync(
`chmod +x ${path.join(__dirname, "linux", "postinstall", script)}`
);
execSync(`${path.join(__dirname, "linux", "postinstall", script)}`);
}
});
} else return;
break;
}
case "win32": {
const scripts = fs.readdirSync(
path.join(__dirname, "win32", "postinstall")
);
scripts.forEach((script) => {
if (script.endsWith(".js")) {
require(path.join(__dirname, "win32", "postinstall", script))();
} else if (script.endsWith(".bat")) {
execSync(`${path.join(__dirname, "win32", "postinstall", script)}`);
}
});
if (fs.existsSync(path.join(__dirname, "win32", "postinstall"))) {
const scripts = fs.readdirSync(
path.join(__dirname, "win32", "postinstall")
);
scripts.forEach((script) => {
if (script.endsWith(".js")) {
require(path.join(__dirname, "win32", "postinstall", script))();
} else if (script.endsWith(".bat")) {
execSync(`${path.join(__dirname, "win32", "postinstall", script)}`);
}
});
} else return;
break;
}
default:
Expand Down
4 changes: 3 additions & 1 deletion scripts/win32/build.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@echo off
cd ..
cd ..
npx electron-builder
npx electron-builder
cd scripts
cd win32
4 changes: 3 additions & 1 deletion scripts/win32/install.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@echo off
cd ..
cd ..
npm i
npm i
cd scripts
cd win32
4 changes: 3 additions & 1 deletion scripts/win32/launch.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@echo off
cd ..
cd ..
npm start
npm start
cd scripts
cd win32
4 changes: 3 additions & 1 deletion scripts/win32/lineCount.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@echo off
cd ..
cd ..
cloc modules front filePresets main.js
cloc modules front filePresets main.js scripts
cd scripts
cd win32
4 changes: 3 additions & 1 deletion scripts/win32/lint.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@echo off
cd ..
cd ..
npx eslint .
npx eslint .
cd scripts
cd win32
4 changes: 3 additions & 1 deletion scripts/win32/pretty.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@echo off
cd ..
cd ..
npx prettier . --write
npx prettier . --write
cd scripts
cd win32