SlideShare una empresa de Scribd logo
1 de 76
BOWER -
A PACKAGE MANAGER FOR THE WEB
Larry Nung
AGENDA
Introduction
Install
Bower Command
bower.json
.bowerrc
Lab
Reference
Q & A
Appendix
2
INTRODUCTION
INTRODUCTION
INSTALL
REQUIREMENT
 Node.js
 Git
INSTALL
 Linux
 Ubuntu
 sudo apt-get purge nodejs npm
 sudo apt-get update
 sudo apt-get install -y python-software-properties python g++
make
 sudo add-apt-repository ppa:chris-lea/node.js
 sudo apt-get update
 sudo apt-get install -y nodejs
 sudo apt-get install -y git
 sudo npm install -g bower
INSTALL
 Windows
 npm install -g bower
BOWER COMMAND
BOWER HELP
 Function
 Display help information about Bower
 Usage
 bower help
 bower help <command>
 Bower help install
BOWER HELP
BOWER INIT
 Function
 Interactively create a bower.json file
 Usage
 bower init
BOWER INIT
BOWER SEARCH
 Function
 Search for a package by name
 Usage
 bower search <package>
 bower search jquery
BOWER SEARCH
BOWER INSTALL
 Function
 Install a package locally
 Usage
 bower install
 bower install <package>
 bower install bootstrap spine jquery
 bower install <package>#<version>
 bower install jquery-ui#1.10.4
 bower install https://github.com/jquery/jquery.git#2.0.3
 bower install <package> --save
BOWER INSTALL
BOWER UNINSTALL
 Function
 Remove a local package
 Usage
 bower uninstall <package>
 bower uninstall jquery
BOWER UNINSTALL
BOWER LIST
 Function
 List local packages - and possible updates
 Usage
 bower list
 bower list –r
 bower list -p
BOWER LIST
BOWER LIST
BOWER UPDATE
 Function
 Update a local package
 Usage
 bower update <package>
 bower update jquery
BOWER UPDATE
BOWER CACHE
 Function
 Manage bower cache
 SubCommand
 list
 clean
BOWER CACHE LIST
 Function
 List cached packages
 Usage
 bower cache list
BOWER CACHE LIST
BOWER CACHE CLEAN
 Function
 Clean cached packages
 Usage
 bower cache clean
BOWER CACHE CLEAN
BOWER INFO
 Function
 Info of a particular package
 Usage
 bower info <package>
 bower info bootstrap
 bower info <package>#<version>
 bower info jquery#1.0.1
BOWER INFO
BOWER INFO
BOWER LOOKUP
 Function
 Look up a package URL by name
 Usage
 bower lookup <name>
 bower lookup jquery
BOWER LOOKUP
BOWER PRUNE
 Function
 Removes local extraneous packages
 Usage
 bower prune
BOWER PRUNE
BOWER HOME
 Function
 Opens a package homepage into your favorite browser
 Usage
 bower home <package>
 bower home jquery
BOWER VERSION
 Function
 Bump a package version
 Usage
 bower version <version>
 bower version v1.0.0
 bower patch
 bower minor
 bower major
BOWER VERSION
BOWER VERSION
BOWER VERSION
BOWER VERSION
BOWER REGISTER
 Function
 Register a package
 Usage
 bower register <name> <endpoint>
 bower register jquery_2.1.4
https://github.com/jquery/jquery.git#2.1.4
BOWER LOGIN
 Function
 Authenticate with GitHub and store credentials
 Usage
 bower login
BOWER UNREGISTER
 Function
 Remove a package from the registry
 Usage
 bower unregister <package>
 bower unregister jquery_2.1.4
BOWER LINK
 Function
 Symlink a package folder
BOWER.JSON
BOWER.JSON
{
"name": "blue-leaf",
"description": "Physics-like animations for pretty particles",
"main": [ "js/motion.js", "sass/motion.scss" ],
"dependencies": {
"get-size": "~1.2.2",
"eventEmitter": "~4.2.11"
},
"devDependencies": {
"qunit": "~1.16.0"
},
"moduleType": [ "amd", "globals", "node" ],
"keywords": [ "motion", "physics", "particles" ],
"authors": [ "Betty Beta " ],
"license": "MIT",
"ignore": [ "**/.*", "node_modules", "bower_components", "test", "tests" ],
"private": true
}
BOWER.JSON
Name Type Required Description
name String true The name of the package
as stored in the registry
description String false The description of the
package as stored in the
registry
version String false Use git or svn tags instead.
This field is ignored by
Bower
main String
String[]
false The entry-point files
necessary to use your
package.
moduleType String
String[]
false The type of module defined
in the main JavaScript file
BOWER.JSON
Name Type Required Description
license String
String[]
false SPDX license identifier or
path/url to a license
ignore String[] false A list of files for Bower to
ignore when installing your
package
keywords String[] false Used for search by keyword
authors String[]
Object[]
false A list of people that authored
the contents of the package
homepage String false URL to learn more about the
package
repository Object false The repository in which the
source code can be found
BOWER.JSON
Name Type Required Description
dependencies Object false Dependencies are specified
with a simple hash of
package name to a semver
compatible identifier or URL
devDependenc
ies
Object false Dependencies that are only
needed for development of
the package
resolutions Object false Dependency versions to
automatically resolve with if
conflicts occur between
packages
private Boolean false If set to true, Bower will
refuse to publish it.
.BOWERRC
.BOWERRC
 Location
 ~/bowerrc
 .bowerrc
.BOWERRC
{
"analytics": true,
"cwd": "~/.my-project",
"directory": "bower_components",
"registry": "https://bower.herokuapp.com",
"shorthand-resolver": "git://github.com/{{owner}}/{{package}}.git",
"proxy": "http://proxy.local",
"https-proxy": "https://proxy.local",
"ca": "/var/certificate.pem",
"color": true,
"timeout": 60000,
"storage": {
"packages" : "~/.bower/packages",
"registry" : "~/.bower/registry",
"links" : "~/.bower/links"
},
"interactive": true,
"resolvers": [ "mercurial-bower-resolver" ],
"shallowCloneHosts": [ "myGitHost.example.com" ]
}
.BOWERRC
Name Type Description
analytics Boolean Does Bower can collect anonymous
usage statistics?
cwd String Current working directory
directory String The path in which installed
components should be saved
registry Object
String
The registry config
shorthand-resolver String Define a custom template for
shorthand package names
proxy String The proxy to use for http requests
https-proxy String The proxy to use for https requests
user-agent String Sets the User-Agent for each
request made
.BOWERRC
Name Type Description
timeout Number The timeout to be used when
making requests in milliseconds,
defaults to 60000 ms.
strict-ssl Boolean Whether or not to do SSL key
validation when making requests via
https
ca Object
String
The CA certificates to be used
color Boolean Enable or disable use of colors in
the CLI output. Defaults to true.
storage Object Where to store persistent data, such
as cache, needed by bower.
tmp String Where to store temporary files and
folders.
.BOWERRC
Name Type Description
interactive Boolean Makes bower interactive, prompting
whenever necessary. Defaults
to null which means auto.
resolvers Array List of Pluggable Resolvers to use
for locating and fetching packages
shallowCloneHosts Array Bower's default behavior is to not
use shallow cloning
LAB
LAB1
 Search jQuery package
 Look up jQuery package's info
 List bower's cache
 Look up jQuery package's info which version is
2.1.4
 Clear bower's cache
 List bower's cache
 Install jQuery with version 2.1.4
 List package
 List bower's cache
LAB2
 Install Bootstrap
 List package
 Uninstall jQuery
 List package
 Update package
 List package
LAB3
 Init bower.json
 Install d3 with version 1.0.0 and let it save to
bower.json
 List package
 Open bower.json and change d3's version to 3.5.12
 Update package
 List package
LAB4
 Init bower.json
 Open bower.json and add jQueryUI package with
version 1.11.4
 Open bower.json and add AngularJS package with
version 1.4.8
 Install package from bower.json
 List package
REFERENCE
63
REFERENCE
 Bower
 http://bower.io/
 Bower 管理網站套件的好工具 | 小惡魔 - 電腦技術 -
工作筆記 - AppleBOY
 https://blog.wu-boy.com/2013/01/bower-is-a-package-
manager-for-the-web/
 Bower 前端套件管理工具 « Eden Tsai
 http://edentsai231.logdown.com/posts/198741-bower-
front-end-kit-management-tool
64
REFERENCE
 The Will Will Web | 如何在強制使用代理伺服器的環
境下設定 git, npm, bower, gem, ionic 工具
 http://blog.miniasp.com/post/2015/09/03/proxy-settings-
for-git-npm-bower-gem-ionic.aspx
 Visual-Bower Studio: 網頁程式開發的現代化工具
 https://msdn.microsoft.com/zh-
tw/magazine/mt573714.aspx
 Getting Started with Bower - Treehouse Blog
 http://blog.teamtreehouse.com/getting-started-bower
65
REFERENCE
 Bower 手冊- iFantasticMe - 博客園
 http://www.cnblogs.com/ifantastic/p/4651451.html
 [Web]Bower 前端套件管理工具 | 佛祖球球
 http://blog.johnsonlu.org/bower-front-end-kit-
management-tool/
 [Javascript] bower javascript套件管理工具 初探 - Mr.
一顆痣 a.k.a. bigd - 工程屍的日子
 http://iambigd.blogspot.tw/2014/06/javascript-bower-
javascript.html
66
REFERENCE
 spec/json.md at master · bower/spec
 https://github.com/bower/spec/blob/master/json.md
 spec/config.md at master · bower/spec
 https://github.com/bower/spec/blob/master/config.md
 Installing Node.js properly on Ubuntu · Steven Lu
 http://stevenlu.com/posts/2014/04/05/installing-nodejs-
on-ubuntu/
67
REFERENCE
 極客學院
 http://e.jikexueyuan.com/invite/invite.html?huodong=invi
te_www_floating
68
Q&A
69
QUESTION & ANSWER
70
APPENDIX
NPM PROXY SETTING
 npm config set proxy http://127.0.0.1:8080
 npm config set https-proxy https://127.0.0.1:8080
NPM PROXY SETTING
BOWER PROXY SETTING
{
"proxy": "http://127.0.0.1:8080",
"https-proxy": "https://127.0.0.1:8080",
"strict-ssl": false
}
BOWER PROXY SETTING
BOWER VAGRANT BOX
Vagrant.configure(2) do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.provision "file", source: ".bowerrc", destination: "bowerrc"
config.vm.provision "file", source: ".npmrc", destination: ".npmrc"
config.vm.provision "shell", inline: $script
end
$script = <<SCRIPT
sudo apt-get purge nodejs npm
sudo apt-get update
sudo apt-get install -y python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install -y nodejs
sudo apt-get install -y git
sudo npm install -g bower
SCRIPT

Más contenido relacionado

La actualidad más candente

Using Backbone.js with Drupal 7 and 8
Using Backbone.js with Drupal 7 and 8Using Backbone.js with Drupal 7 and 8
Using Backbone.js with Drupal 7 and 8
Ovadiah Myrgorod
 

La actualidad más candente (20)

Introduction to using Grunt & Bower with WordPress theme development
Introduction to using Grunt & Bower with WordPress theme developmentIntroduction to using Grunt & Bower with WordPress theme development
Introduction to using Grunt & Bower with WordPress theme development
 
Automating WordPress Theme Development
Automating WordPress Theme DevelopmentAutomating WordPress Theme Development
Automating WordPress Theme Development
 
Yeoman
YeomanYeoman
Yeoman
 
GDG Kraków - Intro to front-end automation using bower.js & grunt.js
GDG Kraków - Intro to front-end automation using bower.js & grunt.jsGDG Kraków - Intro to front-end automation using bower.js & grunt.js
GDG Kraków - Intro to front-end automation using bower.js & grunt.js
 
Forget Grunt and Gulp! Webpack and NPM rule them all!
Forget Grunt and Gulp! Webpack and NPM rule them all!Forget Grunt and Gulp! Webpack and NPM rule them all!
Forget Grunt and Gulp! Webpack and NPM rule them all!
 
Let Grunt do the work, focus on the fun! [Open Web Camp 2013]
Let Grunt do the work, focus on the fun! [Open Web Camp 2013]Let Grunt do the work, focus on the fun! [Open Web Camp 2013]
Let Grunt do the work, focus on the fun! [Open Web Camp 2013]
 
How we maintain 200+ Drupal sites in Georgetown University
How we maintain 200+ Drupal sites in Georgetown UniversityHow we maintain 200+ Drupal sites in Georgetown University
How we maintain 200+ Drupal sites in Georgetown University
 
Preprocessor Workflow with Grunt
Preprocessor Workflow with GruntPreprocessor Workflow with Grunt
Preprocessor Workflow with Grunt
 
Advanced front-end automation with npm scripts
Advanced front-end automation with npm scriptsAdvanced front-end automation with npm scripts
Advanced front-end automation with npm scripts
 
Create a Varnish cluster in Kubernetes for Drupal caching - DrupalCon North A...
Create a Varnish cluster in Kubernetes for Drupal caching - DrupalCon North A...Create a Varnish cluster in Kubernetes for Drupal caching - DrupalCon North A...
Create a Varnish cluster in Kubernetes for Drupal caching - DrupalCon North A...
 
Automating Front-End Workflow
Automating Front-End WorkflowAutomating Front-End Workflow
Automating Front-End Workflow
 
Npm scripts
Npm scriptsNpm scripts
Npm scripts
 
Grunt to automate JS build
Grunt to automate JS buildGrunt to automate JS build
Grunt to automate JS build
 
Using Backbone.js with Drupal 7 and 8
Using Backbone.js with Drupal 7 and 8Using Backbone.js with Drupal 7 and 8
Using Backbone.js with Drupal 7 and 8
 
Wocker @WordBench Osaka No.41
Wocker @WordBench Osaka No.41Wocker @WordBench Osaka No.41
Wocker @WordBench Osaka No.41
 
DevOps tools for everyone - Vagrant, Puppet and Webmin
DevOps tools for everyone - Vagrant, Puppet and WebminDevOps tools for everyone - Vagrant, Puppet and Webmin
DevOps tools for everyone - Vagrant, Puppet and Webmin
 
HTTPS + Let's Encrypt
HTTPS + Let's EncryptHTTPS + Let's Encrypt
HTTPS + Let's Encrypt
 
Webpack: your final module bundler
Webpack: your final module bundlerWebpack: your final module bundler
Webpack: your final module bundler
 
Webpack: from 0 to 2
Webpack: from 0 to 2Webpack: from 0 to 2
Webpack: from 0 to 2
 
Webpack DevTalk
Webpack DevTalkWebpack DevTalk
Webpack DevTalk
 

Similar a Bower - A package manager for the web

You've Got Plugins in Your Plugins: Bundling Plugin Dependencies - Atlassian ...
You've Got Plugins in Your Plugins: Bundling Plugin Dependencies - Atlassian ...You've Got Plugins in Your Plugins: Bundling Plugin Dependencies - Atlassian ...
You've Got Plugins in Your Plugins: Bundling Plugin Dependencies - Atlassian ...
Atlassian
 

Similar a Bower - A package manager for the web (20)

Bower introduction
Bower introductionBower introduction
Bower introduction
 
Angular Part 3 (Basic knowledge)
Angular Part 3 (Basic knowledge)Angular Part 3 (Basic knowledge)
Angular Part 3 (Basic knowledge)
 
Introduction to bower
Introduction to bowerIntroduction to bower
Introduction to bower
 
Distributing UI Libraries: in a post Web-Component world
Distributing UI Libraries: in a post Web-Component worldDistributing UI Libraries: in a post Web-Component world
Distributing UI Libraries: in a post Web-Component world
 
Modern Web Application Development Workflow - EclipseCon US 2014
Modern Web Application Development Workflow - EclipseCon US 2014Modern Web Application Development Workflow - EclipseCon US 2014
Modern Web Application Development Workflow - EclipseCon US 2014
 
Bower Fundamentals
Bower FundamentalsBower Fundamentals
Bower Fundamentals
 
You've Got Plugins in Your Plugins: Bundling Plugin Dependencies - Atlassian ...
You've Got Plugins in Your Plugins: Bundling Plugin Dependencies - Atlassian ...You've Got Plugins in Your Plugins: Bundling Plugin Dependencies - Atlassian ...
You've Got Plugins in Your Plugins: Bundling Plugin Dependencies - Atlassian ...
 
Using Composer with WordPress - 2.0
Using Composer with WordPress - 2.0Using Composer with WordPress - 2.0
Using Composer with WordPress - 2.0
 
ENIB 2015 2016 - CAI Web S02E03- Forge JS 1/4 - La forge JavaScript
ENIB 2015 2016 - CAI Web S02E03- Forge JS 1/4 - La forge JavaScriptENIB 2015 2016 - CAI Web S02E03- Forge JS 1/4 - La forge JavaScript
ENIB 2015 2016 - CAI Web S02E03- Forge JS 1/4 - La forge JavaScript
 
Using composer with WordPress
Using composer with WordPressUsing composer with WordPress
Using composer with WordPress
 
Arbeiten mit distribute, pip und virtualenv
Arbeiten mit distribute, pip und virtualenvArbeiten mit distribute, pip und virtualenv
Arbeiten mit distribute, pip und virtualenv
 
Modern Web Application Development Workflow - web2day 2014
Modern Web Application Development Workflow - web2day 2014Modern Web Application Development Workflow - web2day 2014
Modern Web Application Development Workflow - web2day 2014
 
JDD2015: Kubernetes - Beyond the basics - Paul Bakker
JDD2015: Kubernetes - Beyond the basics - Paul BakkerJDD2015: Kubernetes - Beyond the basics - Paul Bakker
JDD2015: Kubernetes - Beyond the basics - Paul Bakker
 
ENIB 2015-2016 - CAI Web - S01E01- La forge JavaScript
ENIB 2015-2016 - CAI Web - S01E01- La forge JavaScriptENIB 2015-2016 - CAI Web - S01E01- La forge JavaScript
ENIB 2015-2016 - CAI Web - S01E01- La forge JavaScript
 
How Browser Works?
How Browser Works?How Browser Works?
How Browser Works?
 
GlassFish v3 Update Center
GlassFish v3 Update CenterGlassFish v3 Update Center
GlassFish v3 Update Center
 
JS Lab`16. Владимир Воевидка: "Как работает браузер"
JS Lab`16. Владимир Воевидка: "Как работает браузер"JS Lab`16. Владимир Воевидка: "Как работает браузер"
JS Lab`16. Владимир Воевидка: "Как работает браузер"
 
Shipping to Server and Cloud with Docker
Shipping to Server and Cloud with DockerShipping to Server and Cloud with Docker
Shipping to Server and Cloud with Docker
 
Welcome to Jenkins
Welcome to JenkinsWelcome to Jenkins
Welcome to Jenkins
 
Build r
Build rBuild r
Build r
 

Más de Larry Nung

Más de Larry Nung (20)

Ansible - simple it automation
Ansible - simple it automationAnsible - simple it automation
Ansible - simple it automation
 
sonarwhal - a linting tool for the web
sonarwhal - a linting tool for the websonarwhal - a linting tool for the web
sonarwhal - a linting tool for the web
 
LiteDB - A .NET NoSQL Document Store in a single data file
LiteDB - A .NET NoSQL Document Store in a single data fileLiteDB - A .NET NoSQL Document Store in a single data file
LiteDB - A .NET NoSQL Document Store in a single data file
 
PL/SQL & SQL CODING GUIDELINES – Part 8
PL/SQL & SQL CODING GUIDELINES – Part 8PL/SQL & SQL CODING GUIDELINES – Part 8
PL/SQL & SQL CODING GUIDELINES – Part 8
 
MessagePack - An efficient binary serialization format
MessagePack - An efficient binary serialization formatMessagePack - An efficient binary serialization format
MessagePack - An efficient binary serialization format
 
PL/SQL & SQL CODING GUIDELINES – Part 7
PL/SQL & SQL CODING GUIDELINES – Part 7PL/SQL & SQL CODING GUIDELINES – Part 7
PL/SQL & SQL CODING GUIDELINES – Part 7
 
BenchmarkDotNet - Powerful .NET library for benchmarking
BenchmarkDotNet  - Powerful .NET library for benchmarkingBenchmarkDotNet  - Powerful .NET library for benchmarking
BenchmarkDotNet - Powerful .NET library for benchmarking
 
PLSQL Coding Guidelines - Part 6
PLSQL Coding Guidelines - Part 6PLSQL Coding Guidelines - Part 6
PLSQL Coding Guidelines - Part 6
 
SonarQube - The leading platform for Continuous Code Quality
SonarQube - The leading platform for Continuous Code QualitySonarQube - The leading platform for Continuous Code Quality
SonarQube - The leading platform for Continuous Code Quality
 
Visual studio 2017
Visual studio 2017Visual studio 2017
Visual studio 2017
 
Web deploy command line
Web deploy command lineWeb deploy command line
Web deploy command line
 
Web deploy
Web deployWeb deploy
Web deploy
 
SikuliX
SikuliXSikuliX
SikuliX
 
Topshelf - An easy service hosting framework for building Windows services us...
Topshelf - An easy service hosting framework for building Windows services us...Topshelf - An easy service hosting framework for building Windows services us...
Topshelf - An easy service hosting framework for building Windows services us...
 
Common.logging
Common.loggingCommon.logging
Common.logging
 
protobuf-net - Protocol Buffers library for idiomatic .NET
protobuf-net - Protocol Buffers library for idiomatic .NETprotobuf-net - Protocol Buffers library for idiomatic .NET
protobuf-net - Protocol Buffers library for idiomatic .NET
 
PL/SQL & SQL CODING GUIDELINES – Part 5
PL/SQL & SQL CODING GUIDELINES – Part 5PL/SQL & SQL CODING GUIDELINES – Part 5
PL/SQL & SQL CODING GUIDELINES – Part 5
 
Regular expression
Regular expressionRegular expression
Regular expression
 
PL/SQL & SQL CODING GUIDELINES – Part 4
PL/SQL & SQL CODING GUIDELINES – Part 4PL/SQL & SQL CODING GUIDELINES – Part 4
PL/SQL & SQL CODING GUIDELINES – Part 4
 
Fx.configuration
Fx.configurationFx.configuration
Fx.configuration
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 

Bower - A package manager for the web

  • 1. BOWER - A PACKAGE MANAGER FOR THE WEB Larry Nung
  • 7. INSTALL  Linux  Ubuntu  sudo apt-get purge nodejs npm  sudo apt-get update  sudo apt-get install -y python-software-properties python g++ make  sudo add-apt-repository ppa:chris-lea/node.js  sudo apt-get update  sudo apt-get install -y nodejs  sudo apt-get install -y git  sudo npm install -g bower
  • 8. INSTALL  Windows  npm install -g bower
  • 10. BOWER HELP  Function  Display help information about Bower  Usage  bower help  bower help <command>  Bower help install
  • 12. BOWER INIT  Function  Interactively create a bower.json file  Usage  bower init
  • 14. BOWER SEARCH  Function  Search for a package by name  Usage  bower search <package>  bower search jquery
  • 16. BOWER INSTALL  Function  Install a package locally  Usage  bower install  bower install <package>  bower install bootstrap spine jquery  bower install <package>#<version>  bower install jquery-ui#1.10.4  bower install https://github.com/jquery/jquery.git#2.0.3  bower install <package> --save
  • 18. BOWER UNINSTALL  Function  Remove a local package  Usage  bower uninstall <package>  bower uninstall jquery
  • 20. BOWER LIST  Function  List local packages - and possible updates  Usage  bower list  bower list –r  bower list -p
  • 23. BOWER UPDATE  Function  Update a local package  Usage  bower update <package>  bower update jquery
  • 25. BOWER CACHE  Function  Manage bower cache  SubCommand  list  clean
  • 26. BOWER CACHE LIST  Function  List cached packages  Usage  bower cache list
  • 28. BOWER CACHE CLEAN  Function  Clean cached packages  Usage  bower cache clean
  • 30. BOWER INFO  Function  Info of a particular package  Usage  bower info <package>  bower info bootstrap  bower info <package>#<version>  bower info jquery#1.0.1
  • 33. BOWER LOOKUP  Function  Look up a package URL by name  Usage  bower lookup <name>  bower lookup jquery
  • 35. BOWER PRUNE  Function  Removes local extraneous packages  Usage  bower prune
  • 37. BOWER HOME  Function  Opens a package homepage into your favorite browser  Usage  bower home <package>  bower home jquery
  • 38. BOWER VERSION  Function  Bump a package version  Usage  bower version <version>  bower version v1.0.0  bower patch  bower minor  bower major
  • 43. BOWER REGISTER  Function  Register a package  Usage  bower register <name> <endpoint>  bower register jquery_2.1.4 https://github.com/jquery/jquery.git#2.1.4
  • 44. BOWER LOGIN  Function  Authenticate with GitHub and store credentials  Usage  bower login
  • 45. BOWER UNREGISTER  Function  Remove a package from the registry  Usage  bower unregister <package>  bower unregister jquery_2.1.4
  • 46. BOWER LINK  Function  Symlink a package folder
  • 48. BOWER.JSON { "name": "blue-leaf", "description": "Physics-like animations for pretty particles", "main": [ "js/motion.js", "sass/motion.scss" ], "dependencies": { "get-size": "~1.2.2", "eventEmitter": "~4.2.11" }, "devDependencies": { "qunit": "~1.16.0" }, "moduleType": [ "amd", "globals", "node" ], "keywords": [ "motion", "physics", "particles" ], "authors": [ "Betty Beta " ], "license": "MIT", "ignore": [ "**/.*", "node_modules", "bower_components", "test", "tests" ], "private": true }
  • 49. BOWER.JSON Name Type Required Description name String true The name of the package as stored in the registry description String false The description of the package as stored in the registry version String false Use git or svn tags instead. This field is ignored by Bower main String String[] false The entry-point files necessary to use your package. moduleType String String[] false The type of module defined in the main JavaScript file
  • 50. BOWER.JSON Name Type Required Description license String String[] false SPDX license identifier or path/url to a license ignore String[] false A list of files for Bower to ignore when installing your package keywords String[] false Used for search by keyword authors String[] Object[] false A list of people that authored the contents of the package homepage String false URL to learn more about the package repository Object false The repository in which the source code can be found
  • 51. BOWER.JSON Name Type Required Description dependencies Object false Dependencies are specified with a simple hash of package name to a semver compatible identifier or URL devDependenc ies Object false Dependencies that are only needed for development of the package resolutions Object false Dependency versions to automatically resolve with if conflicts occur between packages private Boolean false If set to true, Bower will refuse to publish it.
  • 54. .BOWERRC { "analytics": true, "cwd": "~/.my-project", "directory": "bower_components", "registry": "https://bower.herokuapp.com", "shorthand-resolver": "git://github.com/{{owner}}/{{package}}.git", "proxy": "http://proxy.local", "https-proxy": "https://proxy.local", "ca": "/var/certificate.pem", "color": true, "timeout": 60000, "storage": { "packages" : "~/.bower/packages", "registry" : "~/.bower/registry", "links" : "~/.bower/links" }, "interactive": true, "resolvers": [ "mercurial-bower-resolver" ], "shallowCloneHosts": [ "myGitHost.example.com" ] }
  • 55. .BOWERRC Name Type Description analytics Boolean Does Bower can collect anonymous usage statistics? cwd String Current working directory directory String The path in which installed components should be saved registry Object String The registry config shorthand-resolver String Define a custom template for shorthand package names proxy String The proxy to use for http requests https-proxy String The proxy to use for https requests user-agent String Sets the User-Agent for each request made
  • 56. .BOWERRC Name Type Description timeout Number The timeout to be used when making requests in milliseconds, defaults to 60000 ms. strict-ssl Boolean Whether or not to do SSL key validation when making requests via https ca Object String The CA certificates to be used color Boolean Enable or disable use of colors in the CLI output. Defaults to true. storage Object Where to store persistent data, such as cache, needed by bower. tmp String Where to store temporary files and folders.
  • 57. .BOWERRC Name Type Description interactive Boolean Makes bower interactive, prompting whenever necessary. Defaults to null which means auto. resolvers Array List of Pluggable Resolvers to use for locating and fetching packages shallowCloneHosts Array Bower's default behavior is to not use shallow cloning
  • 58. LAB
  • 59. LAB1  Search jQuery package  Look up jQuery package's info  List bower's cache  Look up jQuery package's info which version is 2.1.4  Clear bower's cache  List bower's cache  Install jQuery with version 2.1.4  List package  List bower's cache
  • 60. LAB2  Install Bootstrap  List package  Uninstall jQuery  List package  Update package  List package
  • 61. LAB3  Init bower.json  Install d3 with version 1.0.0 and let it save to bower.json  List package  Open bower.json and change d3's version to 3.5.12  Update package  List package
  • 62. LAB4  Init bower.json  Open bower.json and add jQueryUI package with version 1.11.4  Open bower.json and add AngularJS package with version 1.4.8  Install package from bower.json  List package
  • 64. REFERENCE  Bower  http://bower.io/  Bower 管理網站套件的好工具 | 小惡魔 - 電腦技術 - 工作筆記 - AppleBOY  https://blog.wu-boy.com/2013/01/bower-is-a-package- manager-for-the-web/  Bower 前端套件管理工具 « Eden Tsai  http://edentsai231.logdown.com/posts/198741-bower- front-end-kit-management-tool 64
  • 65. REFERENCE  The Will Will Web | 如何在強制使用代理伺服器的環 境下設定 git, npm, bower, gem, ionic 工具  http://blog.miniasp.com/post/2015/09/03/proxy-settings- for-git-npm-bower-gem-ionic.aspx  Visual-Bower Studio: 網頁程式開發的現代化工具  https://msdn.microsoft.com/zh- tw/magazine/mt573714.aspx  Getting Started with Bower - Treehouse Blog  http://blog.teamtreehouse.com/getting-started-bower 65
  • 66. REFERENCE  Bower 手冊- iFantasticMe - 博客園  http://www.cnblogs.com/ifantastic/p/4651451.html  [Web]Bower 前端套件管理工具 | 佛祖球球  http://blog.johnsonlu.org/bower-front-end-kit- management-tool/  [Javascript] bower javascript套件管理工具 初探 - Mr. 一顆痣 a.k.a. bigd - 工程屍的日子  http://iambigd.blogspot.tw/2014/06/javascript-bower- javascript.html 66
  • 67. REFERENCE  spec/json.md at master · bower/spec  https://github.com/bower/spec/blob/master/json.md  spec/config.md at master · bower/spec  https://github.com/bower/spec/blob/master/config.md  Installing Node.js properly on Ubuntu · Steven Lu  http://stevenlu.com/posts/2014/04/05/installing-nodejs- on-ubuntu/ 67
  • 72. NPM PROXY SETTING  npm config set proxy http://127.0.0.1:8080  npm config set https-proxy https://127.0.0.1:8080
  • 74. BOWER PROXY SETTING { "proxy": "http://127.0.0.1:8080", "https-proxy": "https://127.0.0.1:8080", "strict-ssl": false }
  • 76. BOWER VAGRANT BOX Vagrant.configure(2) do |config| config.vm.box = "precise64" config.vm.box_url = "http://files.vagrantup.com/precise64.box" config.vm.provision "file", source: ".bowerrc", destination: "bowerrc" config.vm.provision "file", source: ".npmrc", destination: ".npmrc" config.vm.provision "shell", inline: $script end $script = <<SCRIPT sudo apt-get purge nodejs npm sudo apt-get update sudo apt-get install -y python-software-properties python g++ make sudo add-apt-repository ppa:chris-lea/node.js sudo apt-get update sudo apt-get install -y nodejs sudo apt-get install -y git sudo npm install -g bower SCRIPT