diff --git a/lib/build.js b/lib/build.js index 15ba0cf..c01bb38 100644 --- a/lib/build.js +++ b/lib/build.js @@ -64,7 +64,7 @@ module.exports = function (args, callback) { "name": "roadhog-api-doc-boilerplate", "private": true, "scripts": { - "build": "${isWindows() ? `node ./win-build.js` : `../node_modules/.bin/roadhog build`}" + "build": "${isWindows() ? `node ./win-build.js` : `./node_modules/.bin/roadhog build`}" }, "dependencies": {}, "devDependencies": {} @@ -74,6 +74,7 @@ module.exports = function (args, callback) { // 4. 启动 roadhog process.chdir('_roadhog-api-doc'); + shelljs.ln('-sf', 'node_modules', '../node_modules'); shelljs.exec('npm run build', function (code, stdout, stderr) { fs.copySync(path.join(tempDir, './dist/'), path.join(cwd, './dist/'), { overwrite: true }); fs.removeSync(tempDir);