Skip to content

Transforms given broccoli tree that contains browser API to be fastboot complaint

Notifications You must be signed in to change notification settings

kratiahuja/fastboot-transform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fastboot-transform

Transforms a given broccoli tree, which contains files using browser APIs, to be FastBoot compliant.

Usage

If your library here at a/b/c.js contains:

window.foo = bar;

The above file is not compatible in FastBoot. Therefore, you will need to wrap it with:

var fastboot-transform = require('fastboot-transform');

fastboot-transform(new Funnel('a/b/c.js'));

The result of the above is:

if (typeof FastBoot === 'undefined') {
 window.foo = bar;
}

About

Transforms given broccoli tree that contains browser API to be fastboot complaint

Resources

Stars

Watchers

Forks

Packages