Exploring ASP.Net Core + NPM for the first time, I have been trying out different online tutorials. However, most of them don't seem to work completely as expected, including the current one that I am working on.
I'm facing an issue where Bower Packages are not automatically migrating into the wwwroot\lib
directory as they should by default.
Q: How can I ensure that the Bower Packages get installed in the 'Lib' directory without manual intervention?
- Even when creating an empty Web Application, I noticed the Bower Packages were not migrating automatically. It seems like we might need to handle this manually.
https://i.stack.imgur.com/hWgbV.png
Below are the steps I followed:
Using: Visual Studio 2017 (Community Edition)
STEP 1:
Created a project with MVC folders and added directories to WWWRoot (refer image below).
- Started with ASP.NET Core Web Application (.NET Core) project
- Included MVC Folders
- Added WWWRoot Folders
- Setup folders for TypeScript files
STEP 2:
Configured TypeScript settings
- Updated tsconfig.json, the TypeScript compiler configuration file (details below)
- Included typings, the TypeScript type definition files (provided below)
TSCONFIG.JSON
{
// TypeScript compiler options
}
TYPINGS.JSON
{
// Type definition details
}
STEP 3:
Setting up NPM for Angular 2 and dependencies
PACKAGE.JSON
{
// Package details
}
STEP 4:
Configuration Gulp tasks
GULP.CONFIG.JS
{
// Gulp configuration settings
}
STEP 5:
Creation of Gulp tasks
GULPFILE.JS
{
// Gulp task definitions
}