fwi 1.2.1 → 1.2.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a180c45d14702ed61cb70c8935b388e49cba993d
4
- data.tar.gz: d8681b83847717e4e87f93542bd48419826aa004
3
+ metadata.gz: bcc0b0bc4fcf2f752fc1b44da4ee762dca07ec41
4
+ data.tar.gz: 317ee1310f3f44c71fede6fdaac16d174cc2c887
5
5
  SHA512:
6
- metadata.gz: e09e6fb26f608943a35d391c3610f4844b0be33d49ad0c250f54b0e645d4bc01c4bce5581ca68c01ba3aa6f0a9c6c585a1babaf324c31f7b3559c537de9a3afb
7
- data.tar.gz: 44b6e489a02cbc264af4610a9f8e06e0bb4b8959c84e84189e216ae6950c3dcae29e5c527aa5ed988aef5190d4c8716b33c3c48828295e03eda9db56e05ceb47
6
+ metadata.gz: c4c80d1d4bd5708be3dc2679f29d9e5aa5b5089341df273b5c944ca8129ae9b2fd37b593d8cc07a0928a94bf51bb56e758584f22d2519685626823d5c2488088
7
+ data.tar.gz: fe62cea14f6f761ca31bb143e7cdcbed6509be6041b31bf4cff546503d2fb69b5455e5b83c2dadead5411dbe14a57346a60fcc53d42d09d2c790ab5ce3eb41ba
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = "fwi"
6
- spec.version = "1.2.1"
6
+ spec.version = "1.2.4"
7
7
  spec.authors = ["Jaci Brunning"]
8
8
  spec.email = ["jaci.brunning@gmail.com"]
9
9
 
@@ -5,6 +5,8 @@ class JSCompiler
5
5
  GEN = FWI::Generator::JS.new
6
6
 
7
7
  def populate_options o
8
+ @options = {}
9
+ o.on("--bundle [NAME]", "Create a JavaScript bundle file with the given name") { |name| @options[:bundle] = name }
8
10
  end
9
11
 
10
12
  def after_parse; end
@@ -14,8 +16,20 @@ class JSCompiler
14
16
  base = File.basename(file, File.extname(file))
15
17
 
16
18
  files = GEN.gen bitmap
17
- files.each do |fn, contents|
18
- f = File.join(options[:output], fn)
19
+ if @options[:bundle].nil?
20
+ files.each do |fn, contents|
21
+ f = File.join(options[:output], fn)
22
+ FileUtils.mkdir_p File.expand_path("..", f)
23
+ File.write(f, contents)
24
+ end
25
+ else
26
+ contents = ""
27
+ files.each do |fn, fcontents|
28
+ contents << "// File: #{fn}\n"
29
+ contents << fcontents
30
+ contents << "\n"
31
+ end
32
+ f = File.join(options[:output], @options[:bundle])
19
33
  FileUtils.mkdir_p File.expand_path("..", f)
20
34
  File.write(f, contents)
21
35
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fwi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jaci Brunning