Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I run external gulp tasks? #32

Open
denisz1 opened this issue Dec 4, 2014 · 3 comments
Open

How can I run external gulp tasks? #32

denisz1 opened this issue Dec 4, 2014 · 3 comments

Comments

@denisz1
Copy link

denisz1 commented Dec 4, 2014

Suppose I have a file called foo.js which contains a task called bar. This task is not defined in my main gulp file, as its a common task shared among projects. In my gulpfile.js I'll include it the normal way:

require("./path/to/other/gulp/files/foo.js");

I can run this the normal way: gulp bar.

But the extension won't recognise it, and doesn't show it.

@Bjornej
Copy link
Owner

Bjornej commented Dec 5, 2014

Currently the plugin parses your gruntfile to identify defined grunt tasks but won't parse external files.

I can try to do the same thing I did for grunt: rely on executing directly grunt to identify defined tasks whenever the gulpfile directly references another js file.

To be precise you usually require other gulpfiles by relative path ?

@denisz1
Copy link
Author

denisz1 commented Dec 6, 2014

@Bjornej Yes that seems to be how it works for me. If I use that require command as above, gulp will recognise any tasks defined in there, and I can just execute them on the command line.

@Bjornej
Copy link
Owner

Bjornej commented Dec 9, 2014

Ok, then I'll modify the plugin to use gulp from the command line to identify the available tasks whenever a require with a relative path is found.

To do this I'll need a stronger cache on results but it shouldn't be a problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants