I have my gulpfile.js
with some tasks and I want to execute one task when I do cordova build
I created a before_build
folder inside of the hooks
folder with a simple console.log("a")
in a js file.
But whe I run for example cordova build android
it says 'console' is undefined
, I have to do something else to run Javascript? I couldn´t find more info.
Thanks!
EDIT:
I added #!/usr/bin/env node
at the top of my .js file and the console.log
works but now I want to do gulp myTask
and is throwing to me gulp is not defined