emberella icon indicating copy to clipboard operation
emberella copied to clipboard

Using emberella with Brocfile.js in new ember-cli app

Open millisami opened this issue 11 years ago • 8 comments

I am trying to use this library in a ember-cli app i generated. Clone the repo at vendor/emberella

The files to compile is at vendor/emberella/packages/emberella/lib folder. The following is the structure.

├── lib
│   ├── controllers
│   ├── core.coffee
│   ├── helpers
│   ├── main.coffee
│   ├── mixins
│   ├── views
│   └── views.coffee

I want the compiled file to have core.coffee, views.coffee, main.coffee and all the files under dir controllers, helpers, mixins and views files to be concateneted in a single file at /assets/emberella.js

In the Brocfile.js, I've the following:

var filterCoffeeScript = require('broccoli-coffee')
var concat = require('broccoli-concat')
var sourceTree = filterCoffeeScript('vendor/emberella/packages/emberella/lib')
var sourceJs = concat(sourceTree, {
  inputFiles: ['core.coffee', 'views.coffee', '**/*.coffee'],
  outputFiles: '/assets/emberella.js'
})

When I run broccoli serve, I get the following error:

± broccoli serve                                                                                                  2.1.0
Serving on http://localhost:4200

Built with error:
Error: Path or pattern "core.coffee" did not match any files
  at Object.multiGlob (/Users/millisami/Personal/lgebs/node_modules/broccoli-concat/node_modules/broccoli-kitchen-sink-helpers/index.js:216:13)
  at /Users/millisami/Personal/lgebs/node_modules/broccoli-concat/index.js:41:30
  at invokeCallback (/Users/millisami/Personal/lgebs/node_modules/broccoli/node_modules/rsvp/dist/commonjs/rsvp/promise.js:228:21)
  at publish (/Users/millisami/Personal/lgebs/node_modules/broccoli/node_modules/rsvp/dist/commonjs/rsvp/promise.js:176:9)
  at publishFulfillment (/Users/millisami/Personal/lgebs/node_modules/broccoli/node_modules/rsvp/dist/commonjs/rsvp/promise.js:312:5)
  at flush (/Users/millisami/Personal/lgebs/node_modules/broccoli/node_modules/rsvp/dist/commonjs/rsvp/asap.js:41:9)
  at process._tickDomainCallback (node.js:463:13)

What should be the Brocfile.js code to get this working?

millisami avatar Jun 04 '14 09:06 millisami

Anything yet?

millisami avatar Jun 06 '14 10:06 millisami

First emberella provide some compiled output?

stefanpenner avatar Jun 06 '14 12:06 stefanpenner

Hi. I am currently traveling and haven't had an opportunity to really look into this. Emberella was created well before Broccoli and designed to work with Rails Asset Pipeline. I really enjoy Broccoli as a build tool and intend to restructure Emberella into smaller pieces that take advantage of the newer tooling and Ember idioms that have become available over the last 12 months. In the short term, I don't have a quick solution for you. I may be able to take a closer look next week. Thanks for your interest in Emberella.

realityendshere avatar Jun 06 '14 17:06 realityendshere

Alright, will wait for your next reply.

millisami avatar Jun 07 '14 14:06 millisami

Hi @millisami, did you sort out this issue? any news on this @realityendshere? I would also love to use emberella in an ember-cli project. Thanks ;)

kristianmandrup avatar Sep 26 '14 12:09 kristianmandrup

I would like to package the good parts of Emberella into Ember CLI Add-ons.

realityendshere avatar Sep 26 '14 17:09 realityendshere

We also need to improve the Ember CLI docs on addons. Would be nice with an example for how to port/convert an old Ember "plugin" such as one of the emberella components to become a new cli compatible addon ;)

kristianmandrup avatar Sep 26 '14 17:09 kristianmandrup

@kristianmandrup Nop, I didn't. At that time the addons was just being shaped out. So, didn't get further on this.

millisami avatar Nov 15 '14 06:11 millisami