File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -154,6 +154,7 @@ gulp.task('styles', function () {
154
154
. pipe ( $ . sass ( ) )
155
155
. pipe ( $ . autoprefixer ( { browsers : AUTOPREFIXER_BROWSERS } ) )
156
156
. pipe ( $ . rename ( function ( path ) {
157
+ //{ dirname: '.', basename: 'application.css', extname: '.css' }
157
158
path . basename = path . basename . replace ( '.css' , '' ) . replace ( 'application' , 'app' ) ;
158
159
} ) )
159
160
. pipe ( $ . sourcemaps . write ( ) )
@@ -167,7 +168,7 @@ gulp.task('styles', function () {
167
168
. pipe ( $ . size ( { title : 'styles' } ) ) ;
168
169
} ) ;
169
170
170
- // 打包 Common JS 模块
171
+ // 打包 Common JS 模块,此处使用 ES6 的话,需要调整设置
171
172
var b = browserify ( {
172
173
cache : { } ,
173
174
packageCache : { } ,
Original file line number Diff line number Diff line change 8
8
"engines" : {
9
9
"node" : " >= 0.10"
10
10
},
11
+ "scripts" : {
12
+ "test" : " ./node_modules/.bin/_mocha --compilers js:babel/register" ,
13
+ "docs-dev" : " webpack --config webpack-docs.config.js --watch" ,
14
+ "docs-publish" : " webpack --config webpack-docs.config.js --min"
15
+ },
11
16
"browserify" : {
12
17
"transform" : [
13
18
[
14
19
" reactify" ,
15
- " babelify" ,
16
- {
20
+ " babelify" , {
17
21
"es6" : true
18
22
}
19
23
]
96
100
"webpack" : " ^1.9.10" ,
97
101
"webpack-dev-server" : " ^1.9.0"
98
102
},
99
- "scripts" : {
100
- "test" : " echo \" Error: no test specified\" && exit 1"
101
- },
102
103
"peerDependencies" : {
103
104
"react" : " *"
104
105
},
You can’t perform that action at this time.
0 commit comments