sprockets-commoner 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sprockets/commoner/processor.rb +13 -1
- data/lib/sprockets/commoner/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72d705ccec2dcfa3c419987dffd054c3c9718905
|
4
|
+
data.tar.gz: 71803b7576ae34379d0ea53b8182edca664076ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73d3e0c02678fc1a72a3aa5b33319dcc35874c38d8aa4d2eb9fcd62be1aeab6a3e5a8d2a58f55363b46f3c906e0bb3cee68479616289d729d1b8b06e8e83e2f7
|
7
|
+
data.tar.gz: 0d14803ec4e7d8bc7bc4d843fe4aacb12071f337c503ee8f8ddffa6fcb01e3c602ae19b1c23da9d91350d5b080ea17ae3782560ff4d9dde31c1fd818c49fa7a8
|
@@ -7,6 +7,7 @@ module Sprockets
|
|
7
7
|
|
8
8
|
ExcludedFileError = Class.new(::StandardError)
|
9
9
|
|
10
|
+
VERSION = '1'.freeze
|
10
11
|
BABELRC_FILE = '.babelrc'.freeze
|
11
12
|
PACKAGE_JSON = 'package.json'.freeze
|
12
13
|
JS_PACKAGE_PATH = File.expand_path('../../../js', __dir__)
|
@@ -15,7 +16,7 @@ module Sprockets
|
|
15
16
|
|
16
17
|
dependencies babel: 'babel-core', commoner: 'babel-plugin-sprockets-commoner-internal'
|
17
18
|
|
18
|
-
method :version, 'function() { return
|
19
|
+
method :version, 'function() { return babel.version; }'
|
19
20
|
method :transform, %q{function(code, opts, commonerOpts) {
|
20
21
|
try {
|
21
22
|
var file = new babel.File(opts);
|
@@ -55,6 +56,17 @@ module Sprockets
|
|
55
56
|
super(root, 'NODE_PATH' => JS_PACKAGE_PATH)
|
56
57
|
end
|
57
58
|
|
59
|
+
def cache_key
|
60
|
+
@cache_key ||= [
|
61
|
+
self.class.name,
|
62
|
+
VERSION,
|
63
|
+
version,
|
64
|
+
@include.map(&:to_s),
|
65
|
+
@exclude.map(&:to_s),
|
66
|
+
@babel_exclude.map(&:to_s),
|
67
|
+
]
|
68
|
+
end
|
69
|
+
|
58
70
|
def call(input)
|
59
71
|
filename = input[:filename]
|
60
72
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sprockets-commoner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bouke van der Bijl
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sprockets
|
@@ -178,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
178
178
|
version: '0'
|
179
179
|
requirements: []
|
180
180
|
rubyforge_project:
|
181
|
-
rubygems_version: 2.5.1
|
181
|
+
rubygems_version: 2.4.5.1
|
182
182
|
signing_key:
|
183
183
|
specification_version: 4
|
184
184
|
summary: Use Babel in Sprockets to compile modules for the browser
|