rxc-app/Notes.txt

19 lines
930 B
Plaintext

#############################
# Config initial scripts: #
#############################
"scripts": {
"start": "run-p start:dev start:api",
"start:dev": "webpack-dev-server --config webpack.config.dev.js --port 3000",
"prestart:api": "node tools/createMockDb.js",
"start:api": "node tools/apiServer.js",
"test": "jest --watch",
"test:ci": "jest",
"clean:build": "rimraf ./build && mkdir build",
"prebuild": "run-p clean:build test:ci",
"build": "webpack --config webpack.config.prod.js",
"postbuild": "run-p start:api serve:build",
"serve:build": "http-server ./build"
}
- "postbuild" este apelat automat dupa "build" si este util in cazul in care se doreste ca aplicatia sa porneasca automat dupa executia unui build
- in cazul in care se doreste doar executia unui build, se elimina "postbuild". Poate fi redenumit in "start:prod" si rulat ulterior astfel "npm run start:prod"