Tuesday, July 30, 2019
In this blog post we are going to add the jQuery, and bootstrap libraries to our ASP.NET Core application. Normally we will use NuGet to bring in these libraries but ASP.NET Core gives you the option to use bower.json file to configure the dependencies that you will need on the client-side using NPM in the backend.
Here are the steps to import the client-side dependencies into our project:
1. First let's add bower.json file of the "NorthwindCafe.Web" project, Right-click on the NorthwindCafe.Web project and add a file called bower.json in the project
2. Open the bower.json file the markup should look like this
3. Change the markup to look like the following
5. Now we want to specify the location of where we want the bower components are installed in our application. For that we want to create the .bowerrc file . the only variable we want to set in the file "directory" file, which specifies where we want the bower components to be install. Let's install the bower components in the "wwwroot/lib" folder. So in the .bowerrc file type in the following
5. Save the bower.json file, once the file is saved a folder called "lib" will be created and will contain the bootstrap libraries. If bower does not run, you can also go into the project folder in command prompt and run the command bower install
github Repository: https://github.com/techjunkiejh/NorthwindCafe/tree/Hour6
Here are the steps to import the client-side dependencies into our project:
1. First let's add bower.json file of the "NorthwindCafe.Web" project, Right-click on the NorthwindCafe.Web project and add a file called bower.json in the project
2. Open the bower.json file the markup should look like this
{ "name": "asp.net", "private": true, "dependencies": { } }
3. Change the markup to look like the following
{ "version": "1.0.0", "name": "asp.net", "private": true, "devDependencies": { "bootstrap": "^4.3.1", "Jquery": "^3.4.1" } }
5. Now we want to specify the location of where we want the bower components are installed in our application. For that we want to create the .bowerrc file . the only variable we want to set in the file "directory" file, which specifies where we want the bower components to be install. Let's install the bower components in the "wwwroot/lib" folder. So in the .bowerrc file type in the following
{ "directory": "wwwroot/lib" }
5. Save the bower.json file, once the file is saved a folder called "lib" will be created and will contain the bootstrap libraries. If bower does not run, you can also go into the project folder in command prompt and run the command bower install
github Repository: https://github.com/techjunkiejh/NorthwindCafe/tree/Hour6
Subscribe to:
Post Comments (Atom)
Search This Blog
Tags
Web Development
Linux
Javascript
DATA
CentOS
ASPNET
SQL Server
Cloud Computing
ASP.NET Core
ASP.NET MVC
SQL
Virtualization
AWS
Database
ADO.NET
AngularJS
C#
CSS
EC2
Iaas
System Administrator
Azure
Computer Programming
JQuery
Coding
ASP.NET MVC 5
Entity Framework Core
Web Design
Infrastructure
Networking
Visual Studio
Errors
T-SQL
Ubuntu
Stored Procedures
ACME Bank
Bootstrap
Computer Networking
Entity Framework
Load Balancer
MongoDB
NoSQL
Node.js
Oracle
VirtualBox
Container
Docker
Fedora
Java
Source Control
git
ExpressJS
MySQL
NuGet
Blogger
Blogging
Bower.js
Data Science
JSON
JavaEE
Web Api
DBMS
DevOps
HTML5
MVC
SPA
Storage
github
AJAX
Big Data
Design Pattern
Eclipse IDE
Elastic IP
GIMP
Graphics Design
Heroku
Linux Mint
Postman
R
SSL
Security
Visual Studio Code
ASP.NET MVC 4
CLI
Linux Commands
Powershell
Python
Server
Software Development
Subnets
Telerik
VPC
Windows Server 2016
angular-seed
font-awesome
log4net
servlets
tomcat
AWS CloudWatch
Active Directory
Angular
Blockchain
Collections
Compatibility
Cryptocurrency
DIgital Life
DNS
Downloads
Google Blogger
Google Chrome
Google Fonts
Hadoop
IAM
KnockoutJS
LINQ
Linux Performance
Logging
Mobile-First
Open Source
Prototype
R Programming
Responsive
Route 53
S3
SELinux
Software
Unix
View
Web Forms
WildFly
XML
cshtml
githu
I am an experienced writer working as an academic writer at Assignmentsquare.co.uk for seven years provides their assignment writing service to students globally.
ReplyDeleteMua vé tại Aivivu, tham khảo
ReplyDeletesăn vé máy bay giá rẻ đi Mỹ
lịch bay mỹ về việt nam
vé máy bay từ đức về việt nam giá rẻ
các chuyến bay từ nga về việt nam
chuyến bay từ anh về việt nam
bay từ pháp về việt nam mấy tiếng
ve may bay cho chuyen gia nuoc ngoai