You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by stevengill <gi...@git.apache.org> on 2015/08/04 03:54:19 UTC

[GitHub] cordova-js pull request: CB-9436 Refactor browserify to get rid of...

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?


---
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