目录:
folderA:[a.js],
b.js,
config.json
a.js:
require('../b.js');
b.js:
fs.read('./config.json')
在folderA里执行casperjs a.js 抛错说找不到./config.json,写成../config.json才对。。。
这样b.js相对位置由别人决定,根本没法共用了。
有没有大神知道怎么解决?
目录:
folderA:[a.js],
b.js,
config.json
a.js:
require('../b.js');
b.js:
fs.read('./config.json')
在folderA里执行casperjs a.js 抛错说找不到./config.json,写成../config.json才对。。。
这样b.js相对位置由别人决定,根本没法共用了。
有没有大神知道怎么解决?