rill 0.1.9 → 0.1.10

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.
Files changed (2) hide show
  1. data/lib/rill.rb +4 -1
  2. metadata +2 -2
@@ -31,9 +31,10 @@ class Rill
31
31
  end
32
32
 
33
33
  def resolve_module(mod)
34
+ mod = parse_module(mod)
35
+
34
36
  return if @preloads.include?(mod) || @modules.include?(mod)
35
37
 
36
- mod = parse_module(mod)
37
38
  path = File.join(@base, "#{mod}.js")
38
39
  code = File.open(path, 'r:bom|utf-8').read.lstrip
39
40
 
@@ -94,6 +95,8 @@ class Rill
94
95
  deps_str = deps.length > 0 ? "['#{deps.join("', '")}']" : '[]'
95
96
 
96
97
  code.sub!(/^define\(\s*/, "define('#{mod}', #{deps_str}, ")
98
+ elsif code =~ /^define\(\s*\{/
99
+ code.sub!(/^define\(\s*/, "define('#{mod}', [], ")
97
100
  elsif code =~ /^define\(\s*[\[\{]/
98
101
  code.sub!(/^define\(\s*/, "define('#{mod}', ")
99
102
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rill
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-20 00:00:00.000000000 Z
12
+ date: 2013-06-08 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: A simple CMD module bundler
15
15
  email: jakeplus@gmail.com