broccoli-file-remover

Broccoli plugin to move a single file.

MIT 7 个版本
安装
npm install broccoli-file-remover
yarn add broccoli-file-remover
pnpm add broccoli-file-remover
bun add broccoli-file-remover
README

Broccoli's File Remover

Build Status

Installation

npm install --save-dev broccoli-file-remover

Usage

Files

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']
});

Directories

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']
});

Documentation

removeFile(inputTree, options)


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.

ZOMG!!! TESTS?!?!!?

I know, right?

Running the tests:

npm install
npm test

License

This project is distributed under the MIT license.

版本列表
0.3.1 2014-10-05
0.3.0 2014-09-29
0.2.3 2014-08-28
0.2.2 2014-06-29
0.2.1 2014-05-30
0.2.0 2014-04-26
0.1.0 2014-04-22