forked from Kocal/vue-web-extension
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenerate-examples.sh
executable file
·42 lines (32 loc) · 975 Bytes
/
generate-examples.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env bash
scenarios=( full full-airbnb minimal )
for scenario in "${scenarios[@]}"
do
echo "-------------------------------"
echo "Generating example $scenario..."
echo "Removing previous example..."
mkdir -p examples
cd examples
rm -fr $scenario
echo "Generating new example"
VUE_TEMPLATE=$scenario npx vue-cli init .. $scenario
cd $scenario
cat << EOF > README.md
# Project: $scenario
This project has been generated with \`vue init kocal/vue-web-extension .\` command, following [$scenario scenario](../../scenarios/minimal.json).
EOF
echo "Installing dependencies"
yarn
if [[ "$scenario" =~ ^full ]];then
echo "Linting..."
yarn lint --fix;
fi
if [[ "$scenario" =~ ^full ]];then
echo "Prettying..."
yarn prettier:write;
fi
echo "Commiting..."
git add .
git commit -m "chore(example): update \"$scenario\" example" --no-verify
cd ../..
done