Commit a1f3057 1 parent e83ea5f commit a1f3057 Copy full SHA for a1f3057
File tree 1 file changed +32
-2
lines changed
1 file changed +32
-2
lines changed Original file line number Diff line number Diff line change 1
1
# Middleman-ES6 [ ![ Build Status] ( https://semaphoreci.com/api/v1/vast/middleman-es6/branches/master/shields_badge.svg )] ( https://semaphoreci.com/vast/middleman-es6 )
2
2
3
- Middleman (Sprockets) extension adding support for ES6 (via babel-transpiler).
3
+ Middleman _ 3 _ extension adding support for ES6 (via babel-transpiler).
4
4
5
- ## Installation & Usage
5
+ ## Middleman 4
6
+
7
+ If you use Middleman 4, then there is no need in ` middleman-es6 ` extension. To add ES6 support
8
+ to Middleman 4 add ` middleman-sprockets ` , ` sprockets-es6 ` to Gemfile and configure it to handle
9
+ assets with ` .es6 ` extension:
10
+
11
+ ``` ruby
12
+ # Gemfile
13
+
14
+ gem ' middleman-sprockets' , ' ~> 4.0.0.rc'
15
+ gem ' sprockets-es6'
16
+ ```
17
+
18
+ ``` ruby
19
+ # config.rb
20
+
21
+ require ' sprockets/es6'
22
+ activate :sprockets do |s |
23
+ s.supported_output_extensions << ' .es6'
24
+ end
25
+ ```
26
+
27
+ If you need Babel's polyfill:
28
+
29
+ ``` javascript
30
+ // application.js.es6
31
+
32
+ // = require babel/polyfill
33
+ ```
34
+
35
+ ## Installation & Usage with Middleman 3
6
36
7
37
Add ` middleman-es6 ` gem to your application's Gemfile:
8
38
You can’t perform that action at this time.
0 commit comments