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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c0f64fc540ae4a4e9d1e7113bebd91a5453598e7
4
- data.tar.gz: 10254542506d4e61dc2f055b43951781c1601b15
3
+ metadata.gz: 72d705ccec2dcfa3c419987dffd054c3c9718905
4
+ data.tar.gz: 71803b7576ae34379d0ea53b8182edca664076ec
5
5
  SHA512:
6
- metadata.gz: d52f46af8d4abb7b4b9241556217505a2ba5acc9f072ca09a0cb0a2f722fcace33a78e9531b7210e652d277669c877e384c797fb66a7ba3befef924f6a7cc066
7
- data.tar.gz: 6dfd607e5b3593bd3c04d3d1e834a7d02e0611f6821f03af59a51db743ec42dd2b4554fb5bd4897d3e37a556a4d8e8777ce975ff68c698b3a30899c4f79ff4a3
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 [process.version, babel.version]; }'
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
 
@@ -1,5 +1,5 @@
1
1
  module Sprockets
2
2
  module Commoner
3
- VERSION = '0.1.3'
3
+ VERSION = '0.1.4'
4
4
  end
5
5
  end
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.3
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-13 00:00:00.000000000 Z
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