Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E21C8200AE3 for ; Wed, 4 May 2016 21:37:51 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E0B2E1609FC; Wed, 4 May 2016 19:37:51 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 348881609A1 for ; Wed, 4 May 2016 21:37:51 +0200 (CEST) Received: (qmail 37845 invoked by uid 500); 4 May 2016 19:37:50 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 37834 invoked by uid 99); 4 May 2016 19:37:50 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 May 2016 19:37:50 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id EA5E6DFDD0; Wed, 4 May 2016 19:37:49 +0000 (UTC) From: stevengill To: dev@cordova.apache.org Reply-To: dev@cordova.apache.org References: In-Reply-To: Subject: [GitHub] cordova-lib pull request: CB-9858 Cordova Fetch Work Content-Type: text/plain Message-Id: <20160504193749.EA5E6DFDD0@git1-us-west.apache.org> Date: Wed, 4 May 2016 19:37:49 +0000 (UTC) archived-at: Wed, 04 May 2016 19:37:52 -0000 Github user stevengill commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/407#discussion_r62100822 --- Diff: cordova-fetch/index.js --- @@ -0,0 +1,234 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + 'License'); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +var Q = require('q'); +var shell = require('shelljs'); +var superspawn = require('cordova-common').superspawn; +var events = require('cordova-common').events; +var depls = require('dependency-ls'); +var path = require('path'); +var fs = require('fs'); +var CordovaError = require('cordova-common').CordovaError; +var isUrl = require('is-url'); + +/* + * A function that npm installs a module from npm or a git url + * + * @param {String} target the packageID or git url + * @param {String} dest destination of where to install the module + * @param {Object} opts [opts={save:true}] options to pass to fetch module + * + * @return {String||Promise} Returns string of the absolute path to the installed module. + * + */ +module.exports = function(target, dest, opts) { + var fetchArgs = ['install']; + opts = opts || {}; + var tree1; + + //check if npm is installed + isNpmInstalled(); --- End diff -- Your right. I originally has it connected to the promise change but removed it during a refactor. I'll fix this! --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org For additional commands, e-mail: dev-help@cordova.apache.org