Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

broccoli-glob-caching-writer

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broccoli-glob-caching-writer

Caching writer for broccoli that allows to specify files that need to be cached using glob patterns.

  • 0.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11
increased by266.67%
Maintainers
1
Weekly downloads
 
Created
Source

broccoli-glob-caching-writer

Similar to broccoli-caching-writer but allows to specify files that need to be cached using glob patterns.

Install

npm install broccoli-glob-caching-writer

Usage

var CachingWriter = require('broccoli-glob-caching-writer')

var MyWriter = function(inputTree, options) {
  CachingWriter.apply(this, arguments)
}
MyWriter.prototype = Object.create(CachingWriter.prototype)
MyWriter.prototype.updateCache = function(srcDirs, destDir) {
  //create result files
}


var tree = new MyWriter('inputTree', {
	files: ['**/*.js']
})

API

CachingWriter(inputTree, [options])

Constructor.

inputTree

Type: Tree

Input broccoli tree.

options

Type: object

Object with options.

options.files

Type: array.<string>

List of glob patterns to specify files that need to be cached.

Patterns that begin with ! will exclude files. Patterns are processed in order, so inclusion and exclusion order is significant.

CachingWriter.prototype.updateCache(srcDir, destDir, cachedFiles)

This method creates build results, it must be implemented in inherited class. It is called only when files in input tree are changed.

If you want to perform async operations, return a promise from this method.

srcDir

Type: string

Path of the inputTree.

destDir

Type: string

Path of directory for result files.

cachedFiles

Type: array.<string>

Array of cached files paths. Paths are relative to the inputTree.

License

Public domain, see the LICENCE.md file.

Keywords

FAQs

Package last updated on 29 Jan 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc