-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Your package.json scripts are a little bit unstable I think:
"scripts": {
"build:student": "cd student && npm start",
"start": "cd student && npm run build && cd .. && node ./src/server.js",
"eslint": "eslint ./src/",
"eslint:fix": "eslint --fix ./src/"
}I think start will not work unless someone has already cd'd into student and ran npm i.
Your build:student script is badly named. It is not building the student app, it is running it in dev mode. Build student would surely run npm run build once it had cd'd into the correct directory. This will also break if someone hasn't npm i'd in the student directory.
You also do not have a script for running in dev mode on the server which is quite useful and saves you having to wait to build the client app every time you want to check changes on the server.
You should seperate out all these things logically, for example:
"scripts": {
"install:student": "script to cd into and npm i client side",
"dev:student": "// script to run student in dev mode",
"build:student": "// script that actually builds student",
"dev:server": "// script to just run server in dev mode",
"start:server": "// script to just start the server (using node)",
"start": "npm run install:student && npm run build:student && npm run start:server",
"eslint": "eslint ./src/",
"eslint:fix": "eslint --fix ./src/"
}This way you just use the other scripts (you should make sure the other scripts cd .. at the end so they all end up in the correct directory