0.1.1 • Published 9 years ago

sourceset v0.1.1

Weekly downloads
5
License
MIT
Repository
github
Last release
9 years ago

#Sourceset

Sourceset is a small utility for generated sourcesets in Node. Some plugins, like those for Grunt, don't include expanders or sourceset generators. Instead of having to manually map out each and every file while creating your app, sourceset will expand the directories and generate the sourceset for you.

##Installation

npm install sourceset

##Usage

var sourceset = require('sourceset');
...
babel: {
    dist: {
        files: sourceset({
            files: ['../lib/your-file.js', 'somewhere/*.js'],
            src: 'some-dir',
            dest: 'somewhere/dest-dir'
        })
    }
}
...

// This will generate:
//{
//    '{CWD}/somewhere/dest-dir/lib/your-file.js' : '{CWD}/lib/your-file.js',
//    '{CWD}/somewhere/dest-dir/somewhere/one.js' : '{CWD}/some-dir/somewhere/one.js',
//    '{CWD}/somewhere/dest-dir/somewhere/two.js' : '{CWD}/some-dir/somewhere/two.js',
//}

The default value for src is just the current working directory while the default for dest is the current working directory appended by /tmp/.

0.1.1

9 years ago

0.1.0

9 years ago