Blacklite / Ncapsulate

NuGet and MSBuild wrappers around various Node based tools.
MIT License
29 stars 9 forks source link

Ncapsulate.Grunt has an incorrect path for node command #2

Closed munkyjunky closed 10 years ago

munkyjunky commented 10 years ago

After installing Ncapsulate.Grunt from Nuget, which installed Ncapsulate.Grunt 0.4.4.3 & Ncapsulate.Node 0.10.26, the grunt.cmd file references /nodejs/node, which does not exist.

I fixed this locally by altering grunt.cmd to:

@echo off
node .\packages\Ncapsulate.Grunt.0.4.4.3\nodejs\node_modules\grunt-cli\bin\grunt --no-color %*
@echo on
david-driscoll commented 10 years ago

It should be referencing back to the version of node in the packages directory, this way node itself doe snot have to be installed on the developer machine.

I'll take a look, as it why it might be breaking. Between updating, I have run into issues where the bat file does not get updated properly by the powershell script, so it may be in there.

On Mon, May 12, 2014 at 12:04 PM, munkyjunky notifications@github.comwrote:

After installing Ncapsulate.Grunt from Nuget, which installed Ncapsulate.Grunt 0.4.4.3 & Ncapsulate.Node 0.10.26, the grunt.cmd file references /nodejs/node, which does not exist.

I fixed this locally by altering grunt.cmd to:

@echo off node .\packages\Ncapsulate.Grunt.0.4.4.3\nodejs\node_modules\grunt-cli\bin\grunt --no-color %* @echo on

— Reply to this email directly or view it on GitHubhttps://github.com/Blacklite/Ncapsulate/issues/2 .

munkyjunky commented 10 years ago

I've also been having issues where no commands in grunt.targets are being run. That could potentially be a configuration issue on my machine, or may be an installation problem with the package?

david-driscoll commented 10 years ago

Sorry I've been unable to get to this until now, been fairly busy.

I've been contemplating removing the .cmd files from the content area of the nupkg. It seems the concurrent access is causing issues when installing, updating and uninstalling. I've run into this myself now as well.

The one concern I have is that then the .cmd files will have to be manually added to source control, which for something like Git isn't all that bad with the VS Tools for Git, but something like TFS it could be easy to forget to add them.

I suppose I could add a readme.txt that pops up and informs the user about what they need to do. Does that sound viable?

david-driscoll commented 10 years ago

I've put the change in discussed above, let me know if solves your issue. In local testing, it appears to solve the problem, but I'll keep this open for a little while to make sure it does indeed solve it.

munkyjunky commented 10 years ago

That seems to have fixed that issue. I can run the grunt command and it's working as expected (from the command line). It's a bit annoying to have to manually include those files in source control, but functionally it seems to work, bar the below.

1) Ncapsulate.Grunt marks Ncapsulate.Node v0.10.26 as a dependancy, but if you install Ncapsulate.Node (v 0.10.28) through Nuget it removed the older 0.10.26 and broke the package as 0.10.26 path in /packages no longer exists. If you just install Ncapsulate.Grunt, it's fine.

2) Nothing in grunt,targets seems to work (never has for me, thought it may be related) - I'll open a separate issue for this though.