2

How does one use emberscript in an Ember-cli app? I've installed the broccoli-ember-script node module but I can't figure out how to incorporate it into the default Ember-cli configuration of Brocfile.js.

niftygrifty
  • 3,452
  • 2
  • 28
  • 49

1 Answers1

0

This is how I ended up doing it:

var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var filterEmberScript = require('broccoli-ember-script');

var app = new EmberApp();
var tree = app.toTree();

tree = filterEmberScript(tree);

module.exports = tree;

Also, apparently ember-script will include Ember automatically so importing it will cause an error. There's an open issue about this.

niftygrifty
  • 3,452
  • 2
  • 28
  • 49