Commit a9053a1e authored by david's avatar david
Browse files

Initial version of run script. #1

parent e91907b1
...@@ -42,7 +42,7 @@ npm install ...@@ -42,7 +42,7 @@ npm install
Then start the development server using [Rollup](https://rollupjs.org) Then start the development server using [Rollup](https://rollupjs.org)
```bash ```bash
npm run dev ./run.sh
``` ```
Navigate to [localhost:5000](http://localhost:5000). You should see your app running. Edit a component file in `src`, Navigate to [localhost:5000](http://localhost:5000). You should see your app running. Edit a component file in `src`,
......
#!/bin/bash
mode="dev"
docker="false"
#
# Run Script for AURA Engine Clock
#
# Call with one of these parameters:
#
# - dev
# - build
#
if [[ $* =~ ^(dev|build)$ ]]; then
mode=$1
fi
if [[ "$1" == *"docker:"* ]]; then
docker="true"
mode=${1#*:}
fi
echo "[ Run mode=$mode ]"
echo "[ Docker=$docker ]"
# +++ DEFAULT COMMANDS +++ #
if [[ $docker == "false" ]]; then
### Runs the development server ###
if [[ $mode == "dev" ]]; then
npm run dev
fi
### Builds a package for production ###
if [[ $mode == "build" ]]; then
npm run build
mkdir -p dist
cp public/build/aura-clock-bundle.css dist/css/aura-clock-bundle.css
cp public/build/aura-clock-bundle.js dist/js/aura-clock-bundle.js
fi
fi
# +++ DOCKER COMMANDS +++ #
if [[ $docker == "true" ]]; then
BASE_D=$(realpath "${BASH_SOURCE%/*}/")
# ~~~ 404 ~~~
fi
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment