jdl 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +8 -5
- data/bin/jdl +6 -0
- data/lib/jdl/version.rb +1 -1
- metadata +3 -3
data/README.md
CHANGED
@@ -3,12 +3,15 @@
|
|
3
3
|
<!-- TODO: Write a gem description -->
|
4
4
|
根据指定目录,扫描内部扩展名为*的所有文件,并输出到jdl.js内,主要用于js测试
|
5
5
|
|
6
|
+
创建jdl.gem的初衷是我在给backbone app增加qunit测试的时候,每次都要有很多引用,在app里要写一次,在test里又要写一次,而且每次的相对路径都不一样的,这让人十分恼火...于是...
|
7
|
+
|
6
8
|
TODO:
|
7
9
|
|
8
10
|
|
9
|
-
|
11
|
+
## History
|
10
12
|
|
11
13
|
- 增加生成模板,可以从本地读取(v0.0.4已实现)
|
14
|
+
- 增加-v查看版本,可以从本地读取(v0.0.5已实现)
|
12
15
|
|
13
16
|
## Installation
|
14
17
|
|
@@ -31,8 +34,10 @@ Or install it yourself as:
|
|
31
34
|
import js from directory loader .
|
32
35
|
-p, --path Set options as path
|
33
36
|
-e, --file_ex Set options as file_ex
|
34
|
-
-o, --output Set options as
|
37
|
+
-o, --output Set options as output_name
|
38
|
+
-t, --template t_name Set options as template_name
|
35
39
|
-d. --verbose print debug log
|
40
|
+
-v, --version Show version
|
36
41
|
|
37
42
|
|
38
43
|
- '-p' 指定扫描路径 : 默认值 .
|
@@ -40,6 +45,7 @@ Or install it yourself as:
|
|
40
45
|
- '-o' 指定输出文件名称 : 默认值 jdl.js
|
41
46
|
- '-t' 指定模板名称 : 默认值 无
|
42
47
|
- '-d' 是否打印日志 : 默认值 false
|
48
|
+
- '-v' 是否打印版本 : 默认值 无
|
43
49
|
|
44
50
|
|
45
51
|
### 模板用法
|
@@ -70,9 +76,6 @@ Or install it yourself as:
|
|
70
76
|
|
71
77
|
ruby -Ilib bin/jdl -p . -t t.txt
|
72
78
|
|
73
|
-
## Test
|
74
|
-
|
75
|
-
ruby -Ilib bin/jdl
|
76
79
|
|
77
80
|
## Contributing
|
78
81
|
|
data/bin/jdl
CHANGED
@@ -52,6 +52,12 @@ option_parser = OptionParser.new do |opts|
|
|
52
52
|
# 这个部分就是使用这个Option后执行的代码
|
53
53
|
options[:debug] = value
|
54
54
|
end
|
55
|
+
|
56
|
+
opts.on_tail('-v', '--version', 'Show version') do
|
57
|
+
puts "jdl gem version: #{Jdl::VERSION}"
|
58
|
+
exit
|
59
|
+
end
|
60
|
+
|
55
61
|
end.parse!
|
56
62
|
|
57
63
|
# puts options.inspect
|
data/lib/jdl/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jdl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -93,7 +93,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
93
93
|
version: '0'
|
94
94
|
segments:
|
95
95
|
- 0
|
96
|
-
hash:
|
96
|
+
hash: 2500686643666792042
|
97
97
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
98
|
none: false
|
99
99
|
requirements:
|
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
102
|
version: '0'
|
103
103
|
segments:
|
104
104
|
- 0
|
105
|
-
hash:
|
105
|
+
hash: 2500686643666792042
|
106
106
|
requirements: []
|
107
107
|
rubyforge_project:
|
108
108
|
rubygems_version: 1.8.25
|