-
Notifications
You must be signed in to change notification settings - Fork 32
Prefer packages from package.json #12
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
Comments
+1 |
I think that's too much for # .git/hooks/post-checkout
prevHEAD=$1
newHEAD=$2
checkoutType=$3
[[ $checkoutType == 1 ]] && checkoutType='branch' || checkoutType='file';
if [[ $checkoutType == 'branch' ]]
then
rm -rf node_modules
npm install
fi For more on git hooks, see http://stackoverflow.com/a/20892987/3150057 |
This would take too long, I want to be able to switch between branches quickly. Why is it too much to assume? This is only about the order in which packages are checked. |
Or you could create a static mapping: But perhaps you're right: |
I think this is rare case. Please use static mapping,
I think |
Not necessarily. If I work on switching one of the plugins to a different one or do any other small changes, almost all dependencies will stay the same. This is exactly my use case. Besides, if you are used to just doing |
@mzgol I think the main point here is that your development environment should match the branch you're working on. In your case, having An alternative solution is to add |
@mzgol I wrote a "rare case", but was means "exceptional case".
Has become a problem only that the require('jit-grunt')(grunt, {
sass: 'grunt-sass'
}); Or PR please. I will merging if that is fast enough and simple. |
I think a PR fix for this will cause more problems, e.g. what about tasks that aren't listed in |
@henrahmagix Yes, of course. Resolution of that point is also a condition of the merge. |
👍 =D |
Please read my report again. I explicitly stated that in the absence of the package in package.json the code should fallback to the current lookup algorithm. I'll submit a PR soon. |
Oh yeah, sorry about that =) |
I had the exact same need, but ended up moving the |
Closing due to inactivity. |
Currently jit-grunt first checks for
grunt-contrib-package
and then forgrunt-package
in thenode_modules
directory. I have a branch in my project switching fromgrunt-contrib-sass
togrunt-sass
. When I switch between branches I don't want or need to delete the other version as normally it's not loaded/used etc. However, jit-grunt first checks forgrunt-contrib-sass
, executes it & breaks because my config on this branch is targeted atgrunt-sass
.jit-grunt
should first check packages declared in package.json and only if no matching ones are found it should fall back to checking all packages present innode_modules
.The text was updated successfully, but these errors were encountered: