docs: function detectPorting(target) {
      const PORTING_DEV_DIR = path.join(config.dir.src, config.dir.porting);
      const PLATFORMS_ROOT = path.join(__dirname, '..', 'platforms');
  
      const valid_targets = [];
  
      // valid porting
      if (!fs.existsSync(PORTING_DEV_DIR)) {
          return valid_targets;
      }
  
      const temp_targets = [];
  
      if (null == target || 'all' === target) {
          temp_targets.push('dev');
          fs.readdirSync(PLATFORMS_ROOT)
          .forEach((find) => {
              const findPath = path.join(PLATFORMS_ROOT, find);
              if (fs.statSync(findPath).isDirectory()) {
                  temp_targets.push(find);
              }
          });
      } else {
          const _targets = target.split(',');
          _targets.forEach((_tgt) => {
              temp_targets.push(_tgt);
          });
      }
  
      temp_targets.forEach((candidate) => {
          if ('dev' === candidate) {
              valid_targets.push('dev');
          } else {
              if (fs.existsSync(path.join('platforms', candidate, config.dir.porting))) {
                  valid_targets.push(candidate);
              }
          }
      });
  
      return valid_targets;
  }