File tree Expand file tree Collapse file tree 5 files changed +59
-2
lines changed Expand file tree Collapse file tree 5 files changed +59
-2
lines changed Original file line number Diff line number Diff line change 1+ v0.10.2 / 2017-04-06
2+ ---
3+ ### Fixed
4+ * add ` transform-object-rest-spread ` for object rest spread
5+
6+
17v0.10.1 / 2017-04-06
28---
39### Changes
Original file line number Diff line number Diff line change @@ -72,8 +72,9 @@ class Compiler {
7272 loader : 'babel-loader' ,
7373 options : {
7474 presets : [
75- [ 'env' , { targets : { node : + node_version . short } } ]
75+ [ 'env' , { targets : { node : + node_version . major } } ]
7676 ] ,
77+ plugins : [ 'transform-object-rest-spread' ] ,
7778 babelrc : false
7879 }
7980 } ,
@@ -92,8 +93,9 @@ class Compiler {
9293 loader : 'babel-loader' ,
9394 options : {
9495 presets : [
95- [ 'env' , { targets : { node : + node_version . short } } ]
96+ [ 'env' , { targets : { node : + node_version . major } } ]
9697 ] ,
98+ plugins : [ 'transform-object-rest-spread' ] ,
9799 babelrc : false
98100 }
99101 }
Original file line number Diff line number Diff line change 4141 "dependencies" : {
4242 "babel-core" : " ^6.22.0" ,
4343 "babel-loader" : " ^6.2.10" ,
44+ "babel-plugin-transform-object-rest-spread" : " ^6.23.0" ,
4445 "babel-preset-env" : " ^1.2.2" ,
4546 "babel-regenerator-runtime" : " ^6.5.0" ,
4647 "memory-fs" : " ^0.4.1" ,
Original file line number Diff line number Diff line change @@ -36,6 +36,25 @@ describe('Compiler', () => {
3636 done ( 'compiler file write fail' ) ;
3737 }
3838
39+ cache . storage . delete ( filePath ) ;
40+ cache . mfs . unlinkSync ( filePath ) ;
41+ } ) . catch ( e => {
42+ done ( e ) ;
43+ cache . storage . delete ( filePath ) ;
44+ cache . mfs . unlinkSync ( filePath ) ;
45+ } ) ;
46+ } ) ;
47+ it ( 'Compiler.compile() should be ok with es6/es7' , done => {
48+ const filePath = path . resolve ( __dirname , '../vue_file/simple_es_next.vue' ) ;
49+ const compiler = new Compiler ( { watch : true } ) ;
50+ compiler . compile ( filePath ) . then ( ( ) => {
51+ const file = cache . mfs . readFileSync ( filePath ) ;
52+ if ( file ) {
53+ done ( ) ;
54+ } else {
55+ done ( 'compiler file write fail' ) ;
56+ }
57+
3958 cache . storage . delete ( filePath ) ;
4059 cache . mfs . unlinkSync ( filePath ) ;
4160 } ) . catch ( e => {
Original file line number Diff line number Diff line change 1+ <template >
2+ <div class =" test" >hello {{hello}}</div >
3+ </template >
4+ <style scoped>
5+ .test {
6+ background-color : red ;
7+ }
8+ </style >
9+ <script >
10+ const a = {
11+ test () {
12+ }
13+ };
14+ export default {
15+ name: ' Page' ,
16+ data () {
17+ return {
18+ hello: ' '
19+ };
20+ },
21+ async created () {
22+ },
23+ methods: {
24+ ... a
25+ },
26+ computed: {},
27+ components: {}
28+ };
29+ </script >
You can’t perform that action at this time.
0 commit comments