How to use the matchdep.filterAll function in matchdep

To help you get started, we’ve selected a few matchdep examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github STRML / backbone.queryRouter / Gruntfile.js View on Github external
options: {
          lineNums: true
        }
      }
    },
    jshint: {
      validate: {
        src: ['src/**/*.js']
      },
      options: grunt.file.readJSON('.jshintrc')
    },
  });


  // Load all grunt tasks in package.json
  _.each(matchdep.filterAll('grunt-*'), function(pkgName){
    grunt.loadNpmTasks(pkgName);
  });
  grunt.registerTask('test', ['clean:test', 'browserify', 'coffee:test', 'jasmine']);
  grunt.registerTask('release', ['clean:dist', 'browserify', 'uglify']);
  grunt.registerTask('default', ['jshint', 'test', 'release', 'docker']);
};
github spryker / demoshop / config / Yves / Gruntfile.js View on Github external
}
    },

    concurrent : {
      options : {
        logConcurrentOutput: true
      },

      watch : [
        'watch',
        'compass:watch'
      ]
    }
  });

  require( 'matchdep' )
    .filterAll( 'grunt-*', require( '../../package.json' ) )
      .forEach( grunt.loadNpmTasks );

  // grunt for distribution
  grunt.registerTask( 'dist', [
    'clean',
    'copy',

    'compass:clean',
    'compass:dist'
  ]);

  // grunt for development
  grunt.registerTask( 'dev', [
    'clean',
    'copy',
github csethanhcong / C9js / src / Gruntfile.js View on Github external
module.exports = function(grunt) {
	require("matchdep").filterAll("grunt-*").forEach(grunt.loadNpmTasks);
	var webpack = require("webpack");
	var webpackConfig = require("./webpack.config.js");
	grunt.initConfig({
		webpack: {
			options: webpackConfig,
			build: {
				plugins: webpackConfig.plugins.concat(
					new webpack.DefinePlugin({
						"process.env": {
							// This has effect on the react lib size
							"NODE_ENV": JSON.stringify("production")
						}
					}),
					new webpack.optimize.DedupePlugin(),
					new webpack.optimize.UglifyJsPlugin()
				)
github scurker / currency.js / Gruntfile.js View on Github external
}
      },
      options: {
        stripBanners: true,
        banner: '<%= banner %>',
        // Allow for the original banner to be stripped
        process: function(src, filepath) {
          return filepath === 'currency.js' ? src.replace(/^\/\*!/, '/*') : src;
        }
      }
    }

  });

  require('google-closure-compiler').grunt(grunt);
  require('matchdep').filterAll('grunt-*').forEach(grunt.loadNpmTasks);

  grunt.registerTask('build', ['closure-compiler', 'concat', 'sync']);
  grunt.registerTask('default', ['build']);

};
github lint-deps / lint-deps / lib / lint.js View on Github external
lint._listPkgDependencies = function(options) {
  var deps = matchdep.filterAll('*', pkgFile);
  if (_.contains(deps, 'load-grunt-tasks') || _.contains(deps, 'matchdep')) {
    excluded.packageNames = excluded.packageNames.concat(['grunt-']);
  }

  // Create a comma-separated list of deps to exclude from the search
  var omissions = _.unique(excluded.packageNames).join(',');
  var patterns = ['*', '!verb', '!{' + omissions + '}*'];
  return matchdep.filterAll(patterns, pkgFile);
};
github gruntjs / gruntjs.com / Gruntfile.js View on Github external
all: {
        options: {
          extends: '.pug-lintrc.json'
        },
        src: 'src/tmpl/**/*.pug'
      }
    },

    htmllint: {
      src: 'build/**/*.html'
    }

  });

  grunt.loadTasks('tasks'); // getWiki, docs tasks
  require('matchdep')
    .filterAll(['grunt-*', '!grunt-docs'])
    .forEach(grunt.loadNpmTasks);

  grunt.registerTask('build', 'Build the site', [
    'copy',
    'docs',
    'blog',
    'plugins',
    'uglify',
    'sitemap'
  ]);
  grunt.registerTask('default', 'Build the site, download plugins, production ready', [
    'build',
    'downloadPlugins',
    'less:production',
    'autoprefixer'
github webpack / docs / Gruntfile.js View on Github external
module.exports = function(grunt) {
	require("matchdep").filterAll("grunt-*").forEach(grunt.loadNpmTasks);
	grunt.loadTasks("tasks");
	var webpack = require("webpack");
	function buildTutorial(p, callback) {
		p = path.resolve(p);
		try {
			var config = require(p + "/webpack.config.js");
		} catch(e) { return callback(null, "") }
		config.context = p;
		webpack(config, function(err, stats) {
			if(err) throw err;
			grunt.log.writeln("webpack executed from " + path.basename(p));
			grunt.log.writeln(stats.toString({
				context: path.join(__dirname, "dist"),
				chunks: false,
				modules: true,
				hash: false,
github spryker / demoshop / config / Zed / Gruntfile.js View on Github external
projectPackagesZed : {
        files : '<%= dirs.project %>/<%= dirs.srcZ %>',

        tasks : [
          'copy:projectPackagesZed'
        ],

        options : {
          spawn : false
        }
      }
    }
  });

  require( 'matchdep' )
    .filterAll( 'grunt-*', require( '../../package.json' ) )
      .forEach( grunt.loadNpmTasks );

  grunt.registerTask( 'dev', [
    'clean',
    'copy'
  ]);

  grunt.registerTask( 'watcher', [
    'watcher'
  ]);

  grunt.registerTask( 'dist', [
    'dev'
  ]);
github helpers / handlebars-helpers / lib / helper-lib.js View on Github external
matchkeys.filter('*').map(function (keywords) {
      matchdep.filterAll(keywords, pkg).forEach(function (match) {
        registerHelper(match);
      });
    });
  }
github dataminr / react-components / Gruntfile.js View on Github external
module.exports = function(grunt) {

    var configs = require('load-grunt-configs')(grunt, {
        config : {
            src: "grunt/*.js"
        }
    });

    grunt.initConfig(configs);
    require("matchdep").filterAll("grunt-*").forEach(grunt.loadNpmTasks);

    /**
     * Default task to be used by developers. Startup webpack dev server
     */
    grunt.registerTask('default', [
        'webpack-dev-server:start',
    ]);

    /**
     * Runs all tests
     */
    grunt.registerTask('test',[
        'eslint',
        'karma'
    ]);

matchdep

Use micromatch to filter npm module dependencies by name.

MIT
Latest version published 7 years ago

Package Health Score

62 / 100
Full package analysis