sprockets-rollup 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -55,20 +55,21 @@ module Sprockets
55
55
 
56
56
  def transform(input)
57
57
  path_to_rollup = File.join File.dirname(__FILE__), "rollup.js"
58
- `node #{path_to_rollup} #{input[:filename].shellescape}`
58
+ path_to_buble = File.join File.dirname(__FILE__), "buble.js"
59
+ `node #{path_to_rollup} #{input[:filename].shellescape} | node #{path_to_buble}`
59
60
  end
60
61
 
61
62
  end
62
63
 
63
64
  if respond_to?(:register_transformer)
64
- register_mime_type 'text/js-rollup', extensions: ['.es'], charset: :unicode
65
- register_transformer 'text/js-rollup', 'text/ecmascript-6', Rollup
66
- register_preprocessor 'text/js-rollup', DirectiveProcessor
65
+ register_mime_type 'text/ecmascript-6', extensions: ['.es'], charset: :unicode
66
+ register_transformer 'text/ecmascript-6', 'application/javascript', Rollup
67
+ register_preprocessor 'text/ecmascript-6', DirectiveProcessor
67
68
  end
68
69
 
69
70
  if respond_to?(:register_engine)
70
71
  args = ['.es', Rollup]
71
- args << { mime_type: 'text/js-rollup', silence_deprecation: true } if Sprockets::VERSION.start_with?("3")
72
+ args << { mime_type: 'text/ecmascript-6', silence_deprecation: true } if Sprockets::VERSION.start_with?("3")
72
73
  register_engine(*args)
73
74
  end
74
75
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprockets-rollup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Liam P. White
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-10 00:00:00.000000000 Z
11
+ date: 2016-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sprockets
@@ -24,13 +24,14 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 3.0.0
27
- description: " A Sprockets transformer that converts ES6 imports into bundles\n"
27
+ description: " A Sprockets transformer that converts ES6 imports into ES5 bundles\n"
28
28
  email: foo@example.com
29
29
  executables: []
30
30
  extensions: []
31
31
  extra_rdoc_files: []
32
32
  files:
33
33
  - LICENSE
34
+ - lib/sprockets/buble.js
34
35
  - lib/sprockets/rollup.js
35
36
  - lib/sprockets/rollup.rb
36
37
  homepage: