Saturday, June 25, 2016
Bower is a JavaScript tool to get client dependencies in your project using npm packages.
The requirement for bower is that you need to install Node.js first. You can follow along in the this blog to install node.js, After node.js is installed open the command line and type the following command
npm install -g bower
The command above will install bower in your system globally. Now we can use bower install packages individually, but the convenience of bower is in the bower.json file. With the bower.json file we can specify all the dependencies that our project will need in one configuration file.
Here are the steps:
1. Create a folder call "AngularShoppingApp"
2. Create a file call bower.json in your favorite text editor
3. The content of the bower.json file should look like this
The important thing to look at is the dependencies section. As you can see we listed out our dependencies in the json file and let bower take care of it for ourselves.
The ~ symbol tells bower to get any version that starts with the numbers after it. The other notable values are the "name" which is the name of the application.
4. 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 "js/lib" folder. So in the .bowerrc file type in the following
4. Now open up the cmd file and navigate to the folder where the bower.json file is located, and type in the following command
bower install
after you type bower install the JavaScript libraries will be installed in the "js/lib" library
The folder structure of your app should look like the following:
The requirement for bower is that you need to install Node.js first. You can follow along in the this blog to install node.js, After node.js is installed open the command line and type the following command
npm install -g bower
The command above will install bower in your system globally. Now we can use bower install packages individually, but the convenience of bower is in the bower.json file. With the bower.json file we can specify all the dependencies that our project will need in one configuration file.
Here are the steps:
1. Create a folder call "AngularShoppingApp"
2. Create a file call bower.json in your favorite text editor
3. The content of the bower.json file should look like this
{ "name": "ShoppingApp", "private": true, "dependencies": { "angularjs": "~1.5.7", "bootstrap": "~3.3.6" } }
The important thing to look at is the dependencies section. As you can see we listed out our dependencies in the json file and let bower take care of it for ourselves.
The ~ symbol tells bower to get any version that starts with the numbers after it. The other notable values are the "name" which is the name of the application.
4. 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 "js/lib" folder. So in the .bowerrc file type in the following
{ "directory": "js/lib" }
4. Now open up the cmd file and navigate to the folder where the bower.json file is located, and type in the following command
bower install
after you type bower install the JavaScript libraries will be installed in the "js/lib" library
The folder structure of your app should look like the following:
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
GB WhatsApp apk is not directly available on iPhone just yet but the developers are working on it. Although one may use android emulators to download it. This will allow iOS to run Android applications.
ReplyDeleteIf you really want you can look the other way and not talk about it. Dont give up your morals for anything. This will lead to a sad and unfulfilling life.
ReplyDeleteMua vé tại đại lý vé máy bay Aivivu, tham khảo
ReplyDeleteVe may bay di My
có thể bay từ mỹ về việt nam không
giá vé máy bay từ Vancouver về việt nam
bay nhật việt
Có chuyến bay từ Hàn Quốc về Việt Nam không
Vé máy bay từ Đài Loan về Việt Nam
ve may bay chuyen gia nuoc ngoai