Closed andresgutgon closed 11 years ago
Hi Andres,
Are you running on Mac, Windows, or other? I've been having some issues on windows but having trouble tracing it down, since I use mostly Mac.
Also could you provide a log of the output of:
grunt build_gh_pages --verbose
Or whatever you build task is with the verbose option?
Thanks, Peter.
I´m running on Mac OS X 10.8.
After installing and declaring in my project this dependency:
grunt.loadNpmTasks('grunt-shell');
I thing all is working
Ah, okay. I think I should be able to load grunt-shell
conditionally from my task if it's not already loaded.... I'll have to look into it.
Another question. I´m deploying and I´m getting node_modules in my GitHub page. Searching in the plugin I´ve find this:
// get a list of all files in stage and delete everything except for targets, node_modules, cache, temp, and logs
// rm does not delete root level hidden files
'ls | grep -v ^' + options.dist + '$ | grep -v ^node_modules$ | xargs rm -r '
Why copy node_modules ?
Thanks for your help! Your plugin is very helpful
Node_modules should be in the .gitignore of both the branch you are building from and the branch you are building to. If node modules is not excluded for the file deletion (the line you quote), then you would have to run npm install every time after a build.
Node module is created by npm install, so node modules is not necessary to check into git, since it can get quite big, and this is why it should be git ignored.
Thanks! I'll update to this version
Its not working.
After update. I see the grunt.loadNpmTasks('grunt-shell');
in your code. But I don´t have in my node_modules. I don´t know how. But I thing your node module should install grunt-shell
.
If I don´t install manually grunt-shell
i recive this message:
Warning: Task "shell:build_gh_pages_getRef" not found. Use --force to continue.
Why are you including grunt-shell as a peer dependencie and not as dependencie? Can you explain me the difference?
Solved! It was my npm version. I was on 1.1.61
and after update this way:
https://github.com/isaacs/npm/blob/master/doc/cli/faq.md#how-do-i-update-npm
curl https://npmjs.org/install.sh | sh
I understand now that peerDependencies is a recent inclusion in npm to solve dependencies problems in plugin systems like Grunt´s.
So. You should explain in README that it necesary a npm
version greater than 1.1.61
. Now I´m working with 1.1.71
Here an explanation of peerDependencies http://blog.nodejs.org/2013/02/07/peer-dependencies/
Thanks @andresgutgon I updated to require a higher version of Node, but I didn't think about NPM. I'll add it.
Hi, maybe i´m doing wrong. But I´m trying to run your task and the console is telling that: `Warning: Task "shell:build_gh_pages_getRef" not found.``
I've see your dependencies and after install in my proyect this plugin https://github.com/sindresorhus/grunt-shell
your task has run.