coffee-rails-source-maps 1.3.6 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -4
- data/lib/coffee-rails-source-maps.rb +16 -1
- data/lib/coffee-rails-source-maps/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d48a1f9095c779745aec3d6ff6e31851f2c1eb17
|
4
|
+
data.tar.gz: b47661104665feac813f19acc3480c175cab9ad5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d37af8bd407b35ee43bfca9eab6854b331bc35a8e48c882ce4e34e50ff4488919e69174dcb739f8c5939989c67aff0f224439b7fd6209ddfd941b1ec36bba746
|
7
|
+
data.tar.gz: 3fdcf0153138b35a0f01b14062cca3cf9fc0d45ab9ff5ef48436f1f368b896b5da209eb6123f59f5fb75a20e0a27d873481e2facf3f7cef7103b344d33872cc0
|
data/README.md
CHANGED
@@ -28,7 +28,7 @@ end
|
|
28
28
|
This gem will create a folder called `assets/source_maps` in the Rails `public` directory. I would recommend adding this to your `.gitignore` file so you don't check this folder into git.
|
29
29
|
|
30
30
|
```
|
31
|
-
public/source_maps/
|
31
|
+
public/assets/source_maps/
|
32
32
|
```
|
33
33
|
|
34
34
|
### Using Source Maps in Chrome
|
@@ -65,10 +65,12 @@ This gem is based on the following Gist: [https://gist.github.com/naan/5096056](
|
|
65
65
|
|
66
66
|
* Mark Bates
|
67
67
|
* Raymond Vellener
|
68
|
-
* Brent Dillingham
|
69
68
|
* Sean Santry
|
69
|
+
* Eric Boehs
|
70
70
|
* Tim Moore
|
71
|
+
* Sam Dornan
|
72
|
+
* Brent Dillingham
|
71
73
|
* Alexey Chernenkov
|
72
74
|
* Curtis Steckel
|
73
|
-
*
|
74
|
-
* Thomas Walpole
|
75
|
+
* Whitney Young
|
76
|
+
* Thomas Walpole
|
@@ -39,7 +39,22 @@ if Rails.env.development?
|
|
39
39
|
options[:sourceMap] = true
|
40
40
|
options[:filename] = "#{clean_name}.coffee" # coffee requires filename option to work with source maps (see http://coffeescript.org/documentation/docs/coffee-script.html#section-4)
|
41
41
|
options[:sourceFiles] = ["/#{coffee_file.relative_path_from(Rails.root.join("public"))}"] # specify coffee source file explicitly (see http://coffeescript.org/documentation/docs/sourcemap.html#section-8)
|
42
|
-
|
42
|
+
|
43
|
+
wrapper = <<-WRAPPER
|
44
|
+
(function(script, options) {
|
45
|
+
try {
|
46
|
+
return CoffeeScript.compile(script, options);
|
47
|
+
} catch (err) {
|
48
|
+
if (err instanceof SyntaxError && err.location) {
|
49
|
+
throw new SyntaxError([options.filename, err.location.first_line + 1, err.location.first_column + 1].join(":") + ": " + err.message)
|
50
|
+
} else {
|
51
|
+
throw err;
|
52
|
+
}
|
53
|
+
}
|
54
|
+
})
|
55
|
+
WRAPPER
|
56
|
+
|
57
|
+
ret = Source.context.call(wrapper, script, options)
|
43
58
|
|
44
59
|
coffee_file.open('w') {|f| f.puts script }
|
45
60
|
map_file.open('w') {|f| f.puts ret["v3SourceMap"]}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coffee-rails-source-maps
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Bates
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: coffee-script-source
|