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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 050e566c2312264eeea0ddadb4e080829145b5b7
4
- data.tar.gz: e31e4762cd2d77377373a9ea64c2604484205b3e
3
+ metadata.gz: bbaa88de72105eb7d82b4a4890d6b547c75fd947
4
+ data.tar.gz: 0e38c76ab293522ee03b282079a78d02894580e1
5
5
  SHA512:
6
- metadata.gz: d8c37e78ec66df4a9f7a9fdaf988b9510012eeed51e2bebd1f16794a8777c3505551d11481c4b0185234a6b03518a873f5cdc0eaef7cddc6fccb324f8d6d706e
7
- data.tar.gz: 59d6ca6f918fdf4836457d2e50c6016a516c07fcb4336e10634bc03f7a4544fcecb07fb2e13144bff54450d00df4492e294d433558794680f6294a9f26250e71
6
+ metadata.gz: ab19b21e6290a60211999b5301be7286625a2986bf1bad92703c1dd63d35f3a69296795e05946b9b7963e3aed6c4de47d4fb00d4c3aca53de7afc9cb6d4d1caa
7
+ data.tar.gz: 310e70462f4b8012879e20868b7b258fcb8c8fa137f658730ed06b2bd48ae43e219d17124ac4900533bb2474664a5c37936cf92b8a6a7e72ba75a98575fbc8e0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.2.5
4
+
5
+ * Add `cache_key` to processor to make sure we bust the cache when processor config changes.
6
+
3
7
  ## v0.2.4
4
8
 
5
9
  * Enable completely optimizing away empty module definitions.
@@ -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 [process.version, babel.version]; }'
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
 
@@ -1,5 +1,5 @@
1
1
  module Sprockets
2
2
  module Commoner
3
- VERSION = '0.2.4'
3
+ VERSION = '0.2.5'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprockets-commoner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bouke van der Bijl