A templating script which takes in parameters from the user and setups a folder containing the base files required for a Chrome extension project.
- Templating for folders
- Git init feature with intial commit
- Ability to execute the script interactively taking in the user input
- The output folder is the --ext-name paramter to lowercase and spaces replaced with an _
- The icons are blank files with a .png extension and need to be replaced
/{output-location}/{ext-name}/
├── icons
│ ├── icon128.png
│ ├── icon16.png
│ ├── icon256.png
│ ├── icon32.png
│ └── icon48.png
├── manifest.json
├── res
│ └── styles.css
└── src
├── index.html
├── index.js
├── options.html
└── options.js
There are 2 ways to execute this script;
- Script with parameters
- Script with no parameters and hence run interactively
All of the required options and any optional ones you want to specify
./template-r.sh --author="Lui" --name="Template-r" --short="plate-r" --description="Create a template"
# --author="<String>" ;; default="Joe Bloggs" ;; name of the author
# --name="<String>" ;; default="Amazing Extension" ;; name of the extension
# --short="<String>" ;; default="Shorty" ;; short name of the extension
# --desc="<String>" ;; default="What a great extension" ;; no explanation needed
# --output="<String>" ;; default=cwd ;; where to output the output folder
# --permissions="<String>" ;; default="" ;; permissions to give the app i.e. tabs
# --gitinit=true ;; default=false ;; whether to git init and start git source control
# --commitmsg="<String>" ;; default="Initial commit and setup" ;; message for the intial commit message (have to specified the git-init parameter)
./template-r.sh