0

I'm using ember-cli v0.0.40 in a small project which I mainly use to learn how ember-cli works and differs from ember-app-kit - especially on my windows dev machine.

Now, I came to the conclusion that I would need to tweak the Brocfile.js to fit my needs an include a CSS auto-prefixer (broccoli-autoprefixer), but I can't wrap my head around where I get the right tree to pass to the auto-prefixer and where I would inject the then returned tree again?

Just for the records, the current Brocfile.js looks like this:

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

var app = new EmberApp();

// Use `app.import` to add additional libraries to the generated
// output files.
//
// If you need to use different assets in different
// environments, specify an object as the first parameter. That
// object's keys should be the environment name and the values
// should be the asset to use in that environment.
//
// If the library that you are including contains AMD or ES6
// modules that you would like to import into your application
// please specify an object with the list of modules as keys
// along with the exports of each module as its value.


module.exports = app.toTree();

Where the heck would I get a grip on any broccoli tree or task? I don't get it why this is abstracted away somewhere within ember-cli/lib/broccoli/ember-app?

herom
  • 2,532
  • 29
  • 41
  • It's not possible, you need an ember-cli add-on http://reefpoints.dockyard.com/2014/06/24/introducing_ember_cli_addons.html – eguneys Aug 14 '14 at 09:36
  • @facebook why is it not possible? if I can use an `add-on` why am I not supposed to write it down in a few lines myself? – herom Aug 14 '14 at 10:00
  • because ember-cli SUCKS. I suggest using an alternative: [generator-emberfs](https://github.com/eguneys/generator-emberfs) – eguneys Aug 14 '14 at 10:01
  • @facebook so that's your opinion - I'd rather investigate the how and why on a tool provided by the core-team than head over to any alternative which is likely going to go get orphaned/unsupported quickly. it might be that `ember-cli` is just a bit "too much of everything" when they try to abstract away even build steps and force you to use `add-ons` which are also just wrapper around the origin source and therefore also subjects for build fails which are so nested that you're not able to say what's going on. on the other hand, the fact that it's taken care of by the core team seems like a win – herom Aug 14 '14 at 10:08

0 Answers0