I have a React app which is running on AWS S3. Here is my script for building & deploying;
"scripts": {
"predeploy": "npm run build-css && NODE_PATH=src react-scripts build",
"deploy": "aws s3 sync build/ s3://example.com",
}
However, this is very annoying that I should wait for the "predeploy" then "deploy". How do I achieve it with just one command line?
Can I just join all in one? So for example,
"deploy": "npm run build-css && NODE_PATH=src react-scripts build && aws s3 sync build/ s3://example.com"