UNPKG

1.07 kBapplication/x-shView Raw
1#!/bin/sh
2
3BASEDIR=$(pwd $0)
4
5rm -rf /tmp/my_app
6rm -rf /tmp/scaffold_app
7rm -rf /tmp/sample_app
8rm -rf /tmp/generate_database
9rm -rf /tmp/generate_model
10rm -rf /tmp/generate_service
11./bin/train_command.js new /tmp/my_app
12./bin/train_command.js new /tmp/scaffold_app
13./bin/train_command.js new /tmp/sample_app
14./bin/train_command.js new /tmp/generate_database
15./bin/train_command.js new /tmp/generate_model
16./bin/train_command.js new /tmp/generate_service
17
18cd /tmp/scaffold_app
19eval "$BASEDIR/bin/train_command.js generate scaffold User name:string email:string"
20
21cd /tmp/sample_app
22eval "$BASEDIR/bin/train_command.js generate controller StaticPages home help"
23
24cd /tmp/generate_database
25eval "$BASEDIR/bin/train_command.js generate database mysql"
26
27cd /tmp/generate_model
28eval "$BASEDIR/bin/train_command.js generate model User name:string email:string"
29eval "$BASEDIR/bin/train_command.js generate model Micropost content:text user:references"
30
31cd /tmp/generate_service
32eval "$BASEDIR/bin/train_command.js generate service User"
33
34cd $BASEDIR
35mocha test/*_spec.js