Update build script

We now use `chdir` instead of `path.resolve` to get file-relative
paths.
This commit is contained in:
Guangcong Luo 2019-08-03 16:17:10 -05:00
parent 91573af30e
commit 1aac108356

7
build
View File

@ -7,7 +7,8 @@ if (!require('assert').strict) {
var execSync = require('child_process').execSync;
var fs = require('fs');
var path = require('path');
process.chdir(__dirname);
try {
require.resolve('@babel/core');
@ -23,8 +24,8 @@ try {
console.log('config.js does not exist. Creating one with default settings...');
fs.writeFileSync(
path.resolve(__dirname, 'config/config.js'),
fs.readFileSync(path.resolve(__dirname, 'config/config-example.js'))
'config/config.js',
fs.readFileSync('config/config-example.js')
);
}