I found this library which I want to use for my ember-cli project. https://github.com/marianoguerra/json.human.js
But it doesn’t have the AMD style version. Since I am new to the js module resolver field, I don’t have any idea on how to require/import it and use it.
Can anyone guide me on this?
Take a look at how I added marked
to this ember-cli project GitHub - broerse/ember-cli-blog: Tom Dale's blog example updated for the Ember CLI I thinks you can do the same for your library.
Well I pulled that repo and looked around.
But I think its not the same case. The library marked has the global function defined as marked
which is what you’ve added in the format-markdown.js
helper as:
return new Ember.Handlebars.SafeString(marked(value));
But In my case, there isn’t any globally defined JsonHuman
?
I just tried it and it almost works.
https://github.com/broerse/ember-cli-blog/tree/json.human
The module can’t find crel result = crel("span",
but it seems I can call JsonHuman.format(value));
https://github.com/broerse/ember-cli-blog/blob/json.human/app/helpers/json-human.js
I hope you can find this last step.
Not tested yet but perhaps also add app.import('bower_components/json-human/lib/crel.js');
to brocfile.js ??
Tested now. It removes the error but there is no output yet.
@broerse Thanks for your effort and help.
I’ll check it out.