machty / emblem.js

Emblem.js - Ember-friendly, indented syntax alternative for Handlebars.js
http://emblemjs.com
MIT License
1.04k stars 81 forks source link

use emblem inside an addon #273

Closed Leooo closed 8 years ago

Leooo commented 8 years ago

Hello, is this a normal use case and is it possible to use emblem inside of an addon? Right now using an addon building components using a layout syntax to fetch the templates, and it doesn't seem that the template.embl are processed at all?

myApp/addon/components/my-component/controller.js:

import Ember from 'ember';
import DS from 'ember-data';
import layout from './template';

export default Ember.Component.extend({
  layout,
  ..
})

myApp/addon/components/my-component/template.embl: => not processed

myApp/addon/components/my-component/template.hbs: => processed

package.json:

    "ember-cli-emblem": "0.4.0",
coladarci commented 8 years ago

my-component/template.embl: ? never seen this - why not my-component/template.emblem ?

Leooo commented 8 years ago

@coladarci using ember-cli-emblem: "It compiles .embl, .emblem and .em templates into Handlebars-syntax templates which will then be compiled as standard .hbs templates by ember-cli"

Will post an issue on this repo too, as this may be more of an ember-cli linked issue.

Leooo commented 8 years ago

Working now, only had to move ember-cli-emblem dependency from devDependencies to dependencies inside the addon,