Skip to content
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

New archi take2 #93

Open
wants to merge 6 commits into
base: devel
Choose a base branch
from
Open

New archi take2 #93

wants to merge 6 commits into from

Conversation

arunoda
Copy link
Owner

@arunoda arunoda commented Feb 14, 2014

@lalomartins I made few changes to the logic and moved all plugins related logic into a separate module. What do you think?

Review on Reviewable

return;
}

pluginsHelper._isPackageExists = function(where, packageName) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, you're just missing the change from my last commit that would make loadPackage much simpler, make sure plug-ins are always up-to-date, and remove the need for _isPackageExists() entirely.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking this way. Don't check the installation all the times, but do it only when passed an option. Hope this install command does some network activity.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Npm is pretty clever… on my devel I tried it my way, and if there's nothing to update, you don't even notice it's running.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(except it complains that there's no README.md and there doesn't seem to be a way to shut that up 😼 but speed-wise it's pretty invisible)

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay. if so that's nice. I'll update it.

}
}

var needNpmInstall = options.argv.npmInstall;
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lalomartins see: we can force install with -N(--need-install) option. I think this is a better approach.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just don't think it's necessary. It puts extra demand on the user/developer for no benefit, since the npm run is invisibly fast.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know(I tried). the issue comes when he uses a github repo or a tarball as the dependancy.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm. That's a bit of a corner case… then by the design principle of “unbreak my app” (a.k.a. sane default), I'd say it's better to always update unless an option tells us not to. Then of course if you need to use dependencies that make things slow, you can put that option in your config file.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay. good idea. I'll do it.

process.chdir(testsPath);
npm.load({verbose: process.argv.verbose}, function(error, Npm) {
//a hack to hide warnning
Npm.registry.log.warn = function() {};
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lalomartins a hack to remove warn messages. I hope I can merge this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants