cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Bavari (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CB-5770) cordova define statement that wraps plugin JS files potentially is commented out unintentionally
Date Fri, 10 Jan 2014 21:01:51 GMT
Josh Bavari created CB-5770:
-------------------------------

             Summary: cordova define statement that wraps plugin JS files potentially is commented
out unintentionally
                 Key: CB-5770
                 URL: https://issues.apache.org/jira/browse/CB-5770
             Project: Apache Cordova
          Issue Type: Bug
          Components: Plugman
    Affects Versions: 3.3.0, 3.2.0, 3.1.0
         Environment: Mac OSX v10.8.5
            Reporter: Josh Bavari
            Priority: Minor
             Fix For: 3.4.0


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.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message