Bower是网络的捆绑管理员,并提供了用于完成入口包装管理中缺点的常规技术。它基本上维护和监视所有软件包并检查新更新。Bower还利用一个名为bower.Json的生成文件来跟踪应用程序。本文介绍-“如何在Ubuntu上安装Bower”。
要安装bower,我们需要预安装Node.js和NPM。要验证node.js版本,请使用以下命令-
$ node -v
样本输出应如下所示:
v6.9.2
要验证NPM版本,请使用以下命令
$ npm -v
样本输出应如下所示:
3.10.9
如果要安装Node.js和NPM,请阅读此文章
要安装凉亭,请使用以下命令–
$ sudo npm install -g bower
样本输出应如下所示–
/usr/bin/bower -> /usr/lib/node_modules/bower/bin/bower /usr/lib `-- bower@1.8.0
要获取有关凉亭的更多信息,请使用以下命令–
Usage: bower [] [] Commands: cache Manage bower cache help Display help information about Bower home Opens a package homepage into your favorite browser info Info of a particular package init Interactively create a bower.json file install Install a package locally link Symlink a package folder list List local packages - and possible updates login Authenticate with GitHub and store credentials lookup Look up a single package URL by name prune Removes local extraneous packages register Register a package search Search for packages by name update Update a local package uninstall Remove a local package unregister Remove a package from the registry version Bump a package version Options: -f, --force Makes various commands more forceful -j, --json Output consumable JSON -l, --loglevel What level of logs to report -o, --offline Do not hit the network -q, --quiet Only output important information -s, --silent Do not output anything, besides errors -V, --verbose Makes output more verbose --allow-root Allows running commands as root -v, --version Output Bower version --no-color Disable colors See 'bower help ' for more information on a specific command.
要安装带有凉亭的引导程序,请使用以下命令–
$ bower install git://github.com/twbs/bootstrap
样本输出应如下所示–
bower not-cached git://github.com/twbs/bootstrap.git#* bower resolve git://github.com/twbs/bootstrap.git#* bower download https://github.com/twbs/bootstrap/archive/v3.3.7.tar.gzbower progress bootstrap#* received 0.1MB of 4.0MB downloaded, 3% bower progress bootstrap#* received 0.2MB of 4.0MB downloaded, 4% bower progress bootstrap#* received 0.2MB of 4.0MB downloaded, 4% bower progress bootstrap#* received 0.2MB of 4.0MB downloaded, 5% bower progress bootstrap#* received 0.2MB of 4.0MB downloaded, 5% bower progress bootstrap#* received 0.2MB of 4.0MB downloaded, 6% bower progress bootstrap#* received 0.3MB of 4.0MB downloaded, 6% bower progress bootstrap#* received 0.3MB of 4.0MB downloaded, 7% .....................................................................
在阅读完本文之后,您将能够了解如何在Ubuntu上安装Bower。在我们的下一篇文章中,我们将提出更多基于Linux的技巧。继续阅读!