- Overview
- Transcript
4.4 Fetch Files With Ease
This next tool that I will demonstrate was commissioned by Nettuts+. It gives you an easy way to instantly pull in new assets into your projects.
1.Introduction1 lesson, 02:05
1.1Welcome02:05
2.Getting Started9 lessons, 35:20
2.1Installation and Base Settings04:54
2.2Services and Opening Sublime From the Terminal02:20
2.3Multiple Cursors and Incremental Search06:54
2.4The Command Palette04:13
2.5Instant File Changing03:19
2.6Symbols04:17
2.7Key Bindings02:33
2.8Installing Plugins Without Package Control02:54
2.9Package Control03:56
3.Snippets3 lessons, 14:40
3.1Your First Snippet09:04
3.2Adding Snippets Through Package Control02:32
3.3Easier Testing With Snippets03:04
4.Essential Plugins12 lessons, 46:58
4.1Zen Coding07:09
4.2Emmet06:52
4.3Cross-Browser CSS With Prefixr02:17
4.4Fetch Files With Ease 04:22
4.5Lightning Fast Folder and File Creation 02:12
4.6Sidebar Enhancements03:09
4.7Sublime Linter02:01
4.8Sexy Code Snippet Management With Gists07:50
4.9DocBlockr03:49
4.10Pretty Task Management02:42
4.11HTTP Requests Within Sublime02:29
4.12LiveReload02:06
5.Tips, Techniques and Modifications8 lessons, 49:09
5.1Regular Expressions in Sublime05:49
5.2Vintage Mode10:46
5.3Quicker Stylesheet References02:30
5.4Joining Lines04:40
5.5Sublime and Markdown with Marked03:10
5.6All About Projects 05:54
5.7Configuring and Mastering Split Windows07:19
5.8Custom Builds09:01
6.Closing1 lesson, 00:49
6.1Conclusion00:49
4.4 Fetch Files With Ease
The next tool that I will demonstrate was also one commissioned by me and Nettuts and that's called Fetch. So my idea behind this, which I commissioned somebody to create for the community was a tool that will allow you to pull in zip files or single files and instantly have them in your project. So think about how many times have you needed to use maybe jQuery and maybe you didn't already have it local. And you couldn't remember what the CDN URL was. So you ended up just going on the web and searching for it or you went to code.jquery.com and that all just takes up time. Wouldn't it be cooler if you could say from within Sublime, hey, Sublime, pull in the latest version of jQuery for me and that's what Fetch does for us. So let's close this out. And within my Sites directory, we'll create a new one called sample. And now I'm going to drag that in to Sublime. But it would also be nice if I could right-click and choose open in Sublime. And I'll show you how to do that in a future lesson. But for now, let's just drag that empty folder in. Now we're going to install the Nettuts Plus Fetch Plugin. Shift+Cmd+P, install. I'm gonna look for nettuts+Fetch. There we go. So this will again, allow us to Fetch single files and zip files. So you could pull an HTML5 boiler plate in four seconds. Let's search for it. We could either go to Sublime > Preferences > Browse Packages and look at the documentation. Or I'm going to bring up Fetch and there we go. We want Manage > Remote Files. So it's separated into two JavaScript objects, files and packages. And he's provided a couple samples for you. So the first one is jQuery. That is the source to the minified version of jQuery as you can see right there. So now we've set up an identifier. So if I close this out, I will create a new file and we're gonna save it as jquery.js. Now rather than opening a web browser, Shift+Cmd+P. We're gonna fetch a single file and we're going to bring in jQuery. And now you have the latest version of jQuery. So you would do this for all of the projects that you work on. For example, I use normalize.css in lots of my projects. So I would go to the GitHub project. Download the latest version. Or why don't we instead do this, let's find it on GitHub. Here we go. Source code on GitHub and then we'll grab that file. View the raw contents and now that should be the master version. And that way if two months from now I fetch this file it will be the most up to date version. So I will copy that link and now once again, Fetch: Manage remove files. I'm gonna bring in a new one for normalize and paste it in like so. All right. And that's all we have to do. So let's create a new file, we'll save it as normalize.css and I'm gonna fetch single file normalize and now we have the absolute latest version of that library. Now in addition to fetching single files, we can also fetch zipped files. So notice here that we can also grab html5_boilerplate. And all you have to do is for the project you want, go to it's GitHub project or reference any zip file link. In this case, he's referencing the zipball/master and that would be if you copied the zip link from the GitHub page. So now I close this out. We're going to fetch a package html5_boilerplate. So now it's going to say, where do you want to extract these files? So why don't we within the sample directory, we'll call it boilerplate. Now it creates a new directory and you have the latest version of the boilerplate and you can go ahead and get started. So cool. Now let's do one last one together. Maybe you are a WordPress user and you want an easier way to start working with WordPress. Well, let's go to WORDPRESS.ORG and I'm gonna click on Download WordPress and this is a zip file so I'm gonna right-click and copy the link address. Now I'm gonna go back to Sublime settings. We're going to add a new one, WordPress and paste that in and we're all done. Close that out, Shift+Cmd+P, fetch a package and I want WordPress and we're gonna download this to blog. Close this out, and now in two seconds, you have the latest version of WordPress. You gotta admit, that is super, super cool.