File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -154,6 +154,7 @@ gulp.task('styles', function () {
154154 . pipe ( $ . sass ( ) )
155155 . pipe ( $ . autoprefixer ( { browsers : AUTOPREFIXER_BROWSERS } ) )
156156 . pipe ( $ . rename ( function ( path ) {
157+ //{ dirname: '.', basename: 'application.css', extname: '.css' }
157158 path . basename = path . basename . replace ( '.css' , '' ) . replace ( 'application' , 'app' ) ;
158159 } ) )
159160 . pipe ( $ . sourcemaps . write ( ) )
@@ -167,7 +168,7 @@ gulp.task('styles', function () {
167168 . pipe ( $ . size ( { title : 'styles' } ) ) ;
168169} ) ;
169170
170- // 打包 Common JS 模块
171+ // 打包 Common JS 模块,此处使用 ES6 的话,需要调整设置
171172var b = browserify ( {
172173 cache : { } ,
173174 packageCache : { } ,
Original file line number Diff line number Diff line change 88 "engines" : {
99 "node" : " >= 0.10"
1010 },
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+ },
1116 "browserify" : {
1217 "transform" : [
1318 [
1419 " reactify" ,
15- " babelify" ,
16- {
20+ " babelify" , {
1721 "es6" : true
1822 }
1923 ]
96100 "webpack" : " ^1.9.10" ,
97101 "webpack-dev-server" : " ^1.9.0"
98102 },
99- "scripts" : {
100- "test" : " echo \" Error: no test specified\" && exit 1"
101- },
102103 "peerDependencies" : {
103104 "react" : " *"
104105 },
You can’t perform that action at this time.
0 commit comments