Skip to content

Commit 6509d42

Browse files
committed
update
1 parent 27e87a5 commit 6509d42

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

gulpfile.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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 的话,需要调整设置
171172
var b = browserify({
172173
cache: {},
173174
packageCache: {},

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,16 @@
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
]
@@ -96,9 +100,6 @@
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
},

0 commit comments

Comments
 (0)