Broccoli plugin for referring to source directories on the file system
Last updated 8 months ago by thoov .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install broccoli-source 
SYNC missed versions from official npm registry.

Broccoli Source

Build Status Build status

Broccoli plugin for creating "source" nodes that refer to physical file system directories.

Example Usage

In Brocfile.js:

const { WatchedDir, UnwatchedDir } = require('broccoli-source');

// Refers to the ./lib directory on disk, and watches it.
const lib = new WatchedDir('lib');
// Note: this is equivalent to the deprecated plain-string syntax:
// const lib = 'lib';

// Refers to the ./bower_components/jquery directory, but does not watch it.
const jquery = new UnwatchedDir('bower_components/jquery');


new WatchedDir(directoryPath, options)

Create a Broccoli node referring to a directory on disk. The Broccoli watcher used by broccoli serve will watch the directory and all subdirectories, and trigger a rebuild whenever something changes.

  • directoryPath: A path to a directory, either absolute, or relative to the working directory (typically the directory containing Brocfile.js).

    The directory must exist, or Broccoli will abort.

  • options:

    • annotation: A human-readable description for this node.

new UnwatchedDir(directoryPath, options)

Same as WatchedDir, but the directory will not be watched.

This can be useful for performance reasons. For example, say you want to refer to a large directory hierarchy of third-party code in your Brocfile.js. Such third-party code is rarely edited in practice. Using UnwatchedDir instead of WatchedDir saves the overhead of setting up useless file system watchers.

When in doubt, use WatchedDir instead.

Current Tags

  • 3.0.0                                ...           latest (8 months ago)

7 Versions

  • 3.0.0                                ...           8 months ago
  • 2.1.2                                ...           10 months ago
  • 2.1.1                                ...           10 months ago
  • 2.1.0                                ...           10 months ago
  • 2.0.0                                ...           a year ago
  • 1.1.0                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Today 16
This Week 159
This Month 552
Last Day 12
Last Week 171
Last Month 360
Dependencies (1)
Dependents (76)

Copyright 2014 - 2016 © |