Run Gulp Task in Codekit Hook

684 views Asked by At

I'm trying to run a Gulp task as a Codekit Hook after compiling JS files.

I've created a new Hook and put in the following command:

cd /path/to/my/web/project/
gulp default

I just want to run a gulp task everytime Codekit has compiled my JS files. But nothing happens. What i'm doing wrong?

If i run that task in the terminal, everything is fine.

Thanks for any help.

1

There are 1 answers

2
captainh2ok On

My solution was to make a Shell Script and link directly to it in the Codekit Hook:

E.g.:

./rungulptasks.sh

Inside the "rungulptasks.sh" file I put a direct link to the local gulp bin:

node_modules/.bin/gulp

Now it works. Solved.

P.S Don't forget to make the script executable.