SlideShare uma empresa Scribd logo
1 de 25
BOWER
_by Oleksii Prohonnyi
Bower vs NPM
Bower vs NPM
 NPM and Bower are both dependency management tools. But the
main difference between both is NPM is used for installing Node.js
modules but Bower.js is used for managing front end components
like HTML,CSS,JS etc.
 Bower, unlike NPM, can have multiple files (e.g. .js, .css, .html,
.png, .ttf) which are considered the main file(s). Bower semantically
considers these main files, when packaged together, a component.
Getting started
Install Bower
 Bower is a command line utility. Install it with npm.
$ npm install -g bower
 Bower requires node, npm and git.
 Latest release: v1.7.6
 See more: http://bower.io/
Packages
Configuration
 Packages are defined by a manifest file bower.json. This is similar
to Node’s package.json or Ruby’s Gemfile.
 Interactively create a bower.json with bower init:
$ bower init
 Detailed specification of bower.json file can be found in bower/spec
repository.
Dependencies maintenance
 Bower installs packages to bower_components/ by default.
$ bower install <package>
 Using bower install <package> --save will add <package> to your
project’s bower.json dependencies array.
$ bower install <package> --save
 Similarly, using bower install <package> --save-dev will add
<package> to your project’s bower.json devDependencies array.
$ bower install <package> --save-dev
Dependencies maintenance
 A package can be a GitHub shorthand, a Git endpoint, a URL, and
more.
$ bower install
$ bower install jquery
$ bower install desandro/masonry
$ bower install
git://github.com/user/package.git
$ bower install http://example.com/script.js
Search packages
 If you want to check that the asset you want is a Bower package
you can do a search:
$ bower search <package-name>
 Search bower packages using web interface: http://bower.io/search/
Use packages
 It is recommended to use Bower together with Grunt, RequireJS,
Yeoman, and lots of other tools or build own workflow with the API.
 It is also possible to use the installed packages directly, like this:
<script src=“
bower_components/jquery/dist/jquery.min.js
"></script>
Register packages
 Registering your package allows others to install it with a short
name, like bower install <my-package-name>.
$ bower register <my-package-name> <git-endpoint>
 Now anyone can run bower install <my-package-name>, and get
your library installed. The Bower registry does not have
authentication or user management at this point in time. It’s on a
first come, first served basis.
Unregister packages
 You can unregister packages with bower unregister.
 You first need to authenticate with GitHub with bower login to
confirm you are a contributor to the package repo.
bower login
? Username:
? Password:
bower unregister <package>
 You’ll likely want to bower cache clean after your change.
Commands
Commands list
 cache
 help
 home
 info
 init
 install
 link
 list
 login
 lookup
 prune
 register
 search
 update
 uninstall
 unregister
 version
Programmatic API
 Bower provides a powerful, programmatic API. All commands can
be accessed through the bower.commands object.
 var bower = require('bower');
bower.commands
.install(['jquery'], { save: true }, { /*
custom config */ })
.on('end', function (installed) {
console.log(installed);
});
Configuration
.bowerrc file
 Bower can be configured using JSON in a .bowerrc file. For example:
{
"directory": "app/components/",
"analytics": false,
"timeout": 120000,
"registry": {
"search": [
"http://localhost:8000",
"https://bower.herokuapp.com"
]
}
}
More options
 Full .bowerrc file specification could be found:
http://bower.io/docs/config/#bowerrc-specification
 One can use environment variables in .bowerrc, using the following
syntax ${ENV_VAR}.
"storage": {"packages":“/path/to/${USER}/packages"}
 Bower provides 3 separate hooks that can be used to trigger other
automated tools during Bower usage: preinstall, postinstall,
preuninstall.
Resolvers and tools
Resolvers
 For example, resolvers can be used for:
 Handling Mercurial or Bazaar repositories
 Speeding up checkouts of services like GitLab or Bitbucket
 Allowing to use packages from npm or component.io
 Proxying downloads through 3rd party service like Artifactory
 Implementing custom private registry (hosted on GitHub?)
 Adding authentication support for private GitHub Enterprise
instances
 See more: http://bower.io/docs/pluggable-resolvers/
Resolvers usage
 Pluggable Resolver is just an npm package that you install as
devDependency in the package.json of your repository, or install
globally with npm install -g.
{
"resolvers": [
"bitbucket-resolver",
"github-enterprise-resolver"
]
}
Tools
 Bower is used together with other tools to integrate with all sorts of
setups and workflows.
 Grunt
 Gulp
 Rails & Ruby
 Java
 Apps & IDEs
 Others
 See more: http://bower.io/docs/tools/
THANK YOU FOR ATTENTION
Oleksii Prohonnyi
facebook.com/oprohonnyi
linkedin.com/in/oprohonnyi

Mais conteúdo relacionado

Mais procurados

Functional Hostnames and Why they are Bad
Functional Hostnames and Why they are BadFunctional Hostnames and Why they are Bad
Functional Hostnames and Why they are BadPuppet
 
Puppet Intfrastructure as Code
Puppet Intfrastructure as CodePuppet Intfrastructure as Code
Puppet Intfrastructure as CodeSamir Chekkal
 
Docker & CoreOS at Utah Gophers
Docker & CoreOS at Utah GophersDocker & CoreOS at Utah Gophers
Docker & CoreOS at Utah GophersJosh Braegger
 
Clojure + MongoDB on Heroku
Clojure + MongoDB on HerokuClojure + MongoDB on Heroku
Clojure + MongoDB on HerokuNaoyuki Kakuda
 
Php Server Var
Php Server VarPhp Server Var
Php Server Vararvind34
 
Heroku Tips and Hacks
Heroku Tips and HacksHeroku Tips and Hacks
Heroku Tips and HacksLuan Nguyen
 
Copying files between linux machines using scp and ssh without linux user pas...
Copying files between linux machines using scp and ssh without linux user pas...Copying files between linux machines using scp and ssh without linux user pas...
Copying files between linux machines using scp and ssh without linux user pas...Ravi Kumar Lanke
 
Puppet barcampexercises.jzt
Puppet barcampexercises.jztPuppet barcampexercises.jzt
Puppet barcampexercises.jztsom_nangia
 
Puppet HackDay/BarCamp New Delhi Exercises
Puppet HackDay/BarCamp New Delhi ExercisesPuppet HackDay/BarCamp New Delhi Exercises
Puppet HackDay/BarCamp New Delhi ExercisesJulie Tsai
 
Hadoop installation steps
Hadoop installation stepsHadoop installation steps
Hadoop installation stepsMayank Sharma
 
Intro KaKao MRTE (MySQL Realtime Traffic Emulator)
Intro KaKao MRTE (MySQL Realtime Traffic Emulator)Intro KaKao MRTE (MySQL Realtime Traffic Emulator)
Intro KaKao MRTE (MySQL Realtime Traffic Emulator)I Goo Lee
 
Using docker for data science - part 2
Using docker for data science - part 2Using docker for data science - part 2
Using docker for data science - part 2Calvin Giles
 
От sysV к systemd
От sysV к systemdОт sysV к systemd
От sysV к systemdDenis Kovalev
 
Using python and docker for data science
Using python and docker for data scienceUsing python and docker for data science
Using python and docker for data scienceCalvin Giles
 
Installing odoo v8 from github
Installing odoo v8 from githubInstalling odoo v8 from github
Installing odoo v8 from githubAntony Gitomeh
 
Sls01 Lecture02 Linux In Practice
Sls01 Lecture02 Linux In PracticeSls01 Lecture02 Linux In Practice
Sls01 Lecture02 Linux In PracticeQasim Khawaja
 

Mais procurados (20)

GuiceCon 2011 - Sisu
GuiceCon 2011 - SisuGuiceCon 2011 - Sisu
GuiceCon 2011 - Sisu
 
Functional Hostnames and Why they are Bad
Functional Hostnames and Why they are BadFunctional Hostnames and Why they are Bad
Functional Hostnames and Why they are Bad
 
Puppet Intfrastructure as Code
Puppet Intfrastructure as CodePuppet Intfrastructure as Code
Puppet Intfrastructure as Code
 
Docker & CoreOS at Utah Gophers
Docker & CoreOS at Utah GophersDocker & CoreOS at Utah Gophers
Docker & CoreOS at Utah Gophers
 
Clojure + MongoDB on Heroku
Clojure + MongoDB on HerokuClojure + MongoDB on Heroku
Clojure + MongoDB on Heroku
 
Php Server Var
Php Server VarPhp Server Var
Php Server Var
 
Heroku Tips and Hacks
Heroku Tips and HacksHeroku Tips and Hacks
Heroku Tips and Hacks
 
Copying files between linux machines using scp and ssh without linux user pas...
Copying files between linux machines using scp and ssh without linux user pas...Copying files between linux machines using scp and ssh without linux user pas...
Copying files between linux machines using scp and ssh without linux user pas...
 
Puppet barcampexercises.jzt
Puppet barcampexercises.jztPuppet barcampexercises.jzt
Puppet barcampexercises.jzt
 
Puppet HackDay/BarCamp New Delhi Exercises
Puppet HackDay/BarCamp New Delhi ExercisesPuppet HackDay/BarCamp New Delhi Exercises
Puppet HackDay/BarCamp New Delhi Exercises
 
Hadoop installation steps
Hadoop installation stepsHadoop installation steps
Hadoop installation steps
 
Intro KaKao MRTE (MySQL Realtime Traffic Emulator)
Intro KaKao MRTE (MySQL Realtime Traffic Emulator)Intro KaKao MRTE (MySQL Realtime Traffic Emulator)
Intro KaKao MRTE (MySQL Realtime Traffic Emulator)
 
Using docker for data science - part 2
Using docker for data science - part 2Using docker for data science - part 2
Using docker for data science - part 2
 
От sysV к systemd
От sysV к systemdОт sysV к systemd
От sysV к systemd
 
Using python and docker for data science
Using python and docker for data scienceUsing python and docker for data science
Using python and docker for data science
 
Bento lunch talk
Bento   lunch talkBento   lunch talk
Bento lunch talk
 
Installing odoo v8 from github
Installing odoo v8 from githubInstalling odoo v8 from github
Installing odoo v8 from github
 
Sls01 Lecture02 Linux In Practice
Sls01 Lecture02 Linux In PracticeSls01 Lecture02 Linux In Practice
Sls01 Lecture02 Linux In Practice
 
Drupal from scratch
Drupal from scratchDrupal from scratch
Drupal from scratch
 
EC CUBE 3.0.x installation guide
EC CUBE 3.0.x installation guideEC CUBE 3.0.x installation guide
EC CUBE 3.0.x installation guide
 

Destaque

Introduction to Gulp
Introduction to GulpIntroduction to Gulp
Introduction to Gulpapdhtg6
 
Bower & bitbucket
Bower & bitbucketBower & bitbucket
Bower & bitbucketnanusefue
 
Dive into Angular, part 3: Performance
Dive into Angular, part 3: PerformanceDive into Angular, part 3: Performance
Dive into Angular, part 3: PerformanceOleksii Prohonnyi
 
Front-end rich JavaScript application creation (Backbone.js)
Front-end rich JavaScript application creation (Backbone.js)Front-end rich JavaScript application creation (Backbone.js)
Front-end rich JavaScript application creation (Backbone.js)Oleksii Prohonnyi
 
Conference DotJS 2015 Paris review
Conference DotJS 2015 Paris reviewConference DotJS 2015 Paris review
Conference DotJS 2015 Paris reviewOleksii Prohonnyi
 
Dive into Angular, part 5: Experience
Dive into Angular, part 5: ExperienceDive into Angular, part 5: Experience
Dive into Angular, part 5: ExperienceOleksii Prohonnyi
 
Как создать сайт за 2 часа? (Wordpress)
Как создать сайт за 2 часа? (Wordpress)Как создать сайт за 2 часа? (Wordpress)
Как создать сайт за 2 часа? (Wordpress)Oleksii Prohonnyi
 
Разработка веб-сайта. Сайт. Зачем он?
Разработка веб-сайта. Сайт. Зачем он?Разработка веб-сайта. Сайт. Зачем он?
Разработка веб-сайта. Сайт. Зачем он?Oleksii Prohonnyi
 
Exploradores.caroes
Exploradores.caroesExploradores.caroes
Exploradores.caroesmaryespitia
 
Chorme devtools
Chorme devtoolsChorme devtools
Chorme devtools傑倫 鍾
 
Utility libraries to make your life easier
Utility libraries to make your life easierUtility libraries to make your life easier
Utility libraries to make your life easierOleksii Prohonnyi
 
D3.JS Tips & Tricks (export to svg, crossfilter, maps etc.)
D3.JS Tips & Tricks (export to svg, crossfilter, maps etc.)D3.JS Tips & Tricks (export to svg, crossfilter, maps etc.)
D3.JS Tips & Tricks (export to svg, crossfilter, maps etc.)Oleksii Prohonnyi
 
Dive into Angular, part 1: Introduction
Dive into Angular, part 1: IntroductionDive into Angular, part 1: Introduction
Dive into Angular, part 1: IntroductionOleksii Prohonnyi
 

Destaque (20)

Grunt and Bower
Grunt and BowerGrunt and Bower
Grunt and Bower
 
Dev2Dev - Microformats
Dev2Dev - MicroformatsDev2Dev - Microformats
Dev2Dev - Microformats
 
Introduction to Gulp
Introduction to GulpIntroduction to Gulp
Introduction to Gulp
 
Intro to Gulp
Intro to GulpIntro to Gulp
Intro to Gulp
 
Bower & bitbucket
Bower & bitbucketBower & bitbucket
Bower & bitbucket
 
Cycle.js overview
Cycle.js overviewCycle.js overview
Cycle.js overview
 
Dive into Angular, part 3: Performance
Dive into Angular, part 3: PerformanceDive into Angular, part 3: Performance
Dive into Angular, part 3: Performance
 
Front-end rich JavaScript application creation (Backbone.js)
Front-end rich JavaScript application creation (Backbone.js)Front-end rich JavaScript application creation (Backbone.js)
Front-end rich JavaScript application creation (Backbone.js)
 
Conference DotJS 2015 Paris review
Conference DotJS 2015 Paris reviewConference DotJS 2015 Paris review
Conference DotJS 2015 Paris review
 
Dive into Angular, part 5: Experience
Dive into Angular, part 5: ExperienceDive into Angular, part 5: Experience
Dive into Angular, part 5: Experience
 
Как создать сайт за 2 часа? (Wordpress)
Как создать сайт за 2 часа? (Wordpress)Как создать сайт за 2 часа? (Wordpress)
Как создать сайт за 2 часа? (Wordpress)
 
Разработка веб-сайта. Сайт. Зачем он?
Разработка веб-сайта. Сайт. Зачем он?Разработка веб-сайта. Сайт. Зачем он?
Разработка веб-сайта. Сайт. Зачем он?
 
Exploradores.caroes
Exploradores.caroesExploradores.caroes
Exploradores.caroes
 
Chorme devtools
Chorme devtoolsChorme devtools
Chorme devtools
 
Asm.js introduction
Asm.js introductionAsm.js introduction
Asm.js introduction
 
Moment.js overview
Moment.js overviewMoment.js overview
Moment.js overview
 
Utility libraries to make your life easier
Utility libraries to make your life easierUtility libraries to make your life easier
Utility libraries to make your life easier
 
D3.JS Tips & Tricks (export to svg, crossfilter, maps etc.)
D3.JS Tips & Tricks (export to svg, crossfilter, maps etc.)D3.JS Tips & Tricks (export to svg, crossfilter, maps etc.)
D3.JS Tips & Tricks (export to svg, crossfilter, maps etc.)
 
OpenLayer's basics
OpenLayer's basicsOpenLayer's basics
OpenLayer's basics
 
Dive into Angular, part 1: Introduction
Dive into Angular, part 1: IntroductionDive into Angular, part 1: Introduction
Dive into Angular, part 1: Introduction
 

Semelhante a Bower introduction

Bower & Grunt - A practical workflow
Bower & Grunt - A practical workflowBower & Grunt - A practical workflow
Bower & Grunt - A practical workflowRiccardo Coppola
 
Angular Part 3 (Basic knowledge)
Angular Part 3 (Basic knowledge)Angular Part 3 (Basic knowledge)
Angular Part 3 (Basic knowledge)Rohit Singh
 
Bower - A package manager for the web
Bower - A package manager for the webBower - A package manager for the web
Bower - A package manager for the webLarry Nung
 
Introduction to bower
Introduction to bowerIntroduction to bower
Introduction to bowerJitendra Zaa
 
Web development - technologies and tools
Web development - technologies and toolsWeb development - technologies and tools
Web development - technologies and toolsYoann Gotthilf
 
Gr8conf EU 2018 - Bring you infrastructure under control with Infrastructor
Gr8conf EU 2018 - Bring you infrastructure under control with InfrastructorGr8conf EU 2018 - Bring you infrastructure under control with Infrastructor
Gr8conf EU 2018 - Bring you infrastructure under control with InfrastructorStanislav Tiurikov
 
Bring your infrastructure under control with Infrastructor
Bring your infrastructure under control with InfrastructorBring your infrastructure under control with Infrastructor
Bring your infrastructure under control with InfrastructorStanislav Tiurikov
 
Dependency management in Magento with Composer
Dependency management in Magento with ComposerDependency management in Magento with Composer
Dependency management in Magento with ComposerManuele Menozzi
 
Improving build solutions dependency management with webpack
Improving build solutions  dependency management with webpackImproving build solutions  dependency management with webpack
Improving build solutions dependency management with webpackNodeXperts
 
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 JavaScriptHoracio Gonzalez
 
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other ToolsCool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other ToolsRyan Weaver
 
Open Source Backup Conference 2014: Workshop bareos introduction, by Philipp ...
Open Source Backup Conference 2014: Workshop bareos introduction, by Philipp ...Open Source Backup Conference 2014: Workshop bareos introduction, by Philipp ...
Open Source Backup Conference 2014: Workshop bareos introduction, by Philipp ...NETWAYS
 
PHP on Heroku: Deploying and Scaling Apps in the Cloud
PHP on Heroku: Deploying and Scaling Apps in the CloudPHP on Heroku: Deploying and Scaling Apps in the Cloud
PHP on Heroku: Deploying and Scaling Apps in the CloudSalesforce Developers
 
Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)HungWei Chiu
 
Tutorial 1: Your First Science App - Araport Developer Workshop
Tutorial 1: Your First Science App - Araport Developer WorkshopTutorial 1: Your First Science App - Araport Developer Workshop
Tutorial 1: Your First Science App - Araport Developer WorkshopVivek Krishnakumar
 
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 JavaScriptHoracio Gonzalez
 

Semelhante a Bower introduction (20)

Bower & Grunt - A practical workflow
Bower & Grunt - A practical workflowBower & Grunt - A practical workflow
Bower & Grunt - A practical workflow
 
Angular Part 3 (Basic knowledge)
Angular Part 3 (Basic knowledge)Angular Part 3 (Basic knowledge)
Angular Part 3 (Basic knowledge)
 
Bower - A package manager for the web
Bower - A package manager for the webBower - A package manager for the web
Bower - A package manager for the web
 
Introduction to bower
Introduction to bowerIntroduction to bower
Introduction to bower
 
Docker in production
Docker in productionDocker in production
Docker in production
 
Web development - technologies and tools
Web development - technologies and toolsWeb development - technologies and tools
Web development - technologies and tools
 
Gr8conf EU 2018 - Bring you infrastructure under control with Infrastructor
Gr8conf EU 2018 - Bring you infrastructure under control with InfrastructorGr8conf EU 2018 - Bring you infrastructure under control with Infrastructor
Gr8conf EU 2018 - Bring you infrastructure under control with Infrastructor
 
Bring your infrastructure under control with Infrastructor
Bring your infrastructure under control with InfrastructorBring your infrastructure under control with Infrastructor
Bring your infrastructure under control with Infrastructor
 
Dependency management in Magento with Composer
Dependency management in Magento with ComposerDependency management in Magento with Composer
Dependency management in Magento with Composer
 
Bower Fundamentals
Bower FundamentalsBower Fundamentals
Bower Fundamentals
 
Improving build solutions dependency management with webpack
Improving build solutions  dependency management with webpackImproving build solutions  dependency management with webpack
Improving build solutions dependency management with webpack
 
Composer
ComposerComposer
Composer
 
Front-end tools
Front-end toolsFront-end tools
Front-end tools
 
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
 
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other ToolsCool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
 
Open Source Backup Conference 2014: Workshop bareos introduction, by Philipp ...
Open Source Backup Conference 2014: Workshop bareos introduction, by Philipp ...Open Source Backup Conference 2014: Workshop bareos introduction, by Philipp ...
Open Source Backup Conference 2014: Workshop bareos introduction, by Philipp ...
 
PHP on Heroku: Deploying and Scaling Apps in the Cloud
PHP on Heroku: Deploying and Scaling Apps in the CloudPHP on Heroku: Deploying and Scaling Apps in the Cloud
PHP on Heroku: Deploying and Scaling Apps in the Cloud
 
Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)
 
Tutorial 1: Your First Science App - Araport Developer Workshop
Tutorial 1: Your First Science App - Araport Developer WorkshopTutorial 1: Your First Science App - Araport Developer Workshop
Tutorial 1: Your First Science App - Araport Developer Workshop
 
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
 

Mais de Oleksii Prohonnyi

Dive into Angular, part 4: Angular 2.0
Dive into Angular, part 4: Angular 2.0Dive into Angular, part 4: Angular 2.0
Dive into Angular, part 4: Angular 2.0Oleksii Prohonnyi
 
Dive into Angular, part 2: Architecture
Dive into Angular, part 2: ArchitectureDive into Angular, part 2: Architecture
Dive into Angular, part 2: ArchitectureOleksii Prohonnyi
 
JavaScript Presentation Frameworks and Libraries
JavaScript Presentation Frameworks and LibrariesJavaScript Presentation Frameworks and Libraries
JavaScript Presentation Frameworks and LibrariesOleksii Prohonnyi
 
Code review process with JetBrains UpSource
Code review process with JetBrains UpSourceCode review process with JetBrains UpSource
Code review process with JetBrains UpSourceOleksii Prohonnyi
 
Google Chrome DevTools features overview
Google Chrome DevTools features overviewGoogle Chrome DevTools features overview
Google Chrome DevTools features overviewOleksii Prohonnyi
 
Front-end development introduction (JavaScript). Part 2
Front-end development introduction (JavaScript). Part 2Front-end development introduction (JavaScript). Part 2
Front-end development introduction (JavaScript). Part 2Oleksii Prohonnyi
 
Front-end development introduction (HTML, CSS). Part 1
Front-end development introduction (HTML, CSS). Part 1Front-end development introduction (HTML, CSS). Part 1
Front-end development introduction (HTML, CSS). Part 1Oleksii Prohonnyi
 
Test-driven development & Behavior-driven development basics
Test-driven development & Behavior-driven development basicsTest-driven development & Behavior-driven development basics
Test-driven development & Behavior-driven development basicsOleksii Prohonnyi
 
JavaScript Coding Guidelines
JavaScript Coding GuidelinesJavaScript Coding Guidelines
JavaScript Coding GuidelinesOleksii Prohonnyi
 
Database Optimization (MySQL)
Database Optimization (MySQL)Database Optimization (MySQL)
Database Optimization (MySQL)Oleksii Prohonnyi
 
Usability of UI Design (motivation, heuristics, tools)
Usability of UI Design (motivation, heuristics, tools)Usability of UI Design (motivation, heuristics, tools)
Usability of UI Design (motivation, heuristics, tools)Oleksii Prohonnyi
 

Mais de Oleksii Prohonnyi (14)

Dive into Angular, part 4: Angular 2.0
Dive into Angular, part 4: Angular 2.0Dive into Angular, part 4: Angular 2.0
Dive into Angular, part 4: Angular 2.0
 
Dive into Angular, part 2: Architecture
Dive into Angular, part 2: ArchitectureDive into Angular, part 2: Architecture
Dive into Angular, part 2: Architecture
 
JavaScript Presentation Frameworks and Libraries
JavaScript Presentation Frameworks and LibrariesJavaScript Presentation Frameworks and Libraries
JavaScript Presentation Frameworks and Libraries
 
Introduction to D3.js
Introduction to D3.jsIntroduction to D3.js
Introduction to D3.js
 
Code review process with JetBrains UpSource
Code review process with JetBrains UpSourceCode review process with JetBrains UpSource
Code review process with JetBrains UpSource
 
Google Chrome DevTools features overview
Google Chrome DevTools features overviewGoogle Chrome DevTools features overview
Google Chrome DevTools features overview
 
BEM methodology overview
BEM methodology overviewBEM methodology overview
BEM methodology overview
 
Front-end development introduction (JavaScript). Part 2
Front-end development introduction (JavaScript). Part 2Front-end development introduction (JavaScript). Part 2
Front-end development introduction (JavaScript). Part 2
 
Front-end development introduction (HTML, CSS). Part 1
Front-end development introduction (HTML, CSS). Part 1Front-end development introduction (HTML, CSS). Part 1
Front-end development introduction (HTML, CSS). Part 1
 
Test-driven development & Behavior-driven development basics
Test-driven development & Behavior-driven development basicsTest-driven development & Behavior-driven development basics
Test-driven development & Behavior-driven development basics
 
JavaScript Coding Guidelines
JavaScript Coding GuidelinesJavaScript Coding Guidelines
JavaScript Coding Guidelines
 
Database Optimization (MySQL)
Database Optimization (MySQL)Database Optimization (MySQL)
Database Optimization (MySQL)
 
PHPCS (PHP Code Sniffer)
PHPCS (PHP Code Sniffer)PHPCS (PHP Code Sniffer)
PHPCS (PHP Code Sniffer)
 
Usability of UI Design (motivation, heuristics, tools)
Usability of UI Design (motivation, heuristics, tools)Usability of UI Design (motivation, heuristics, tools)
Usability of UI Design (motivation, heuristics, tools)
 

Último

UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
How To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROHow To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROmotivationalword821
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 

Último (20)

UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
How To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROHow To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTRO
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 

Bower introduction

  • 3. Bower vs NPM  NPM and Bower are both dependency management tools. But the main difference between both is NPM is used for installing Node.js modules but Bower.js is used for managing front end components like HTML,CSS,JS etc.  Bower, unlike NPM, can have multiple files (e.g. .js, .css, .html, .png, .ttf) which are considered the main file(s). Bower semantically considers these main files, when packaged together, a component.
  • 5. Install Bower  Bower is a command line utility. Install it with npm. $ npm install -g bower  Bower requires node, npm and git.  Latest release: v1.7.6  See more: http://bower.io/
  • 7. Configuration  Packages are defined by a manifest file bower.json. This is similar to Node’s package.json or Ruby’s Gemfile.  Interactively create a bower.json with bower init: $ bower init  Detailed specification of bower.json file can be found in bower/spec repository.
  • 8. Dependencies maintenance  Bower installs packages to bower_components/ by default. $ bower install <package>  Using bower install <package> --save will add <package> to your project’s bower.json dependencies array. $ bower install <package> --save  Similarly, using bower install <package> --save-dev will add <package> to your project’s bower.json devDependencies array. $ bower install <package> --save-dev
  • 9. Dependencies maintenance  A package can be a GitHub shorthand, a Git endpoint, a URL, and more. $ bower install $ bower install jquery $ bower install desandro/masonry $ bower install git://github.com/user/package.git $ bower install http://example.com/script.js
  • 10. Search packages  If you want to check that the asset you want is a Bower package you can do a search: $ bower search <package-name>  Search bower packages using web interface: http://bower.io/search/
  • 11. Use packages  It is recommended to use Bower together with Grunt, RequireJS, Yeoman, and lots of other tools or build own workflow with the API.  It is also possible to use the installed packages directly, like this: <script src=“ bower_components/jquery/dist/jquery.min.js "></script>
  • 12. Register packages  Registering your package allows others to install it with a short name, like bower install <my-package-name>. $ bower register <my-package-name> <git-endpoint>  Now anyone can run bower install <my-package-name>, and get your library installed. The Bower registry does not have authentication or user management at this point in time. It’s on a first come, first served basis.
  • 13. Unregister packages  You can unregister packages with bower unregister.  You first need to authenticate with GitHub with bower login to confirm you are a contributor to the package repo. bower login ? Username: ? Password: bower unregister <package>  You’ll likely want to bower cache clean after your change.
  • 15. Commands list  cache  help  home  info  init  install  link  list  login  lookup  prune  register  search  update  uninstall  unregister  version
  • 16. Programmatic API  Bower provides a powerful, programmatic API. All commands can be accessed through the bower.commands object.  var bower = require('bower'); bower.commands .install(['jquery'], { save: true }, { /* custom config */ }) .on('end', function (installed) { console.log(installed); });
  • 18. .bowerrc file  Bower can be configured using JSON in a .bowerrc file. For example: { "directory": "app/components/", "analytics": false, "timeout": 120000, "registry": { "search": [ "http://localhost:8000", "https://bower.herokuapp.com" ] } }
  • 19. More options  Full .bowerrc file specification could be found: http://bower.io/docs/config/#bowerrc-specification  One can use environment variables in .bowerrc, using the following syntax ${ENV_VAR}. "storage": {"packages":“/path/to/${USER}/packages"}  Bower provides 3 separate hooks that can be used to trigger other automated tools during Bower usage: preinstall, postinstall, preuninstall.
  • 21. Resolvers  For example, resolvers can be used for:  Handling Mercurial or Bazaar repositories  Speeding up checkouts of services like GitLab or Bitbucket  Allowing to use packages from npm or component.io  Proxying downloads through 3rd party service like Artifactory  Implementing custom private registry (hosted on GitHub?)  Adding authentication support for private GitHub Enterprise instances  See more: http://bower.io/docs/pluggable-resolvers/
  • 22. Resolvers usage  Pluggable Resolver is just an npm package that you install as devDependency in the package.json of your repository, or install globally with npm install -g. { "resolvers": [ "bitbucket-resolver", "github-enterprise-resolver" ] }
  • 23. Tools  Bower is used together with other tools to integrate with all sorts of setups and workflows.  Grunt  Gulp  Rails & Ruby  Java  Apps & IDEs  Others  See more: http://bower.io/docs/tools/
  • 24. THANK YOU FOR ATTENTION