Gulp file automation

I’m guessing you did install gulp the first time but then you closed your terminal or something and you didn’t navigate back to the folder so you had to reinstall…but then that’s useless now because it seems you didn’t install in the sassEssentials folder.

You need to navigate the terminal to the folder where you have the gulpfile. I don’t know how you do this in MinGW, but the command is cd. ie: cd sassEssentials ← but that will not work. You need the actual path directory.

Here is a tutorial:

http://www.mingw.org/wiki/mingw_for_first_time_users_howto

So if you have it stored at the root C:\ directory, then you should type cd C:\sassEssentials. This is the same as the normal Windows cmd prompt or PowerShell.


Before doing this, you should probably install gulp globally by using the command npm install -g gulp. That might be why you thought you had it installed, but didn’t.

Like @mawburn said, you need to navigate to your working folder. Incase his instructions are confusing, this gif might help you. Basically in your terminal type cd, leave as space, then drag sassEssentials folder into the terminal (that converts into the folder’s path)

2 Likes

Yeah Im assuming…Im using Gitbash for Windows

So I was suppose to install Gulp.js in the sassEssentials folder?

ok so I just did over again. This should be right?


oh wait I think its suppose to be /c/Users/csosa/Desktop/sassEssentials

No! what you did there is fine. Now as you can see on line 8, go to localhost:8000 and see the result

Line 10 might be en error, though line 11 seems to says that sass was compiled correctly.

1 Like

So what is wrong?

 'sass' is not recognized as an internal or external command,
operable program or batch file.

Probably means you don’t have sass installed. npm install sass --save

weird ok so I install again using npm install sass --save ?

And did you load localhost:8000 in a browser to see if your site loaded?

yeah that worked.

I got this:

is it installed now?

if that url worked and you saw the styling, then ignore the warning, if it was critical, you would have got an error.

Personally, I have sass installed globally, which is npm install sass -g

That would be a lot more logical in your case, as you are not using the sass package in your code, it’s gulp-rudy-sass that is using sass.

yeah but my problem is that the .css does not update automatically from the .scss

ok is it installed now?

yes it is installed

hmm I still get that error though

Don’t worry about it then. It clearly doesn’t brake the run

dang but its not updating my .css from my .scss…

Like if I change it to expanded it still stays compressed…

gulp.task('sass', function () {
    return sass('process/sass/style.scss', {
      sourcemap: true,
      style: 'expanded'
    })