Sublime Text 2 and Bower
If you're not familar with Bower, it's a package manager and it's awesome so it's on GitHub - https://github.com/twitter/bower.
It’s just got even more awesome thanks to @benschwarz.
Ben has built a plugin that allows you to harness Bower’s power from within Sublime Text 2 /germanforblack.com/post/46734908388/i-built-a-plugin-for-sublime-text-that-integrates (no longer online).
Say you've started up a new project and you need to go get a package or dependency such as jQuery.
You open your browser, go to the jQuery site, download / copy and paste the file and save it to your project. Then you need something else, Modernizr, so you go back to your browser, go to the Modernizr site and repeat the process for everything you need. That's ok, it works, but there's a better way.
You'll need Sublime Package Control, if you don’t have that you can get it here:
https://wbond.net/sublime_packages/package_control
With that installed open Sublime Text 2, then shift + cmd + p
, type install
, select Package Control: Install Package
, type bower
, hit enter to install Bower.
Open up Terminal and run:
1 | npm install bower -g |
If it fails, try running as admin by adding sudo
:
1 | sudo npm install bower -g |
Now with Sublime Text 2 you can do shift + cmd + p
, type bower
, select Bower:Install
hit enter.
Boom! You can now search for whatever you want jQuery, Modernizr etc… hit enter again and it will download it for you.
It also creates a handy JSON file that allows you to easily view what's been installed with Bower and much more.
Browse by category:
- apple1
- bash1
- browser1
- case study4
- chrome2
- chrome dev tools4
- clojure overtone2
- conference2
- css2
- dev tips1
- digihike1
- dotfiles2
- event4
- ffconf1
- freelance6
- gaming2
- health3
- hexo1
- https1
- jank1
- javascript1
- jobs1
- lego1
- mcrfred107
- nux1
- octopress4
- photography2
- raspberry pi1
- responsive web design1
- sass1
- screencast1
- speaking2
- svg4
- unplugged6
- upfrontconf1
- web development2
- webgl1
- wordpress17
- work51
- workflow16