Skip to content

Commit

Permalink
Merge pull request #27 from dandv/master
Browse files Browse the repository at this point in the history
Add Windows initproject script
  • Loading branch information
robrighter committed Mar 1, 2013
2 parents 79e58c7 + f3d8a83 commit b7b5d17
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 7 deletions.
38 changes: 38 additions & 0 deletions initproject.bat
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,38 @@
REM @echo off
echo "Creating necessary folders..."
mkdir .\static
mkdir .\static\images
mkdir .\static\css
mkdir .\static\js
mkdir .\views
mkdir .\models
mkdir .\test

echo "Copying code, markup and CSS boilerplate..."
copy .\templates\app\server.js .\server.js
copy .\templates\app\package.json .\package.json
copy .\templates\app\.gitignore .\.gitignore
copy .\templates\app\config.json .\config.json
copy .\templates\app\Makefile .\Makefile
copy .\templates\test\stub.js .\test\stub.js
curl https:\\raw.github.com\h5bp\html5-boilerplate\master\css\main.css > .\static\css\style.css
copy .\templates\views\500.jade .\views\500.jade
copy .\templates\views\404.jade .\views\404.jade
copy .\templates\views\index.jade .\views\index.jade
copy .\templates\views\layout.jade .\views\layout.jade
copy .\templates\js\script.js .\static\js\script.js
REM TODO copy over the models

echo "Setting up dependencies from NPM..."
npm install

echo "Removing stuff you don't want..."
del /S /F .git
del /S /F templates
del README.md
del initproject.sh

echo "Initializing new git project..."
git init
git add .
git commit -m"Initial Commit"
13 changes: 6 additions & 7 deletions initproject.sh
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
echo "Creating necessary folders" echo "Creating necessary folders..."
mkdir ./static mkdir ./static
mkdir ./static/images mkdir ./static/images
mkdir ./static/css mkdir ./static/css
Expand All @@ -8,7 +8,7 @@ mkdir ./views
mkdir ./models mkdir ./models
mkdir ./test mkdir ./test


echo "Copying Markup and CSS BoilerPlate..." echo "Copying code, markup and CSS boilerplate..."
cp ./templates/app/server.js ./server.js cp ./templates/app/server.js ./server.js
cp ./templates/app/package.json ./package.json cp ./templates/app/package.json ./package.json
cp ./templates/app/.gitignore ./.gitignore cp ./templates/app/.gitignore ./.gitignore
Expand All @@ -23,17 +23,16 @@ cp ./templates/views/layout.jade ./views/layout.jade
cp ./templates/js/script.js ./static/js/script.js cp ./templates/js/script.js ./static/js/script.js
# TODO copy over the models # TODO copy over the models


echo "Setting up the dependencies from NPM..." echo "Setting up dependencies from NPM..."
npm install npm install


echo "Removing the stuff you dont want..." echo "Removing stuff you don't want..."
rm -rf .git rm -rf .git
rm -rf templates rm -rf templates
rm README.md rm README.md
rm -rf initproject.sh rm initproject.sh


echo "Initing the new git project..." echo "Initializing new git project..."
git init git init
git add . git add .
git commit -m"Initial Commit" git commit -m"Initial Commit"

0 comments on commit b7b5d17

Please sign in to comment.