madskristensen / NpmTaskRunner

Visual Studio extension
Other
88 stars 32 forks source link

Yarn support #39

Closed madskristensen closed 7 years ago

madskristensen commented 7 years ago

When a yarn.lock or .yarnclean file exist in the same directory as package.json, the extension should automatically switch to call the Yarn CLI instead of calling npm

scottaddie commented 7 years ago

@madskristensen Let me know if you're looking for some help with this one. I'd be willing to give it a shot.

madskristensen commented 7 years ago

Please go ahead. I don't have the time to look at this for the next couple of weeks, so any help would be appreciated :)

scottaddie commented 7 years ago

@madskristensen I'm on it

scottaddie commented 7 years ago

@madskristensen I've finished my testing and pushed the changes necessary for Yarn CLI support. Take a look, and let me know what you think.

madskristensen commented 7 years ago

This looks great!! Thanks for taking a stab at this. I'll try it out shortly

madskristensen commented 7 years ago

Dude, this works beautifully. So cool!!!

scottaddie commented 7 years ago

@madskristensen It was a pleasure to work on. Now I can put this to use at work.

madskristensen commented 7 years ago

Very cool

madskristensen commented 7 years ago

The Verbose command flag -d doesn't work with yarn

scottaddie commented 7 years ago

Good catch. What's the best way to get the configPath value from within TaskRunnerProvider.Options? TRX core must be determining that and providing it to methods like TaskRunnerProvider.ParseConfig.

madskristensen commented 7 years ago

Perhaps pass an empty string instead of the -d in the Option. Then in the task execution code we can check if the option is enabled and then append it ourselves

scottaddie commented 7 years ago

It seems like I'd need to hook into something like TaskRunnerNode's Invoke method to append the option. Did you have something else in mind when you said "task execution code"?

madskristensen commented 7 years ago

That's what i meant

scottaddie commented 7 years ago

@madskristensen Pushed the commit. Give it a try now.