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

Command Line tool doesn't work #233

Closed saponifi3d closed 8 years ago

saponifi3d commented 9 years ago
$ emblem test.emblem

module.js:340
    throw err;
          ^
Error: Cannot find module '../lib/emblem'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/usr/local/Cellar/nvm/0.16.0/v0.10.30/lib/node_modules/emblem/bin/emblem:107:14)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)

This appears to be here: https://github.com/machty/emblem.js/blob/master/bin/emblem#L107

Some background, I'm trying to update gulp-emblem to the latest version, however it used the precompilemethod before which appears to now be deprecated. I basically need this functionality back: https://github.com/machty/emblem.js/blob/master/bin/emblem#L165 and was trying to reproduce it.... should i simply us something like Emblem.default.compile( emblem ) then send that to Handlebars.precompile?

mixonic commented 9 years ago

@saponifi3d they command line tools is definitely broken, re: https://github.com/machty/emblem.js/issues/213

The path indeed is to call the Emblem compiler, then pass it to the Ember HTMBars compiler. In the ember-cli addon:

Let me know if you need any more context to get the gulp lib updated, and please PR an update to the README here when you finish :-)