npm で Bower をインストールする


Bower は Twitter 社が作ったフロントエンド用のパッケージマネージャです。
Node.jsgit が必要です。

インストールする

$ npm install -g bower
/usr/local/bin/bower -> /usr/local/lib/node_modules/bower/bin/bower
bower@1.3.12 /usr/local/lib/node_modules/bower
├── is-root@1.0.0
├── junk@1.0.1
├── stringify-object@1.0.1
├── which@1.0.9
├── abbrev@1.0.5
├── chmodr@0.1.0
├── osenv@0.1.0
├── archy@0.0.2
├── opn@1.0.1
├── rimraf@2.2.8
├── bower-logger@0.2.2
├── lru-cache@2.5.0
├── bower-endpoint-parser@0.2.2
├── graceful-fs@3.0.5
├── lockfile@1.0.0
├── nopt@3.0.1
├── retry@0.6.0
├── tmp@0.0.23
├── q@1.0.1
├── request-progress@0.3.0 (throttleit@0.0.2)
├── chalk@0.5.0 (ansi-styles@1.1.0, escape-string-regexp@1.0.3, supports-color@0.2.0, has-ansi@0.1.0, strip-ansi@0.3.0)
├── shell-quote@1.4.2 (array-filter@0.0.1, array-reduce@0.0.0, array-map@0.0.0, jsonify@0.0.0)
├── bower-json@0.4.0 (intersect@0.0.3, deep-extend@0.2.11, graceful-fs@2.0.3)
├── semver@2.3.2
├── fstream@1.0.4 (inherits@2.0.1)
├── p-throttler@0.1.0 (q@0.9.7)
├── mkdirp@0.5.0 (minimist@0.0.8)
├── promptly@0.2.0 (read@1.0.5)
├── bower-config@0.5.2 (osenv@0.0.3, graceful-fs@2.0.3, optimist@0.6.1)
├── fstream-ignore@1.0.2 (inherits@2.0.1, minimatch@2.0.1)
├── tar-fs@0.5.2 (pump@0.3.5, tar-stream@0.4.7)
├── decompress-zip@0.0.8 (nopt@2.2.1, mkpath@0.1.0, touch@0.0.2, readable-stream@1.1.13, binary@0.3.0)
├── glob@4.0.6 (inherits@2.0.1, once@1.3.1, minimatch@1.0.0)
├── request@2.42.0 (caseless@0.6.0, json-stringify-safe@5.0.0, forever-agent@0.5.2, aws-sign2@0.5.0, stringstream@0.0.4, oauth-sign@0.4.0, tunnel-agent@0.4.0, qs@1.2.2, node-uuid@1.4.3, mime-types@1.0.2, form-data@0.1.4, bl@0.9.4, http-signature@0.10.1, tough-cookie@0.12.1, hawk@1.1.1)
├── bower-registry-client@0.2.4 (graceful-fs@2.0.3, request-replay@0.2.0, lru-cache@2.3.1, async@0.2.10, mkdirp@0.3.5, request@2.51.0)
├── cardinal@0.4.0 (redeyed@0.4.4)
├── mout@0.9.1
├── update-notifier@0.2.0 (semver-diff@0.1.0, string-length@0.1.2, latest-version@0.2.0, configstore@0.3.2)
├── handlebars@2.0.0 (optimist@0.3.7, uglify-js@2.3.6)
├── inquirer@0.7.1 (figures@1.3.5, mute-stream@0.0.4, through@2.3.6, readline2@0.1.1, lodash@2.4.1, cli-color@0.3.2, rx@2.4.1)
└── insight@0.4.3 (object-assign@1.0.0, chalk@0.5.1, async@0.9.0, os-name@1.0.3, lodash.debounce@2.4.1, tough-cookie@0.12.1, configstore@0.3.2, inquirer@0.6.0)

パスとバージョンを確認する

$ which bower
/usr/local/bin/bower
$ bower -v
1.3.12

bower で jquery をインストールする

$ bower install jquery
bower cached        git://github.com/jquery/jquery.git#2.1.3
bower validate      2.1.3 against git://github.com/jquery/jquery.git#*

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です