Neanderthal Painting Monet

    taskr-filter

    1.0.0 • Public • Published

    taskr-filter

    Filter plugin for Taskr

    NPM License Build Status Coverage Status Dependency Status Peer Dependency Status

    Install

    $ yarn add -D taskr taskr-filter

    or

    $ npm install --save-dev taskr taskr-filter

    Usage

    Function

    export default function* (task) {
      yield task.source(path.join(__dirname, 'src/*'))
        .filter((file) => {
          // file.base
          // file.dir
          // file.data
          return file.base.indexOf('.js') > 1
        })
        .target('./dist')
    }

    RegExp

    export default function* (task) {
      yield task.source(path.join(__dirname, 'src/*'))
        .filter(/\.js$/)
        .target('./dist')
    }

    Glob(s)

    Uses multimatch, which supports multiple patterns

    RegExp

    export default function* (task) {
      yield task.source(path.join(__dirname, 'src/*'))
        .filter('**/*.js')
        .target('./dist')
    }

    NOTE: RegExps and globs are tested against the full path. You will need to use globstars, and may want to restrict them to your workspace. For example, to match anything with 'ba', but only in a specified directory, use path.join(__dirname, 'ba*').

    Install

    npm i taskr-filter

    DownloadsWeekly Downloads

    1

    Version

    1.0.0

    License

    WTFPL

    Unpacked Size

    5.15 kB

    Total Files

    5

    Last publish

    Collaborators

    • caseywebb