quik_start 0.0.10 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +5 -2
- data/bin/qs +15 -22
- data/lib/quik_start/version.rb +1 -1
- data/lib/quik_start.rb +51 -14
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# QuikStart
|
2
2
|
|
3
|
-
A lib to download asset files for rails and maybe other frameworks..
|
3
|
+
A lib to download asset files for rails, express.js and maybe other frameworks..
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -46,14 +46,17 @@ Or install it yourself as:
|
|
46
46
|
|
47
47
|
$ qs --help
|
48
48
|
Usage: --library_name
|
49
|
-
--rails Use rails as a target (app/assets)
|
49
|
+
--rails Use rails as a target (app/assets), default
|
50
50
|
--node Use node as a target (public directory)
|
51
51
|
--bootstrap
|
52
52
|
--jquery
|
53
53
|
--jqueryui
|
54
54
|
--angular
|
55
|
+
--taffy
|
55
56
|
--backbone
|
57
|
+
--wysihtml5
|
56
58
|
--d3
|
59
|
+
-h, --help Print Help
|
57
60
|
|
58
61
|
|
59
62
|
## Contributing
|
data/bin/qs
CHANGED
@@ -4,23 +4,25 @@ require 'optparse'
|
|
4
4
|
require 'fileutils'
|
5
5
|
require 'quik_start'
|
6
6
|
|
7
|
-
$
|
8
|
-
$assets = {}
|
7
|
+
$install = []
|
9
8
|
$platform = :rails
|
10
9
|
$start_time = Time.now
|
11
10
|
|
12
11
|
OptionParser.new do |opts|
|
13
12
|
opts.banner = "Usage: --library_name"
|
14
|
-
opts.on("--rails", "Use rails as a target (app/assets)")
|
15
|
-
opts.on("--node",
|
16
|
-
|
17
|
-
opts.on("--
|
18
|
-
opts.on("--
|
19
|
-
opts.on("--jqueryui") { $
|
20
|
-
opts.on("--angular") { $
|
21
|
-
opts.on("--
|
22
|
-
|
23
|
-
opts.on("--
|
13
|
+
opts.on("--rails", "Use rails as a target (app/assets), default") { $platform = :rails }
|
14
|
+
opts.on("--node", "Use node as a target (public directory)") { $platform = :node }
|
15
|
+
opts.on("--bootstrap") { $install << :bootstrap }
|
16
|
+
opts.on("--jquery") { $install << :jquery }
|
17
|
+
opts.on("--zepto") { $install << :wysihtml5 }
|
18
|
+
opts.on("--jqueryui") { $install << :jqueryui }
|
19
|
+
opts.on("--angular") { $install << :angular }
|
20
|
+
opts.on("--taffy") { $install << :taffy }
|
21
|
+
opts.on("--backbone") { $install << :backbone }
|
22
|
+
opts.on("--wysihtml5") { $install << :wysihtml5 }
|
23
|
+
opts.on("--lunr") { $install << :lunr }
|
24
|
+
opts.on("--augment") { $install << :augment }
|
25
|
+
opts.on("--d3") { $install << :d3 }
|
24
26
|
opts.on("-h", "--help", "Print Help") do
|
25
27
|
puts opts
|
26
28
|
exit 0
|
@@ -35,14 +37,5 @@ OptionParser.new do |opts|
|
|
35
37
|
end
|
36
38
|
end
|
37
39
|
|
38
|
-
|
39
|
-
$to_install.each do |lib_name|
|
40
|
-
if $assets[lib_name] == nil
|
41
|
-
QuikStart.install(lib_name).each do |installed|
|
42
|
-
$assets[installed] = true
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
|
-
QuikStart.download_all($platform, $assets)
|
40
|
+
QuikStart.download_all($platform, QuikStart.analyze($install))
|
48
41
|
QuikStart.log_duration($start_time)
|
data/lib/quik_start/version.rb
CHANGED
data/lib/quik_start.rb
CHANGED
@@ -61,7 +61,7 @@ module QuikStart
|
|
61
61
|
end
|
62
62
|
|
63
63
|
m.perform do
|
64
|
-
# puts "
|
64
|
+
# puts "."
|
65
65
|
end
|
66
66
|
|
67
67
|
|
@@ -108,6 +108,18 @@ module QuikStart
|
|
108
108
|
File.delete(file)
|
109
109
|
end
|
110
110
|
|
111
|
+
def self.analyze(to_install)
|
112
|
+
assets = {}
|
113
|
+
to_install.each do |lib_name|
|
114
|
+
if assets[lib_name] == nil
|
115
|
+
QuikStart.install(lib_name).each do |installed|
|
116
|
+
assets[installed] = true
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
120
|
+
assets
|
121
|
+
end
|
122
|
+
|
111
123
|
def self.write_asset_files(platform, installed=[])
|
112
124
|
write_css_file(platform, installed)
|
113
125
|
write_js_file(platform, installed)
|
@@ -115,23 +127,23 @@ module QuikStart
|
|
115
127
|
|
116
128
|
def self.write_css_file(platform, installed)
|
117
129
|
if platform == :rails
|
118
|
-
puts
|
119
|
-
if installed.include?(:bootstrap)
|
120
|
-
puts 'puts the following in your application.css file: '
|
121
|
-
puts ' *= require "bootstrap" '
|
122
130
|
puts
|
123
|
-
|
131
|
+
if installed.include?(:bootstrap)
|
132
|
+
puts 'puts the following in your application.css file: '
|
133
|
+
puts ' *= require "bootstrap" '
|
134
|
+
puts
|
135
|
+
end
|
124
136
|
end
|
125
137
|
end
|
126
138
|
|
127
139
|
def self.write_js_file(platform, installed)
|
128
140
|
if platform == :rails
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
141
|
+
puts
|
142
|
+
puts 'puts the following in your application.js file: '
|
143
|
+
installed.each do |i|
|
144
|
+
puts ' //= require '+ i.to_s
|
145
|
+
end
|
146
|
+
puts
|
135
147
|
end
|
136
148
|
end
|
137
149
|
|
@@ -176,9 +188,34 @@ module QuikStart
|
|
176
188
|
:target => '/javascripts/angular.js'
|
177
189
|
},
|
178
190
|
:d3 => {
|
179
|
-
:
|
180
|
-
:
|
191
|
+
:production => 'https://raw.github.com/mbostock/d3/master/d3.min.js',
|
192
|
+
:development => 'https://raw.github.com/mbostock/d3/master/d3.js',
|
181
193
|
:target => '/javascripts/d3.js'
|
194
|
+
},
|
195
|
+
:taffy => {
|
196
|
+
:production => 'https://raw.github.com/typicaljoe/taffydb/master/taffy-min.js',
|
197
|
+
:development => 'https://raw.github.com/typicaljoe/taffydb/master/taffy.js',
|
198
|
+
:target => '/javascripts/taffy.js'
|
199
|
+
},
|
200
|
+
:wysihtml5 => {
|
201
|
+
:development => 'https://raw.github.com/xing/wysihtml5/master/dist/wysihtml5-0.3.0.js',
|
202
|
+
:production => 'https://raw.github.com/xing/wysihtml5/master/dist/wysihtml5-0.3.0.min.js',
|
203
|
+
:target => '/javascripts/wysihtml5.js'
|
204
|
+
},
|
205
|
+
:zepto => {
|
206
|
+
:development => 'http://zeptojs.com/zepto.js',
|
207
|
+
:production => 'http://zeptojs.com/zepto.min.js',
|
208
|
+
:target => '/javascripts/zepto.js'
|
209
|
+
},
|
210
|
+
:lunr => {
|
211
|
+
:development => 'https://raw.github.com/olivernn/lunr.js/master/lunr.js',
|
212
|
+
:production => 'https://raw.github.com/olivernn/lunr.js/master/lunr.min.js',
|
213
|
+
:target => '/javascripts/lunr.js'
|
214
|
+
},
|
215
|
+
:augment => {
|
216
|
+
:development => 'https://raw.github.com/olivernn/augment.js/master/augment.js',
|
217
|
+
:production => 'https://raw.github.com/olivernn/augment.js/master/augment.min.js',
|
218
|
+
:target => '/javascripts/augment.js'
|
182
219
|
}
|
183
220
|
}
|
184
221
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|