sprockets-commoner 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/sprockets/commoner/processor.rb +13 -1
- data/lib/sprockets/commoner/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bbaa88de72105eb7d82b4a4890d6b547c75fd947
|
4
|
+
data.tar.gz: 0e38c76ab293522ee03b282079a78d02894580e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab19b21e6290a60211999b5301be7286625a2986bf1bad92703c1dd63d35f3a69296795e05946b9b7963e3aed6c4de47d4fb00d4c3aca53de7afc9cb6d4d1caa
|
7
|
+
data.tar.gz: 310e70462f4b8012879e20868b7b258fcb8c8fa137f658730ed06b2bd48ae43e219d17124ac4900533bb2474664a5c37936cf92b8a6a7e72ba75a98575fbc8e0
|
data/CHANGELOG.md
CHANGED
@@ -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__)
|
@@ -14,7 +15,7 @@ module Sprockets
|
|
14
15
|
|
15
16
|
dependencies babel: 'babel-core', commoner: 'babel-plugin-sprockets-commoner-internal'
|
16
17
|
|
17
|
-
method :version, 'function() { return
|
18
|
+
method :version, 'function() { return babel.version; }'
|
18
19
|
method :transform, %q{function(code, opts, commonerOpts) {
|
19
20
|
try {
|
20
21
|
var file = new babel.File(opts);
|
@@ -54,6 +55,17 @@ module Sprockets
|
|
54
55
|
super(root, 'NODE_PATH' => JS_PACKAGE_PATH)
|
55
56
|
end
|
56
57
|
|
58
|
+
def cache_key
|
59
|
+
@cache_key ||= [
|
60
|
+
self.class.name,
|
61
|
+
VERSION,
|
62
|
+
version,
|
63
|
+
@include.map(&:to_s),
|
64
|
+
@exclude.map(&:to_s),
|
65
|
+
@babel_exclude.map(&:to_s),
|
66
|
+
]
|
67
|
+
end
|
68
|
+
|
57
69
|
def call(input)
|
58
70
|
filename = input[:filename]
|
59
71
|
|