-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Remove ignore paths from .json #227
Conversation
in promise hell
sorta kinda cleans it up
Conflicts: lib/core/package.js
add test for removing ignorables
// 1: get paths | ||
async.forEach(removePatterns, function (removePattern, next) { | ||
// glob path for file path pattern matching | ||
glob(path.join(this.localPath, removePattern), function (err, globPaths) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we must enable the dot: true
option so that glob matches the .git
and other files that start with a .
. If it' s not actually removing the .git
folder (wich I think it's not) can you add a test for it?
Looks great @desandro, please review what I've mentioned. |
Good call for both. Added test for .git directory, and made the push.apply change |
@desandro We still have to turn on the
This means that if an user types If you add a test for this, it will probably fail. |
I don't really get the point of asking package creator to "blacklist" unnecessary files. It would be much easier for them to point to the files/directory to be kept. The other way around seems way clearer. Plus, instead of deleting the downloaded files, you could just keep the full repo copy in the cache, then you copy "whitelisted" files over to the project. Also, I think this should be over-writable by the end user. So let's say a user want to get twitter bootstrap, but only the modal module, he could easily just pick the file he needs. |
@SBoudrias I totally get your point. This seems backwards. Especially for us to implement. But using As for user-overwritability of |
Dang, you're good. |
@desandro I know that ahahah :P, joking Thanks! |
Remove ignore paths from .json
For #88, this adds
ignore
property to JSON.This works by deleting and ignored filepaths after the package has been installed.
Tests added. Note added in the README.
I feel pretty good about this, but I'd appreciate @satazor taking a look at the code.