Skip to content

Use Broccoli's new .rebuild API and still support the legacy .read interface.

Notifications You must be signed in to change notification settings

broccolijs/broccoli-read-compat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

broccoli-read-compat

This packages allows you to use Broccoli's new .rebuild API and still support the legacy .read interface required for older Broccoli versions.

This package is deprecated in favor of broccoli-plugin, which automatically provides the legacy .read interface.

Usage

When defining your plugin, call readAPICompat.wrapFactory to add the legacy .read and .cleanup functions.

var fs = require('fs');
var readAPICompat = require('broccoli-read-compat');

function MyAwesomePlugin() { }

MyAwesomePlugin.prototype.rebuild = function() {
  var outputPath = this.outputPath;

  fs.writeFileSync(outputPath + '/' + 'awesome.txt', 'special sauce');
};

readAPICompat.wrapFactory(MyAwesomePlugin);

About

Use Broccoli's new .rebuild API and still support the legacy .read interface.

Resources

Stars

Watchers

Forks

Packages

No packages published