cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-9436) Refactor browserify to get rid of `require-tr` transform
Date Tue, 04 Aug 2015 01:55:05 GMT

    [ https://issues.apache.org/jira/browse/CB-9436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14652945#comment-14652945
] 

ASF GitHub Bot commented on CB-9436:
------------------------------------

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

    https://github.com/apache/cordova-js/pull/124#discussion_r36151308
  
    --- Diff: tasks/lib/packager-browserify.js ---
    @@ -46,25 +37,13 @@ module.exports = function generate(platform, useWindowsLineEndings,
platformVers
             outReleaseFile = path.join('pkg', 'cordova.' + platform + '.js');
             outReleaseFileStream = fs.createWriteStream(outReleaseFile);
     
    -        var symbolList = null;
    -        var addSymbolList = through.obj(function(row, enc, next) {
    -            if(symbolList === null) {
    -                symbolList = requireTr.getModules(platform);
    -                this.push(util.format('var symbolList = %s;\n%s\n', JSON.stringify(symbolList,
null, 4), row));
    -            } else {
    -                this.push(row);
    -            }
    -            next();
    -        });
    -
    -        libraryRelease.pipeline.get('wrap').push(addSymbolList);
    -
             // write license header
             writeLicenseHeader(outReleaseFileStream, platform, commitId, platformVersion);
     
    -        releaseBundle = libraryRelease.bundle();
    -
    -        releaseBundle.pipe(outReleaseFileStream);
    +        bundle(platform, false, commitId, platformVersion, platformPath)
    +          .add(path.resolve(__dirname, '..', '..', 'src/scripts/bootstrap.js'))
    --- End diff --
    
    You add bootstrap.js here which has require('cordova/init') in it. But you also manually
add require('cordova/init') in the form of init.js when adding plugins using cordova prepare
--browserify. https://github.com/MSOpenTech/cordova-lib/commit/510516135ef41b735b2e610c1b8d95fc77bd571e#diff-28a16640f3807e6ee2300ea7ce8c2f1dR196
    
    Are they both needed?


> Refactor browserify to get rid of `require-tr` transform
> --------------------------------------------------------
>
>                 Key: CB-9436
>                 URL: https://issues.apache.org/jira/browse/CB-9436
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: CordovaJS, CordovaLib
>            Reporter: Vladimir Kotikov
>            Assignee: Vladimir Kotikov
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message