[
https://issues.apache.org/jira/browse/CB-8551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14345632#comment-14345632
]
ASF GitHub Bot commented on CB-8551:
------------------------------------
Github user stevengill commented on a diff in the pull request:
https://github.com/apache/cordova-lib/pull/175#discussion_r25720721
--- Diff: cordova-lib/src/plugman/registry/registry.js ---
@@ -218,10 +205,18 @@ module.exports = {
/**
* @method initSettings
+ * @param {Boolean} using npm registry
* @return {Promise.<Object>} Promised settings.
*/
-function initSettings() {
+function initSettings(npm) {
var settings = module.exports.settings;
+ var registryURL = 'http://registry.cordova.io';
+
+ //if npm is true, use npm registry
+ if(npm) {
+ registryURL = 'http://registry.npmjs.org';
+ }
+
--- End diff --
TBH, I prefer `if(npm) {...}` to `?`. I think it is just easier to read and
leaves us open to add other changes if we realize we need to. If I am unaware
of some performance boost or something, please let me know.
> Setup fetching from npm as fallback
> -----------------------------------
>
> Key: CB-8551
> URL: https://issues.apache.org/jira/browse/CB-8551
> Project: Apache Cordova
> Issue Type: Bug
> Components: CordovaLib
> Reporter: Steve Gill
> Assignee: Steve Gill
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]