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

cordova define statement that wraps plugin JS files potentially is commented out unintentionally

VotersWatch issueWatchersLinkUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.1.0, 3.2.0, 3.3.0
    • None
    • cordova-plugman
    • Mac OSX v10.8.5

    Description

      When adding plugins with plugman, the process wraps the containing javascript content with the following:

      cordova.define("moduleName", function(require, exports, module)

      { scriptContent }); If a plugin JS file has a comment at the end of the file that plugman is wrapping with a cordova.define statement, the string that is concatenated at the end, "}

      );", may be commented out.

      For example, given the original plugin file before preparing:

      var module =

      { .. code .. };
      //Some comment comes here

      The file after preparing:

      cordova.define("moduleName", function(require, exports, module) {
      var module = { .. code .. }

      ;
      //Some comment comes here });

      The fix is to add a new line before placing the end bracket and parenthesis.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            agrieve Andrew Grieve
            jbavari Josh Bavari
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified

                Slack

                  Issue deployment