Currently working on a build script using npm.
This build script involves compiling typescript.
During the typescript compile process, it copies the folder structure from a ts directory to a dist/js directory.
An example of the structure in the ts folder:
ts
-- one
-- one.html
-- one.ts
two
-- two.html
-- two.ts
The resulting structure in the dist/js folder looks like this:
js
-- one
-- one.js
two
-- two.js
All ts folders contain html files that should be copied to the corresponding js folder post-compilation.
What shell command is recommended for copying the html from the ts folder into the correct folder within the outputed js folder?
Update:
A previous attempt with the following command led to an error:
"build:copy-html": "find ./app/ts -name '*.html' cp ./dist/js \\;",
The error received was:
Error: find: cp: unknown primary or operator
UPDATE:
In addition to the existing ts folder setup,
ts
--home
--home.html
--home.ts
The expected final js folder structure should look like this:
js
--home
--home.html
--home.js