sprockets-es6 0.9.0 → 0.9.1

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: 8c3813d1da084f0cb3f7fd15095c6ed34dc7d498
4
- data.tar.gz: a1ae1ebc0ae0bd51dedcd352dc61327226543245
3
+ metadata.gz: 388d14d771cc7935a13046f9af297e57fd36c285
4
+ data.tar.gz: 7022333e42c14c148be965aa724c8b24a5622e23
5
5
  SHA512:
6
- metadata.gz: 6d1173d2c5a564f5d6fa4a544ce63c7da7d7ac4bc5ea1f488545cacf1b28a51ac5879e0d9e64651b974fdec728a100e5ec2cb0861d7e14905a06743215c06f3f
7
- data.tar.gz: 8c34559fd43eadd7e30e7c50a5d972aae788f8b2598db0e1c20288067ca0241b7cbc7c51a97d301ea9675702ffc3a4dee69c2efccf31615ee5ba562552246721
6
+ metadata.gz: 8abd4a98c04fa068ec412966d7359cc79e403e8364ab9334f09395ceb71a7d26193d3446aa52eec187b677525b1401898c931dec900f6fb5d010481af8181373
7
+ data.tar.gz: 91ae719e7aa8055892994800622a827eacbbdcb7be3e0c1f5888588dd54255ffd9acdb655c9a669e5ce1b1cc4dd3873a85ff0d39c872098fe4d1b76d96a4f90c
data/README.md CHANGED
@@ -14,7 +14,13 @@ gem 'sprockets-es6'
14
14
 
15
15
 
16
16
  ``` ruby
17
+ # application.rb
18
+ # [...]
19
+ require "action_view/railtie"
20
+ require "sprockets/railtie"
21
+ # require "rails/test_unit/railtie"
17
22
  require 'sprockets/es6'
23
+ # [...]
18
24
  ```
19
25
 
20
26
  ``` js
@@ -84,8 +84,17 @@ module Sprockets
84
84
  end
85
85
 
86
86
  append_path Babel::Transpiler.source_path
87
- register_mime_type 'text/ecmascript-6', extensions: ['.es6'], charset: :unicode
88
- register_transformer 'text/ecmascript-6', 'application/javascript', ES6
89
- register_preprocessor 'text/ecmascript-6', DirectiveProcessor
90
- register_engine '.es6', ES6
87
+
88
+ if respond_to?(:register_transformer)
89
+ register_mime_type 'text/ecmascript-6', extensions: ['.es6'], charset: :unicode
90
+ register_transformer 'text/ecmascript-6', 'application/javascript', ES6
91
+ register_preprocessor 'text/ecmascript-6', DirectiveProcessor
92
+ end
93
+
94
+ if respond_to?(:register_engine)
95
+ args = ['.es6', ES6]
96
+ args << { mime_type: 'text/ecmascript-6', silence_deprecation: true } if Sprockets::VERSION.start_with?("3")
97
+ register_engine(*args)
98
+ end
99
+
91
100
  end
@@ -1,5 +1,5 @@
1
1
  module Sprockets
2
2
  class ES6
3
- VERSION = '0.9.0'
3
+ VERSION = '0.9.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprockets-es6
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Peek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-10 00:00:00.000000000 Z
11
+ date: 2016-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: babel-transpiler