Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Gulp Basics Welcome to Gulp.js Your First Gulp Task

Adding new file to sublime in terminal

How did you do that where you add the new file with 'subl gulpfile.js'?

4 Answers

faraz
PLUS
faraz
Courses Plus Student 21,474 Points

If you followed the instructions here: https://gist.github.com/olivierlacan/1195304 then the command installed is sublime and not subl. So try running sublime . and it should open Sublime Text in the current directory.

rtprjct
rtprjct
30,548 Points

this isn't quite the answer you're looking for, BUT you can also use the command "touch"

touch gulpfile.js

Andrew Corcoran
Andrew Corcoran
20,552 Points

Hi Gavin,

Take a look here for the answer: https://teamtreehouse.com/forum/create-sublime-files-from-terminal-how-did-you-do-it

The subl command should be available out of the box with Sublime Text. Just go to the folder you want to create the file in Terminal, and run: subl newfile.js

This will open Sublime Text with a new buffer under the name newfile.js. It won't actually save the file until you save in Sublime Text (⌘ + S or File -> Save).

Tony Brackins
Tony Brackins
28,766 Points

Hey Andrew Corcoran That actually didn't work. I'm receiving:

error: -bash: subl: command not found