In my package.json (from npm), I have the following build command:
"build": "mkdir -p ./build && cp ./src/index.html ./build/ && webpack -p --config webpack.production.config.js"
"build": "mkdir build && mkdir -p ./build/images && cp src/index.html build/ && webpack -p --config webpack.production.config.js"
This is because of the sub-POSIX-standard Windows
mkdir command. Writing portable shell commands this way is difficult and limiting.
One option would be to install and use the
mkdirp command will be available to the npm scripts.
npm install --save-dev mkdirp
"build": "mkdirp ./build && mkdirp ./build/images && ..."