Skip to content

Instantly share code, notes, and snippets.

@compscitwilight
Last active November 25, 2023 15:56
Show Gist options
  • Save compscitwilight/0f6f55f12a544b43979b1349cc0a2c10 to your computer and use it in GitHub Desktop.
Save compscitwilight/0f6f55f12a544b43979b1349cc0a2c10 to your computer and use it in GitHub Desktop.
# !/bin/bash
# This shell script automates the setup process of creating a barebones Electron project
# w/ TypeSCript and TSC compiler scripts.
echo "= Instantializing NPM project... =";
npm init -y
npm i electron
npm i tsc typescript electron-packager --save-dev
mkdir bin
mkdir src
mkdir src/view
touch build.sh
echo "
if [ -d bin/view ]
then
rm -rf bin/view
fi
cp -r src/view bin
tsc src/*.ts --outDir bin
echo \"Build completed\"
" >> build.sh
touch src/index.ts
echo "// This is the start of your Electron TypeScript project." >> src/index.ts
echo "// To start the build process, run the build.sh script located in the root directory of this project." >> src/index.ts
echo "// To start the build, run electron . in the root directory." >> src/index.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment