When following a Typescript tutorial to create an ASP.Net Core application (with or without Angular 2), it is recommended to set up a folder called Scripts and use gulp tasks to selectively copy only the .js files to the wwwroot
folder during the build process.
This approach makes sense, but what about the other file types that Angular 2 can utilize, such as .html, .css, and more? There seem to be two common methods for handling these files:
Adding them directly to the
wwwroot
folder.Pros: no need for additional gulp tasks to handle static files.
Cons: duplication of folder structure and extra operations like copying and renaming files will be necessary.
Keeping these files in the
Scripts
folder outside ofwwwroot
(consider renaming it to something likeSource
).Pros: eliminates duplication and keeps all files in one location.
Cons: will require manual copying of files to the
wwwroot
folder using gulp tasks.
In scenario 2, the wwwroot
folder essentially acts as a sort of 'bin' directory for a regular application.
Is there any official guidance or advice available on this topic? I have not been able to locate any resources to serve as a reference point.