Skip to content

Instantly share code, notes, and snippets.

@evanxg852000
Last active June 16, 2017 15:55
Show Gist options
  • Save evanxg852000/e18d6a2ad11f6b54c7207517190a8073 to your computer and use it in GitHub Desktop.
Save evanxg852000/e18d6a2ad11f6b54c7207517190a8073 to your computer and use it in GitHub Desktop.
Electron forge utility for generating electron project without globally installing electron forge
#!/bin/bash
if [ $# -eq 0 ]
then
echo "Electron forge: please provide the project name".
exit 0
fi
mkdir $1
cd $1
npm init
npm i --save-dev electron-forge
PATH=$(npm bin):$PATH
if [ $# -gt 1 ]
then
electron-forge init --template=$1
else
electron-forge init
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment