Deprecated in favor of broccoli-funnel.
npm install --save-dev broccoli-file-remover
Removing a single file from app/main
:
var removeFile = require('broccoli-file-remover');
var tree = removeFile('app', {
srcFile: 'app/main.js'
});
Removing app/main
and test/main
:
var removeFile = require('broccoli-file-remover');
var tree = removeFile('app', {
files: ['app/main.js', 'test/main.js']
});
Removing a directory (tests/dummy
):
var removeFile = require('broccoli-file-remover');
var tree = removeFile('app', {
path: 'tests/dummy'
});
Removing a number of directories:
var removeFile = require('broccoli-file-remover');
var tree = removeFile('app', {
paths: ['directory1', 'directory2']
});
The examples above can be migrated to use broccoli-funnel
's exclude
option:
const Funnel = require('broccoli-funnel');
let tree = new Funnel('app', { exclude: ['app/main.js', 'test/main.js'] });
or, to remove a directory
let tree = new Funnel('app', { exclude: ['tests/dummy'] });
options.srcFile
{String} (also aliased as options.path
)
The path of the file to remove.
options.files
{Array} (also aliased as options.paths
)
This allows specifying more than one remove operation at a time (and reduced the total number of trees/steps needed if you need to move many files or directories). Each file listed in the array will be removed.
I know, right?
Running the tests:
npm install
npm test
This project is distributed under the MIT license.