Skip to content

Commit b475103

Browse files
committed
Update
1 parent cff5539 commit b475103

File tree

1 file changed

+49
-11
lines changed

1 file changed

+49
-11
lines changed

foundation-website-init.sh

Lines changed: 49 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/usr/bin/env bash
2-
3-
# foundation-website-init.sh from within http://github.com/wilsonmar/git-utilities
2+
# foundation-website-init.sh from http://github.com/wilsonmar/git-utilities
43
# by Wilson Mar ([email protected], @wilsonmar)
54

65
TZ=":UTC" date +%z
@@ -15,30 +14,69 @@ git --version
1514

1615
GITHUB_USER="hotwilson"
1716
REPONAME='website1'
18-
echo ${REPONAME} >website_name
1917

20-
npm install -g foundation-cli
18+
echo "******** GITHUB_USER=$GITHUB_USER "
2119

22-
npm i -g npm
20+
mkdir ~/gits/${GITHUB_USER}
21+
cd ~/gits/${GITHUB_USER}
22+
23+
echo "******** STEP Delete \"$REPONAME\" remnant from previous run:"
24+
# set -x # xtrace command echo on (with ++ prefix). http://www.faqs.org/docs/abs/HTML/options.html
25+
# Remove folder if exists (no symbolic links are used here):
26+
if [ -d ${REPONAME} ]; then
27+
rm -rf ${REPONAME}
28+
fi
29+
30+
CURRENTDIR=${PWD##*/}
31+
echo "CURRENTDIR=$CURRENTDIR"
2332

33+
# exit #3
34+
35+
36+
# These can be run from any directory:
37+
# install node
38+
npm install -g foundation-cli
39+
npm i -g npm
2440
# Verify if foundation has been installed or abort:
2541
foundation -version
2642

27-
mkdir ~/gits/${GITHUB_USER}/${REPONAME}
28-
cd ~/gits/${GITHUB_USER}/${REPONAME}
43+
# exit #4
44+
45+
echo ${REPONAME} >website_name
46+
foundation new --framework sites --template zurb <website_name
47+
# WARNING: A large amount of output comes out.
2948

30-
git clone https://github.com/${GITHUB_USER}/${REPONAME}
49+
cd ${REPONAME}
50+
pwd
3151

52+
# exit #5
53+
54+
# Download dependencies per package.json:
3255
npm install
3356

34-
git init && git add . && git commit -m”Initial”
57+
# exit #6
3558

36-
# Run in batch:
59+
# Start web server:
3760
npm start &
3861

62+
# exit #7
63+
64+
# Add template:
65+
66+
# exit #8
67+
3968
npm run build
69+
# exit #9
4070

4171
open http://localhost:8000
4272

43-
git add . && git commit -m”update” && git push
73+
exit #10
74+
75+
76+
77+
# git add . && git commit -m”update” && git push
78+
79+
# git init && git add . && git commit -m”Initial”
80+
81+
# exit #10
4482

0 commit comments

Comments
 (0)