fix(scripts): adjust npm run scripts

This commit is contained in:
Mrugesh Mohapatra
2018-09-27 12:28:31 +05:30
parent 12ee5fd431
commit 9aad55f8af
3 changed files with 8 additions and 6 deletions

View File

@ -3,13 +3,15 @@
"version": "0.0.1", "version": "0.0.1",
"scripts": { "scripts": {
"bootstrap": "lerna bootstrap", "bootstrap": "lerna bootstrap",
"develop": "node ./config/ensure-env.js && node develop-client-server.js", "develop": "npm-run-all -s ensure-env start-develop",
"ensure-env": "node ./scripts/ensure-env.js",
"lint": "echo 'Warning: TODO - Define Linting.'", "lint": "echo 'Warning: TODO - Define Linting.'",
"pretest": "run-s lint bootstrap", "pretest": "npm-run-all -s lint bootstrap",
"test": "run-p test:*", "test": "npm-run-all -p test:*",
"test:client": "echo 'Warning: TODO - Define Testing.'", "test:client": "echo 'Warning: TODO - Define Testing.'",
"test:curriculum": "echo 'Warning: TODO - Define Testing.'", "test:curriculum": "echo 'Warning: TODO - Define Testing.'",
"test:server": "echo 'Warning: TODO - Define Testing.'" "test:server": "echo 'Warning: TODO - Define Testing.'",
"start-develop": "node ./scripts/start-develop.js"
}, },
"devDependencies": { "devDependencies": {
"eslint-config-freecodecamp": "^1.1.1", "eslint-config-freecodecamp": "^1.1.1",

View File

@ -1,7 +1,7 @@
const fs = require('fs'); const fs = require('fs');
const path = require('path'); const path = require('path');
const env = require('./env'); const env = require('../config/env');
const apiPath = path.resolve(__dirname, '../api-server'); const apiPath = path.resolve(__dirname, '../api-server');
const clientPath = path.resolve(__dirname, '../client'); const clientPath = path.resolve(__dirname, '../client');
@ -28,4 +28,4 @@ fs.access(`${apiPath}/server/resources/pathMigration.json`, err => {
}); });
fs.writeFileSync(`${clientPath}/config/env.json`, JSON.stringify(env)) fs.writeFileSync(`${clientPath}/config/env.json`, JSON.stringify(env));