How to use matchdep - 10 common examples

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 gruntjs / grunt-contrib / Gruntfile.js View on Github external
grunt.registerTask('build', function () {
    var done = this.async();
    var when = require('when');
    var request = require('request');
    var _ = require('lodash');
    var deps = require('matchdep').filterPeer('grunt-contrib-*');
    var baseurl = 'http://raw.github.com/gruntjs/'

    // make http request for author file in a repo
    var authorFile = function (dep) {
      var deferred = when.defer();
      var url = baseurl+dep+'/master/AUTHORS';
      request.get({url: url}, function(err, res, body) {
        if (res.statusCode != 200) {
          grunt.fail.fatal('Failed to retrieve '+url);
        } else {
          deferred.resolve(body.split('\n'));
        }
      });
      return deferred.promise
    };
github DeuxHuitHuit / quicksearch / Gruntfile.js View on Github external
module.exports = function(grunt) {

	'use strict';
	
	var gruntfile = 'Gruntfile.js';
	var sources = ['src/<%= pkg.name %>.js'];
	
	md.filterDev('grunt-*').forEach(grunt.loadNpmTasks);
	
	// Project configuration.
	grunt.initConfig({
		pkg: grunt.file.readJSON('package.json'),
		meta: {
			banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
			'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
			'<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
			'* Copyright (c) 2013 Deux Huit Huit, Rik Lomas.\n' +
			'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %> (<%= pkg.author.url %>);\n' +
			'* License <%= pkg.license %> http://deuxhuithuit.mit-license.org */'
		},
		concat: {
			options: {
				process: true,
				banner: '<%= meta.banner %>\n'
github rogeriochaves / Reactbox / Gruntfile.js View on Github external
module.exports = function (grunt) {
    // load all grunt tasks
    require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);

    // configurable paths
    var yeomanConfig = {
        app: 'app',
        dist: 'dist'
    };

    grunt.initConfig({
        yeoman: yeomanConfig,
        watch: {
            coffee: {
                files: ['<%= yeoman.app %>/scripts/{,*/}*.coffee'],
                tasks: ['coffee:dist']
            },
            coffeeTest: {
                files: ['test/spec/{,*/}*.coffee'],
github Wizehive / firepoker / Gruntfile.js View on Github external
module.exports = function (grunt) {
  // load all grunt tasks
  require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);

  // configurable paths
  var yeomanConfig = {
    app: 'app',
    dist: 'dist'
  };

  // try {
  //   yeomanConfig.app = require('./bower.json').appPath || yeomanConfig.app;
  // } catch (e) {}

  grunt.initConfig({
    yeoman: yeomanConfig,
    watch: {
      coffee: {
        files: ['<%= yeoman.app %>/scripts/{,*/}*.coffee'],
github moribvndvs / ng-busy / gruntfile.js View on Github external
module.exports = function(grunt) {
	// load all grunt tasks
  	require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
    
    var pkg = grunt.file.readJSON('package.json');
    var banner = 

	grunt.initConfig({
		pkg: pkg,
		banner: '/**'+
 '* <%= pkg.description %>\n'+
 '* @author <%= pkg.author %>\n'+
 '* @version v<%= pkg.version %>\n'+
 '* @link <%= pkg.repository.url %>\n' +
 '* @license <%= pkg.license %>\n'+
 '*/',
 		bump: {
 			options: {
 				files: ['package.json', 'bower.json'],
github Katello / katello / engines / bastion / Gruntfile.js View on Github external
module.exports = function (grunt) {
    // load all grunt tasks
    require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);

    // configurable paths
    var bastionConfig = {
        src: 'app/assets/javascripts/bastion',
        dist: 'dist'
    };

    try {
        bastionConfig.src = require('./bower.json').appPath || bastionConfig.src;
    } catch (e) {}

    grunt.initConfig({
        bastion: bastionConfig,
        bower: {
            update: {
                options: {
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']);

};

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