🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

configfiles

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

configfiles

Get files from a configuration using globule.

0.3.4
latest
Version published
Weekly downloads
111
-33.93%
Maintainers
1
Weekly downloads
 
Created

configfiles Build Status

Get files from a configuration using globule.

NPM

What?

var configfiles = require('configfiles');

configfiles({
  src: ['test/fixtures/*.js', '!test/fixtures/*.txt']
});
// [ { src:
//      [ 'test/fixtures/1.js',
//        'test/fixtures/2.js',
//        'test/fixtures/3.js' ] } ]

configfiles({
  src: ['test/fixtures/*'],
  dest: 'dest/file'
});
// [ { src:
//      [ 'test/fixtures/1.js',
//        'test/fixtures/2.js',
//        'test/fixtures/3.js',
//        'test/fixtures/bar.txt',
//        'test/fixtures/baz.txt',
//        'test/fixtures/foo.txt' ],
//     dest: 'dest/file' } ]

configfiles({
  files: {
    src: ['test/fixtures/*'],
    dest: 'dest/file'
  }
});
// [ { src:
//      [ 'test/fixtures/1.js',
//        'test/fixtures/2.js',
//        'test/fixtures/3.js',
//        'test/fixtures/bar.txt',
//        'test/fixtures/baz.txt',
//        'test/fixtures/foo.txt' ],
//     dest: 'dest/file' } ]

configfiles({
  files: [
    { src: ['test/fixtures/*.js'], dest: 'dest/file' },
    { src: ['test/fixtures/*.txt'] }
  ]
});
// [ { src:
//      [ 'test/fixtures/1.js',
//        'test/fixtures/2.js',
//        'test/fixtures/3.js' ],
//     dest: 'dest/file' },
//   { src:
//      [ 'test/fixtures/bar.txt',
//        'test/fixtures/baz.txt',
//        'test/fixtures/foo.txt' ] } ]

configfiles({
  files: ['test/fixtures/*.js']
});
// [ { src:
//      [ 'test/fixtures/1.js',
//        'test/fixtures/2.js',
//        'test/fixtures/3.js' ] } ]

configfiles(['test/fixtures/*.js']);
// [ { src:
//      [ 'test/fixtures/1.js',
//        'test/fixtures/2.js',
//        'test/fixtures/3.js' ] } ]

configfiles({
  expand: true,
  cwd: 'test/fixtures',
  src: '*.js',
  dest: 'dest/'
});
// [ [ { src: [Object], dest: 'dest/1.js' },
//     { src: [Object], dest: 'dest/2.js' },
//     { src: [Object], dest: 'dest/3.js' } ] ]

FAQs

Package last updated on 07 Mar 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts