コード例 #1
0
ファイル: gulpfile.js プロジェクト: pulsepointinc/amphtml
 const shouldBundle = passedFiles.some(glob => {
   return minimatch(jsPath, glob) || minimatch(jsTestPath, glob);
 });
コード例 #2
0
ファイル: install.js プロジェクト: 326029212/vue-gulp-webpack
 function valid (file) {
   // header files
   return minimatch(file, '*.h', { matchBase: true }) ||
          minimatch(file, '*.gypi', { matchBase: true })
 }
コード例 #3
0
ファイル: standard-formatter.js プロジェクト: ab-10/dotfiles
 var matches = packageConfig.ignore.some(function (pattern) {
   return minimatch(file, pattern)
 })
コード例 #4
0
this._enabled = fileGlobs.some(p => minimatch(relativeFilePath, p));
コード例 #5
0
ファイル: bro.js プロジェクト: inno-v/karma-browserify
 return _.any(patterns, function(p) {
   return minimatch(f.pattern, p);
 });
コード例 #6
0
ファイル: file-list.js プロジェクト: Leo-G/Flask-Scaffold
 return this._patterns.find((pattern) => mm(path, pattern.pattern))
コード例 #7
0
 oks.forEach(function (ok) {
   t.ok(+minimatch(ok, p), '"' + p + '" =~ "' + ok + '"');
 });
コード例 #8
0
ファイル: watcher.js プロジェクト: Leo-G/Flask-Scaffold
 return patterns.some((pattern) => mm(path, pattern, {dot: true}))
コード例 #9
0
ファイル: renderer.js プロジェクト: JarnoNijboer/vscode
		loaderConfig.nodeInstrumenter = function (contents, source) {
			return minimatch(source, _tests_glob)
				? contents // don't instrument tests itself
				: instrumenter.instrumentSync(contents, source);
		};
コード例 #10
0
ファイル: config-ops.js プロジェクト: atasso/dotfiles
 return patternList.some(pattern => minimatch(filePath, pattern, opts)) &&
コード例 #11
0
ファイル: config-ops.js プロジェクト: atasso/dotfiles
 !excludedPatternList.some(excludedPattern => minimatch(filePath, excludedPattern, opts));
コード例 #12
0
ファイル: install.js プロジェクト: kaury1405/experiments
 function valid (file) {
   // header files
   return minimatch(file, '*.h', { matchBase: true }) ||
     // non-legacy versions of node also extract the gyp build files
     (!isLegacy && minimatch(file, '*.gypi', { matchBase: true }))
 }
コード例 #13
0
ファイル: tern_wrapper.js プロジェクト: jalemolina/vim
 if (config.dontLoad && config.dontLoad.some(function(pat) { return minimatch(name, pat); })) {
コード例 #14
0
ファイル: javascript.js プロジェクト: blinsay/t2-cli
 ignoreRules.forEach(rule => {
   if (minimatch(details.modulePath, rule, matchOptions)) {
     details.ignored = true;
     details.resolved = false;
   }
 });
コード例 #15
0
ファイル: authorizer.js プロジェクト: AvengerMoJo/mosca
 return function(client, topic, cb) {
   cb(null, minimatch(topic, that.users[client.user].authorizeSubscribe));
 };
コード例 #16
0
ファイル: index.js プロジェクト: tomterl/metalsmith-convert
function convertFile(file, ext, args, files, results) {
  if (minimatch(file, args.src)) {
    if (results[file]) return;
    var nameData = {};
    if (ext === '.__source__') {
      nameData['%e'] = ext = path.extname(file);
    } else  {
      nameData['%e'] =  ext;
    }

    if(!!args.rename_only) {
      im.convert = function(convertArgs) {
        return convertArgs.srcData;
      };
    }

    var convertArgs = {
      srcData: files[file].contents,
      format: ext.substr(1),
      strip: true,
      quality: 90
    };
    var currentExt = path.extname(file);
    nameData['%b'] = path.basename(file, currentExt);

    // Pass options to imagemagick-native
    [
      'density',
      'blur',
      'rotate',
      'flip',
      'strip',
      'quality',
      'gravity'
    ].forEach(function (setting) {
      if (args.hasOwnProperty(setting)) {
        convertArgs[setting] = args[setting];
      }
    });

    if (args.resize) {
      convertArgs['width'] = args.resize.width;
      convertArgs['height'] = args.resize.height;
      nameData['%x'] = args.resize.width;
      nameData['%y'] = args.resize.height;
      convertArgs['resizeStyle'] = args.resize.resizeStyle;
      debug("Resizing (" + args.resize.width + "x" + args.resize.height + ")");
    } else {
      var info = im.identify({srcData: files[file].contents});
      nameData['%x'] = info.width;
      nameData['%y'] = info.height;
    }
    var newName = assembleFilename(args.nameFormat, nameData);
    debug("New name is " + newName);
    newName = path.join(path.dirname(file), newName);
    var result = im.convert(convertArgs);
    if (args.renameSourceFormat) {
      var rename = assembleFilename(args.renameSourceFormat, nameData);
      rename = path.join(path.dirname(file), rename);
      files[rename] = files[file];
      delete files[file];
    }
    files[newName] = { contents: result };
    results[newName] = true;
    if (args.remove) {
      delete files[file];
    }
  }
}
コード例 #17
0
ファイル: file-list.js プロジェクト: Leo-G/Flask-Scaffold
 return this._excludes.find((pattern) => mm(path, pattern))
コード例 #18
0
ファイル: replace.js プロジェクト: Attention/coapp.powershell
 var inIncludes = includes && includes.some(function(include) {
     return minimatch(file, include, { matchBase: true });
 })
コード例 #19
0
ファイル: file-list.js プロジェクト: Leo-G/Flask-Scaffold
 return !!this._patterns.find((pattern) => mm(path, pattern.pattern) && this._findFile(path, pattern))
コード例 #20
0
ファイル: replace.js プロジェクト: Attention/coapp.powershell
 var inExcludes = excludes.some(function(exclude) {
     return minimatch(file, exclude, { matchBase: true });
 })
コード例 #21
0
 ngs.forEach(function (ng) {
   t.ok(!minimatch(ng, p), '"' + p + '" !~ "' + ng + '"');
 });
コード例 #22
0
 _.forEach(instrumenterOverrides, function (literal, pattern) {
   if (minimatch(file.originalPath, pattern, {dot: true})) {
     instrumenterLiteral = String(literal)
   }
 })
コード例 #23
0
ファイル: match.js プロジェクト: MPM10223/stockd
 good = good.filter(function(file) {
   return minimatch(file, ext);
 });
コード例 #24
0
 return IGNORE_FILES.some(function (pattern) {
     return minimatch(file, pattern);
 });
コード例 #25
0
ファイル: build-module.js プロジェクト: alibaba/plover
 const test = rule => minimatch(rpath, rule);
コード例 #26
0
ファイル: cli.js プロジェクト: TangZX1995/alex
/**
 * Check if `file` matches `pattern`.
 *
 * @example
 *   match('baz.md', '*.md'); // true
 *
 * @param {string} filePath - File location.
 * @param {string} pattern - Glob pattern.
 * @return {boolean} - Whether `file` matches.
 */
function match(filePath, pattern) {
    return minimatch(filePath, pattern) ||
        minimatch(filePath, pattern + '/**');
}
コード例 #27
0
ファイル: match.js プロジェクト: Shaul21h/VirtualClass
 good = good.filter(function(file) {
   // only compare the filename to the extension test, so we use path.basename
   return minimatch(path.basename(file), ext);
 });
コード例 #28
0
ファイル: authorizer.js プロジェクト: AvengerMoJo/mosca
 return function(client, topic, payload, cb) {
   cb(null, minimatch(topic, that.users[client.user].authorizePublish));
 };
コード例 #29
0
ファイル: init.spec.js プロジェクト: natevecc/angular-cli
 return any(Blueprint.ignoredFiles, function (ignoredFile) {
   return minimatch(fn, ignoredFile, { matchBase: true });
 });
コード例 #30
0
ファイル: ip_access.js プロジェクト: FilipNest/Iris
    paths.forEach(function (path) {

      valid = minimatch(currentUrl, path);

    });