廣告

2015年7月23日 星期四

前端開發的套件管理工具 bower | Front-end package manager -Bower


Bower is a front-end package manager built by Twitter. 
Also known as a Package manager for the Web, bower is used in 
modern open source and closed source projects to solve many recurrent issues.


install bower
$npm install -g bower
(need install node.js,git)

常用指令
 install package
  $bower install $package

 show current veresion and latest version 
  $bower list
   ex:
    startbootstrap-sb-admin-2#1.0.7 C:\Users\1409035\git\MartBackStage
    ├─┬ bootstrap#3.3.4 (3.3.5 available)
    │ └── jquery#2.1.3 (3.0.0-alpha1+compat available)
    ├─┬ bootstrap-social#4.8.0 (latest is 4.9.1)
    │ ├── bootstrap#3.3.4 (3.3.5 available)
    │ └── font-awesome#4.2.0 (latest is 4.3.0)
    ├─┬ datatables#1.10.6 (1.10.7 available)
    │ └── jquery#2.1.3 (3.0.0-alpha1+compat available)
    ├── datatables-plugins#1.0.1 (latest is 1.10.7)
    ├─┬ datatables-responsive#1.0.5 (1.0.6 available)
    │ ├── datatables#1.10.6 (1.10.7 available)
    │ └── jquery#2.1.3
    ├─┬ flot#0.8.3
    │ └── jquery#2.1.3 (3.0.0-alpha1+compat available)
    ├── flot.tooltip#0.8.4 (0.8.5 available)
    ├── font-awesome#4.2.0 (latest is 4.3.0)
    ├── holderjs#2.4.1 (latest is 2.8.1)
    ├─┬ jquery-ui#1.11.4 extraneous
    │ └── jquery#2.1.3 (3.0.0-alpha1+compat available)
    ├─┬ metisMenu#1.1.3 (latest is 2.0.2)
    │ └── bootstrap#3.3.4 (3.3.5 available)
    └─┬ morrisjs#0.5.1
      ├── jquery#2.1.3 (3.0.0-alpha1+compat available)
      ├── mocha#1.17.1 (latest is 2.2.5)
      └── raphael#2.1.4

 uninstall package
  $bower uninstall $package
  
 update package
  $bower update $package


conclusion:
In the past, when we want to use the plugin,
must first go to the website to download and 
unzip it to your purpose folder,

And you have to keep track of plug has not been updated,
If so, you have to repeat the action again.

now! use bower, you do not have to worry about this problem.



沒有留言:

張貼留言