Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-13303

cordova fetch should use --production flag by default

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: cordova-fetch

      Description

      This should speed up cordova-fetch. When installing platforms and plugins, run npm install --production under the hood so we don't fetch dev dependencies.

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/cordova-lib/pull/596

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/cordova-lib/pull/596
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 4edc080750cc715585a5570b6a0d4da7a13bc3c7 in cordova-lib's branch refs/heads/master from Audrey So
          [ https://git-wip-us.apache.org/repos/asf?p=cordova-lib.git;h=4edc080 ]

          CB-13303 : added save_exact and production opts

          This closes #596

          Show
          jira-bot ASF subversion and git services added a comment - Commit 4edc080750cc715585a5570b6a0d4da7a13bc3c7 in cordova-lib's branch refs/heads/master from Audrey So [ https://git-wip-us.apache.org/repos/asf?p=cordova-lib.git;h=4edc080 ] CB-13303 : added save_exact and production opts This closes #596
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/cordova-cli/pull/287

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/cordova-cli/pull/287
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit b876e6b20bc1648347921dd27c909a6c7de05cc8 in cordova-cli's branch refs/heads/master from Audrey So
          [ https://git-wip-us.apache.org/repos/asf?p=cordova-cli.git;h=b876e6b ]

          CB-13303 : added noprod/production as an option, no prod turns off production

          This closes #287

          Show
          jira-bot ASF subversion and git services added a comment - Commit b876e6b20bc1648347921dd27c909a6c7de05cc8 in cordova-cli's branch refs/heads/master from Audrey So [ https://git-wip-us.apache.org/repos/asf?p=cordova-cli.git;h=b876e6b ] CB-13303 : added noprod/production as an option, no prod turns off production This closes #287
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 64287eeac998a94ebf1d032700db05ae0bb891d4 in cordova-fetch's branch refs/heads/master from Audrey So
          [ https://git-wip-us.apache.org/repos/asf?p=cordova-fetch.git;h=64287ee ]

          CB-13303 : updating opts.production

          This closes #6

          Show
          jira-bot ASF subversion and git services added a comment - Commit 64287eeac998a94ebf1d032700db05ae0bb891d4 in cordova-fetch's branch refs/heads/master from Audrey So [ https://git-wip-us.apache.org/repos/asf?p=cordova-fetch.git;h=64287ee ] CB-13303 : updating opts.production This closes #6
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user audreyso opened a pull request:

          https://github.com/apache/cordova-lib/pull/596

          CB-13303 : added save_exact and production opts

          <!--
          Please make sure the checklist boxes are all checked before submitting the PR. The checklist
          is intended as a quick reference, for complete details please see our Contributor Guidelines:

          http://cordova.apache.org/contribute/contribute_guidelines.html

          Thanks!
          -->

              1. Platforms affected
              1. What does this PR do?

          Added save-exact and production opts

              1. What testing has been done on this change?
              1. Checklist
          • [X] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database
          • [X] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
          • [X] Added automated test coverage as appropriate for this change.

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/audreyso/cordova-lib CB-13303

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/cordova-lib/pull/596.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #596


          commit cdcfb60d3b5172c2c52ac7afe72e43610068af05
          Author: Audrey So <audreyso@apache.org>
          Date: 2017-10-03T22:57:52Z

          CB-13303 : added save_exact and production opts


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user audreyso opened a pull request: https://github.com/apache/cordova-lib/pull/596 CB-13303 : added save_exact and production opts <!-- Please make sure the checklist boxes are all checked before submitting the PR. The checklist is intended as a quick reference, for complete details please see our Contributor Guidelines: http://cordova.apache.org/contribute/contribute_guidelines.html Thanks! --> Platforms affected What does this PR do? Added save-exact and production opts What testing has been done on this change? Checklist [X] [Reported an issue] ( http://cordova.apache.org/contribute/issues.html ) in the JIRA database [X] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected. [X] Added automated test coverage as appropriate for this change. You can merge this pull request into a Git repository by running: $ git pull https://github.com/audreyso/cordova-lib CB-13303 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-lib/pull/596.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #596 commit cdcfb60d3b5172c2c52ac7afe72e43610068af05 Author: Audrey So <audreyso@apache.org> Date: 2017-10-03T22:57:52Z CB-13303 : added save_exact and production opts
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user stevengill commented on a diff in the pull request:

          https://github.com/apache/cordova-cli/pull/287#discussion_r142530184

          — Diff: src/cli.js —
          @@ -475,8 +491,11 @@ function cli (inputArgs) {
          link: args.link || false,
          save: args.save,
          shrinkwrap: args.shrinkwrap || false,

          • force: args.force || false
            + force: args.force || false,
            + production: args.production,
            + noprod: args.noprod || false
              • End diff –

          no need to pass noprod, it is only used to figure out production. Which you do on L454

          Show
          githubbot ASF GitHub Bot added a comment - Github user stevengill commented on a diff in the pull request: https://github.com/apache/cordova-cli/pull/287#discussion_r142530184 — Diff: src/cli.js — @@ -475,8 +491,11 @@ function cli (inputArgs) { link: args.link || false, save: args.save, shrinkwrap: args.shrinkwrap || false, force: args.force || false + force: args.force || false, + production: args.production, + noprod: args.noprod || false End diff – no need to pass noprod, it is only used to figure out production. Which you do on L454
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user stevengill commented on a diff in the pull request:

          https://github.com/apache/cordova-cli/pull/287#discussion_r142529980

          — Diff: src/cli.js —
          @@ -465,6 +473,14 @@ function cli (inputArgs)

          { // User explicitly did not pass in searchpath args.searchpath = conf.get('searchpath'); }

          + if (args.production === undefined)

          { + // User explicitly did not pass in noprod + args.production = conf.get('production'); + }

          + if (args.noprod === undefined) {
          — End diff –

          lets not offer `noprod` in config. Just `args.production`. We only need noprod like you have in line 454. Used to figure out of args.production is true or false.

          Show
          githubbot ASF GitHub Bot added a comment - Github user stevengill commented on a diff in the pull request: https://github.com/apache/cordova-cli/pull/287#discussion_r142529980 — Diff: src/cli.js — @@ -465,6 +473,14 @@ function cli (inputArgs) { // User explicitly did not pass in searchpath args.searchpath = conf.get('searchpath'); } + if (args.production === undefined) { + // User explicitly did not pass in noprod + args.production = conf.get('production'); + } + if (args.noprod === undefined) { — End diff – lets not offer `noprod` in config. Just `args.production`. We only need noprod like you have in line 454. Used to figure out of args.production is true or false.
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user audreyso opened a pull request:

          https://github.com/apache/cordova-cli/pull/287

          CB-13303 : added noprod/production as an option, no prod turns off pr…

          …oduction

          <!--
          Please make sure the checklist boxes are all checked before submitting the PR. The checklist
          is intended as a quick reference, for complete details please see our Contributor Guidelines:

          http://cordova.apache.org/contribute/contribute_guidelines.html

          Thanks!
          -->

              1. Platforms affected
              1. What does this PR do?
                Added noprod/production as an option
              1. What testing has been done on this change?
              1. Checklist
          • [X] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database
          • [X] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
          • [X] Added automated test coverage as appropriate for this change.

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/audreyso/cordova-cli CB-13303

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/cordova-cli/pull/287.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #287


          commit 145c1e6acc9152e39aeb3d2ebae5a1d4d5843e43
          Author: Audrey So <audreyso@apache.org>
          Date: 2017-10-03T21:14:18Z

          CB-13303 : added noprod/production as an option, no prod turns off production


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user audreyso opened a pull request: https://github.com/apache/cordova-cli/pull/287 CB-13303 : added noprod/production as an option, no prod turns off pr… …oduction <!-- Please make sure the checklist boxes are all checked before submitting the PR. The checklist is intended as a quick reference, for complete details please see our Contributor Guidelines: http://cordova.apache.org/contribute/contribute_guidelines.html Thanks! --> Platforms affected What does this PR do? Added noprod/production as an option What testing has been done on this change? Checklist [X] [Reported an issue] ( http://cordova.apache.org/contribute/issues.html ) in the JIRA database [X] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected. [X] Added automated test coverage as appropriate for this change. You can merge this pull request into a Git repository by running: $ git pull https://github.com/audreyso/cordova-cli CB-13303 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-cli/pull/287.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #287 commit 145c1e6acc9152e39aeb3d2ebae5a1d4d5843e43 Author: Audrey So <audreyso@apache.org> Date: 2017-10-03T21:14:18Z CB-13303 : added noprod/production as an option, no prod turns off production
          Hide
          auso Audrey So added a comment -

          This has been merged in.
          Next step:
          Provide the option to turn the production flag on and off.
          Should I create a new issue for this or is it okay to add it in under the same issue number?

          Show
          auso Audrey So added a comment - This has been merged in. Next step: Provide the option to turn the production flag on and off. Should I create a new issue for this or is it okay to add it in under the same issue number?
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 086ca2999d1e2bd9a08b057e90d973269f094736 in cordova-fetch's branch refs/heads/master from Audrey So
          [ https://git-wip-us.apache.org/repos/asf?p=cordova-fetch.git;h=086ca29 ]

          CB-13303 : setting production flag to default during npm install and test

          Show
          jira-bot ASF subversion and git services added a comment - Commit 086ca2999d1e2bd9a08b057e90d973269f094736 in cordova-fetch's branch refs/heads/master from Audrey So [ https://git-wip-us.apache.org/repos/asf?p=cordova-fetch.git;h=086ca29 ] CB-13303 : setting production flag to default during npm install and test

            People

            • Assignee:
              auso Audrey So
              Reporter:
              stevegill Steve Gill
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development