包详细信息

broccoli-static-compiler

joliss22.5kMIT0.2.2

Broccoli compiler to copy static files

broccoli-plugin, files

自述文件

broccoli-static-compiler

This plugin is deprecated. Use broccoli-funnel instead.

Pick files out of a tree, optionally moving them.

(The package name is for historical reasons. We might change it when we hit 1.0.)

Installation

npm install --save-dev broccoli-static-compiler

Usage Example

var pickFiles = require('broccoli-static-compiler');
var imagesTree = pickFiles(sourceTree, {
  srcDir: '/todomvc',
  files: ['**/*.png', '**/*.jpg'],
  destDir: '/assets'
});

This would copy /todomvc/icons/check-mark.png to /assets/icons/check-mark.png.

Options

srcDir (required), destDir (required)

The destDir directory will be created, and all files and directories inside of srcDir will be recursively copied into destDir.

files (optional)

A list of glob patterns. If provided, instead of copying all files, only files matched by any of the patterns will be copied. You must only specify files, not directories, in this list.

更新日志

master

0.2.2

  • Version bump so deprecation notice shows on npm page

0.2.1

  • Fix regression in using a destDir of / (without an array if file globs). #14

0.2.0

  • Use node-symlink-or-copy to use symlinks instead of copying when possible (see symlink-change.md)

0.1.4

  • Copy instead of hardlinking

0.1.3

  • Use new broccoli-writer base class

0.1.2

  • Use broccoli-kitchen-sink-helpers instead of larger broccoli dependency

0.1.1

  • Update broccoli dependency

0.1.0

  • Loosen dependencies

0.0.5

  • Use broccoli-transform instead of broccoli.Transformer

0.0.4

  • Do not require dependency-injecting broccoli

0.0.3

  • Expose new functional syntax

0.0.2

  • Use new promise API (no actual promises are harmed in this library)

0.0.1

  • Initial release