Skip to content

Instantly share code, notes, and snippets.

@telagraphic
Last active August 29, 2015 14:20
Show Gist options
  • Save telagraphic/7bcafb9d6ed3d742ef20 to your computer and use it in GitHub Desktop.
Save telagraphic/7bcafb9d6ed3d742ef20 to your computer and use it in GitHub Desktop.
layout title date categories
post
Shell Set-up Scripts
2015-04-29 10:44:01 -0700
bash setup api-client

Rails, Yeoman Bash Build Script

{% highlight bash %} function apiclient() {

rails new $1 --database=postgresql cd $1 rake db:create rake db:migrate

if [ -d client ] then rm -rf client else mkdir client && cd client fi

yo angular $1 bower install ui-router restangular --save

cat bower.json && package.json yo doctor

} {% endhighlight %}

Global Path Config

Need to figure out how to place bash script into usr/vars to be globally available?

API Setup

https://github.com/telagraphic/telagraphic.github.io.git

Client Setup

function apiclient() {
rails new $1 --database=postgresql
cd $1
rake db:create
rake db:migrate
if [ -d client ]
then
rm -rf client
else
mkdir client && cd client
fi
yo angular $1
bower install ui-router restangular --save
cat bower.json && package.json
yo doctor
: '
mkdir $1
cd $1
rm -rf test_app
mkdir test_app
cd test_app
yo angular
yo doctor
cat package.json
cat bower.json
bower install ui-router restangular --save
'
}
function angular() {
if [ -d client ]
then
rm -rf client
else
mkdir client && cd client
fi
yo angular $1
bower install ui-router restangular --save
cat bower.json && package.json
yo doctor
}
# update gruntfile for proxy server
# update app/index.html with ui-view
# update app/scripts/app.js with $stateProvider config setup
# create views/ui-templates
# start server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment