cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akdor1154 <...@git.apache.org>
Subject [GitHub] cordova-lib pull request #602: CB-12774 : Don't munge scoped plugin IDs anym...
Date Wed, 25 Oct 2017 23:22:14 GMT
Github user akdor1154 commented on a diff in the pull request:

    https://github.com/apache/cordova-lib/pull/602#discussion_r147012928
  
    --- Diff: src/cordova/util.js ---
    @@ -255,11 +255,20 @@ function findPlugins (pluginDir) {
         var plugins = [];
     
         if (fs.existsSync(pluginDir)) {
    -        plugins = fs.readdirSync(pluginDir).filter(function (fileName) {
    -            var pluginPath = path.join(pluginDir, fileName);
    -            var isPlugin = isDirectory(pluginPath) || isSymbolicLink(pluginPath);
    -            return fileName !== '.svn' && fileName !== 'CVS' && isPlugin;
    -        });
    +        plugins = fs.readdirSync(pluginDir)
    +            .reduce(function (plugins, pluginOrScope) {
    +                if (pluginOrScope[0] === '@') {
    +                    plugins.push(...fs.readdirSync(path.join(pluginDir, pluginOrScope)).map(s
=> path.join(pluginOrScope, s)));
    --- End diff --
    
    yup just started looking at the failed test :) While you're here and kind of related,
I noticed most of the Cordova codebase avoids `() => arrow functions`. Is this just historical?
I have used full `function () { }` when I've paid attention just to match code style, but
is this necessary?


---

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


Mime
View raw message