You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a multi-project setup (not unlike the one described in README.md.)
root
Gruntfile.js (with the configuration of grunt-link)
project1
package.json
project2
package.json
main
package.json (depends on project1 and project2)
I want the "best of both worlds"
being able to work with local versions of my projects while i'm developing a feature (publishing them everytime I change a line is not an option)
at some point, publish specific versions of project1 (in my case, because unrelated modules will
also need to depend on it.)
How would I approach that ? Here is what I've tried.
Install published dependencies
publish project1 on a private repository (version 0.0.1)
locally, project1 is at version 0.0.1
locally, main depends on version 0.0.1 of project1 and has a linkDependencies to 'project1'
After 'cd main ; npm install' :
main/node_modules/project1 contains the content of the published version
the "local" version of "project1" is completely ignored.
Link locally to the current local version
publish project1 on a private repository (version 0.0.1)
locally, project1 is at version 0.0.1
locally, main depends on version 0.0.1 of project1 and has a linkDependencies to 'project1'
After grunt link :
main/node_modules/project1 contains the content of the "published" version
main/node_modules/project1/project1 is a symlink to the installed version in lib/modules
(I'm not sure whyà
main is then using the "published" version ; the 'local' version is ignored.
This is probably what makes the most sense.
Depending on "^0.0.1" (anything later than... )
Now, suppose I want to modify something in project1, but I don't wan't to
have to publish it all the times.
I could remove the "regular" dependency in main/package.json, and use grunt link ;
it is a bit cumbersome, and I'm probably going to commit a version of main/package.json
that can not be installed anywhere.
On good faith, I tried specifying "^0.0.1" as a version (basically, it's what I want,
except that my local folder should serve as "some kind of a repository").
publish project1 on a private repository (version 0.0.1)
locally, project1 is at version 0.0.2
locally, main depends on version ^0.0.1 of project1 and has a linkDependencies to 'project1'
After grunt link, my 'local' version of project1 is still ignored.
Would it make sense to patch grunt-link in my case to support this ?
Depending on a local "0.0.2"
I tried bumping the version of my "local" package ; so now :
project1/package.json has version 0.0.2
main/package.json has standard dependency on 0.0.2, and linkDependencies to 'project1'
Here, grunt link fails because 0.0.2 is not available.
So, is there a way to support my use case ?
Thanks
The text was updated successfully, but these errors were encountered:
I have a multi-project setup (not unlike the one described in README.md.)
I want the "best of both worlds"
also need to depend on it.)
How would I approach that ? Here is what I've tried.
Install published dependencies
After 'cd main ; npm install' :
Link locally to the current local version
After
grunt link
:(I'm not sure whyà
main is then using the "published" version ; the 'local' version is ignored.
This is probably what makes the most sense.
Depending on "^0.0.1" (anything later than... )
Now, suppose I want to modify something in project1, but I don't wan't to
have to publish it all the times.
I could remove the "regular" dependency in main/package.json, and use grunt link ;
it is a bit cumbersome, and I'm probably going to commit a version of main/package.json
that can not be installed anywhere.
On good faith, I tried specifying "^0.0.1" as a version (basically, it's what I want,
except that my local folder should serve as "some kind of a repository").
After
grunt link
, my 'local' version of project1 is still ignored.Would it make sense to patch grunt-link in my case to support this ?
Depending on a local "0.0.2"
I tried bumping the version of my "local" package ; so now :
Here,
grunt link
fails because 0.0.2 is not available.So, is there a way to support my use case ?
Thanks
The text was updated successfully, but these errors were encountered: