appmake 0.1.20 → 0.1.21
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/appmake/version.rb +1 -1
- data/lib/appmake.rb +14 -5
- metadata +1 -1
data/lib/appmake/version.rb
CHANGED
data/lib/appmake.rb
CHANGED
@@ -15,6 +15,8 @@ module Appmake
|
|
15
15
|
|
16
16
|
desc "init", "initialize new application"
|
17
17
|
def init
|
18
|
+
shell = Color.new
|
19
|
+
|
18
20
|
template "templates/package.json.tt", "package.json"
|
19
21
|
template "templates/README.md.tt", "README.md"
|
20
22
|
|
@@ -36,7 +38,8 @@ module Appmake
|
|
36
38
|
empty_directory "public/img"
|
37
39
|
template "templates/public/index.html.tt", "public/index.html"
|
38
40
|
|
39
|
-
|
41
|
+
shell.say_status :cmd, "npm install", :blue
|
42
|
+
system "npm install &> /dev/null"
|
40
43
|
|
41
44
|
Listeners::Css.compile
|
42
45
|
Listeners::Coffee.compile
|
@@ -54,14 +57,20 @@ module Appmake
|
|
54
57
|
|
55
58
|
desc "install", "install various libs"
|
56
59
|
def install(name)
|
60
|
+
shell = Color.new
|
61
|
+
|
57
62
|
if name == "jquery"
|
58
|
-
|
63
|
+
shell.say_status :cmd, "curl http://code.jquery.com/jquery-1.9.0.min.js -o public/jquery-1.9.0.min.js", :blue
|
64
|
+
system("curl -silent http://code.jquery.com/jquery-1.9.0.min.js -o public/jquery-1.9.0.min.js")
|
59
65
|
elsif name == "underscore"
|
60
|
-
|
66
|
+
shell.say_status :cmd, "curl http://underscorejs.org/underscore-min.js -o public/underscore.min.js", :blue
|
67
|
+
system("curl -silent http://underscorejs.org/underscore-min.js -o public/underscore.min.js")
|
61
68
|
elsif name == "backbone"
|
62
|
-
|
69
|
+
shell.say_status :cmd, "curl http://backbonejs.org/backbonejs-min.js -o public/backbone.min.js", :blue
|
70
|
+
system("curl -silent http://backbonejs.org/backbonejs-min.js -o public/backbone.min.js")
|
63
71
|
elsif name == "bootstrap"
|
64
|
-
|
72
|
+
shell.say_status :cmd, "curl http://twitter.github.com/bootstrap/assets/bootstrap.zip -o public/bootstrap.zip && cd public && unzip bootstrap.zip && mv bootstrap/js/bootstrap.min.js js/ && mv bootstrap/css/bootstrap.min.css css/ && mv bootstrap/css/bootstrap-responsive.min.css css/ && mv bootstrap/img/* img/ && rm -rf bootstrap && rm bootstrap.zip", :blue
|
73
|
+
system("curl -silent http://twitter.github.com/bootstrap/assets/bootstrap.zip -o public/bootstrap.zip && cd public && unzip bootstrap.zip && mv bootstrap/js/bootstrap.min.js js/ && mv bootstrap/css/bootstrap.min.css css/ && mv bootstrap/css/bootstrap-responsive.min.css css/ && mv bootstrap/img/* img/ && rm -rf bootstrap && rm bootstrap.zip")
|
65
74
|
else
|
66
75
|
abort "error: unsupported install: #{name}"
|
67
76
|
end
|