Having trouble organizing the build process for my frontend web app created with Angular 2 and TypeScript.
This is the structure I'm working with:
/
- dist/ <-- transpiled .js files
- src/ <-- .ts files
- assets/
- bower_components/
- node_modules/
- package.json
- index.html
Question 1
Would like to remove src
folder from production server. How should I approach deleting it? Using npm script, Grunt task, or rm
when creating a Docker image?
Same issue with package.json
and Gruntfile.js
.
Question 2
Concerns about node_modules
folder: bundling dependencies with Browserify into a single file. Is it necessary to delete node_modules
on production server? If so, how?
Also unsure about which modules not included in final bundle (e.g. referenced from <script>
tags) to delete and keep. Any advice?