Skip to content

Commit 8ac4904

Browse files
committed
Merge pull request #22 from jabez128/master
读取package.json不需要fs.read
2 parents 4be84d8 + 61c1270 commit 8ac4904

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

gulpfile.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ var before_mocha = require('./test/before_mocha.js');
1717
var pkg;
1818

1919
try{
20-
pkg = JSON.parse(fs.readFileSync('./package.json', 'utf8'))
21-
pkg_bower = JSON.parse(fs.readFileSync('./bower.json', 'utf8'))
22-
pkg_component = JSON.parse(fs.readFileSync('./component.json', 'utf8'))
20+
pkg = require('./package.json')
21+
pkg_bower = require('./bower.json')
22+
pkg_component = require('./component.json')
2323
}catch(e){}
2424

2525
gulp.task('node', function() {
@@ -247,4 +247,4 @@ function signatrue(file, enc, cb){
247247
function mini(file, enc, cb){
248248
file.path = file.path.replace('.js', '.min.js');
249249
cb(null, file)
250-
}
250+
}

0 commit comments

Comments
 (0)