Registry / devops / broccoli-static-compiler

broccoli-static-compiler

JSON →
library0.2.2jsnpmunverified

Deprecated Broccoli plugin for copying static files with optional filtering and directory restructuring. The last published version (0.2.2) is no longer maintained. Replaced by broccoli-funnel since 2015. Does not support Broccoli 1.x or Node.js modern versions. Known for simple src/dest directory mapping and glob-based file selection. Alternatives: broccoli-funnel (recommended), broccoli-file-creator, or manual copy with broccoli-merge-trees.

npm install broccoli-static-compiler
INSTALL
IMPORT
SIG · BROCCOLI-STATIC-CO
B
broccoli-static-compiler
devopsjavascriptv0.2.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
var pickFiles = require('broccoli-static-compiler');
import pickFiles from 'broccoli-static-compiler';
Package is CommonJS only. ESM import will fail.
default named
var pickFiles = require('broccoli-static-compiler');
const { pickFiles } = require('broccoli-static-compiler');
The function is exported as a single default export, not a named export.

Shows how to copy selected image files from a source directory to a destination directory using glob patterns.

var pickFiles = require('broccoli-static-compiler'); var sourceTree = 'app'; var imagesTree = pickFiles(sourceTree, { srcDir: '/images', files: ['**/*.png', '**/*.jpg'], destDir: '/assets' }); module.exports = imagesTree;
Debug
Known issues
deprecatedbroccoli-static-compiler is deprecated. Use broccoli-funnel instead.
fix
Replace require('broccoli-static-compiler') with require('broccoli-funnel') and adjust options (srcDir -> srcDir, destDir -> destDir, files -> allowFiles).
affects: >=0.0.0
breakingPackage does not work with Broccoli 1.x and modern Node.js versions (>=10).
fix
Upgrade to broccoli-funnel which supports Broccoli 1.x and Node.js >=8.
affects: >=0.0.0
gotchaThe 'files' option requires explicit array of glob patterns; if omitted, all files from srcDir are copied.
fix
Always specify 'files' if you want to filter, or omit to copy all. Note that empty array copies no files.
affects: >=0.0.0
gotchasrcDir and destDir are required; relative paths are resolved from the Broccoli working directory, not the project root.
fix
Use absolute paths or ensure paths are correct relative to Broccoli's working directory.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'broccoli-static-compiler'
Package not installed or removed from npm.
fix
Install broccoli-funnel instead: npm install --save-dev broccoli-funnel, then update code.
TypeError: pickFiles is not a function
Incorrect import pattern (e.g., named import instead of default).
fix
Use: var pickFiles = require('broccoli-static-compiler');
Error: Broccoli 1.x incompatible
This plugin relies on Broccoli 0.x APIs.
fix
Switch to broccoli-funnel which supports both 0.x and 1.x.
Upgrade
Version history
0.2.2latest on npm
Audit
Dependencies
broccoli-caching-writerrequiredinherits from Broccoli plugin base
mkdirprequiredcreates destination directories
broccoli-merge-treesoptionalmay be needed to combine output with other trees
Agent activity
5 hits · last 30 days
node
4
Resources
broccoli-static-compiler — npm install broccoli-static-compiler · libregistry