- Install required global npm packages using
npm install --global typescript webpack webpack-cli cpy-cli del-cli - Run
npm installin main directory to make sure locally required npm packages are installed
- Run
npm run build, which will run TypeScript and Webpack and copy results to subdirectory./dist
- TypeScript is configured to compile from subdirectory
./srcto subdirectory./js - Webpack is configured to bundle from
./js/main.jsto./dist/bundle.js - .html and other non-TypeScript files get copied from subdirectory
./srcto subdirectory./dist main.tsserves as the entry point of the application
- Copy directory and adapt
package.json