WebStorm Bower Fundamentals Flashcards

1
Q

What is Bower

A

A package installer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

From where does Bower download its packages?

A

GitHub.com (or another git endpoint)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the command for installing bower globally?

A

npm install bower -g

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What technologies do we need installed on our system to install bower?

A

Node.j’s

MSysGit/Git for Windows

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which files can we add to control configuration of bower in our local project?

A

bower.json

.bowerrc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What configuration options are available for bower from within the .bowerrc file?

A

directory - the directory where packages will be added.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the command for installing a bower package

A

bower install [package-name]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do we install a specific version of a package

A

bower install [package-name]#[version]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How do we get information about what versions of a package are available

A

bower info [package-name]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How can we make sure that all packages are up to date

A

bower update

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How do we update just one packages

A

bower install [package-name]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How can we check which packages are installed?

A

bower list

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How can we check what packages are available

A

bower search [search-term]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the bower homepage?

A

http://bower.io

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the bower search page?

A

http://bower.io/search

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the purpose of the bower.json file?

A
  1. Helps to keep track of the packages that have been installed into your project.
  2. When you are going to publish your own library that can be installed by others.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Which bower.json property tells us the package name?

A

“name”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Which bower.json property tells us the package version?

A

“version”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Which bower.json property tells us the file that is the main entry point for the package

A

“main”

20
Q

Which bower.json property tells us about licence information?

A

“license”

21
Q

How do we tell bower which files to ignore when the package is installed?

A

The “ignore” property in the bower.json file (a string array).

22
Q

Which properties are available to us in the bower.json file?

A
name (string), 
version (string), 
main (string or array of string), 
license (string), 
ignore (array of string), 
devDependencies (object containing properties that have a key of the package name and a value of the version of that package), 
keywords (array of string), 
dependencies (as devDependencies), 
homepage (string), 
moduleType (string)
23
Q

What is the command for creating a bower.json file?

A

bower init

24
Q

If bower is used, do we need to check in packages?

A

No!

25
Q

What is the command for installing dependent packages that are defined in the bower.json file?

A

bower install

26
Q

How do we ensure that the bower.json file is updated when we install a new package?

A

bower install [package-name] –save

27
Q

How do we ensure that the bower.json file is updated with dev dependencies when a new package is saved

A

bower install [package-name] –save-dev

28
Q

How do we ensure that a package dependency in bower.json is updated when we uninstall it?

A

bower uninstall [package-name] –save

29
Q

What is Bower Cache

A

A mechanism by which bower can locally cache packages that have already been downloaded so that it does not need to re-download them.

30
Q

How can we see what is in the bower cache

A

bower cache list

31
Q

How can we remove all items from the cache

A

bower cache clean

32
Q

How can we prevent bower from reaching out to the online registry when installing a package

A

bower install [package-name] -o

33
Q

If the package is cached, what effect does the -o flag have when installing a package?`

A

It prevents it from checking the version against the remote repository

34
Q

How can we force bower to install the files from a local git repo?

A

bower install [directory-name]

35
Q

How do we uninstall the files that have been added from a local repo?

A

bower uninstall [directory-name]

36
Q

How do we install a single file from a specific url?

A

bower install [url]

37
Q

How do we install only the dependencies (not the devDependencies) from bower.json?

A

bower install [package-name] –production

38
Q

How can we install a package into a specifically named directory (i.e. overriding the default name)?

A

bower install [directory-name]=[package-name]

39
Q

How do we get help for bower

A

bower help

40
Q

How do we get help for a specific command in bower

A

bower help [command-name]

41
Q

How do we get the git location for a specific package?

A

bower lookup [package-name]

42
Q

How do we uninstall any packages that are not listed in bower.json as a dependency and which are also not a dependency of a dependent package?

A

bower prune

43
Q

How do we reduce the output when installing a package

A

bower install [package-name] -q

44
Q

How do we pipe output from an install to a json file?

A

bower install [package-name] -j > [file-name.json]

45
Q

What is the verbose option for output

A

-V

46
Q

What is the silent option for output

A

-s

47
Q

After pushing to GitHub how do we register our package with bower?

A

bower register [package-name] [url-to-git-repo]