Skip to content

cushJS/cush-plugin-nebu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cush-plugin-nebu v0.1.0

An alternative to Babel for plugins that transform Javascript.

Configuration

Each package can have its own nebu.config.js module that customizes its plugins and other options.

Your cush.config.js module can configure the nebu.plugins property too, but it needs to be in a worker first.

this.worker(function() {
  this.merge('nebu.plugins', [
    // nebu plugins go here
  ]);
});

The "nebu" hook provides access to the state of each asset after its plugins are used.

// cush.config.js
this.worker(function() {
  this.hook('nebu', (asset, state) => {
    // The state is unique to each asset and updated by nebu plugins.
  });
});