I am attempting to transfer my static files from the input directory to the output directory using Express. I found guidance in this tutorial, which utilized shell.js for copying static files.
The code responsible for this operation is located in CopyAssets.ts:
import * as shell from "shelljs";
shell.cp( "-R", "src/views", "dist/" );
In addition, the script that triggers the command can be found in my package.json:
"scripts": {
"clean": "rimraf dist/*",
"copy-assets": "ts-node tools/CopyAssets",
"lint": "tslint -c tslint.json -p tsconfig.json --fix",
"tsc": "tsc",
"build": "npm-run-all clean lint tsc copy-assets",
"dev:start": "npm-run-all build",
"dev": "nodemon --watch src -e ts,hbs --exec npm run ",
"start": "node .",
"test": "echo \"Error: no test specified\" && exit 1"
}
Despite setting up an npm run dev
command, my scripts are not being copied over. Any ideas why this might be happening?