Skip to content

Simple broccoli utility function to filter ember initializers based upon build mode.

License

Notifications You must be signed in to change notification settings

ronco/fastboot-filter-initializers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fastboot-filter-initializers

Simple broccoli utility function to filter ember initializers based upon build mode.

To use this, first add it as a dependency:

npm i --save fastboot-filter-initializers

Then, add this to index.js of your addon like so:

/* jshint node: true */
'use strict';

var filterInitializers = require('fastboot-filter-initializers');

module.exports = {
  name: 'addon-name',

  preconcatTree: function(tree) {
    return filterInitializers(tree, this.app.name);
  }
};

And move your initializers and instance-initializers into a subdirectory depending on build mode they are used for, such as: initializers/foo.js -> initializers/browser/foo.js and fastboot only initializers will be moved to initializers/fastboot/foo.js

About

Simple broccoli utility function to filter ember initializers based upon build mode.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published