Skip to content

Compatibility with RequireJS #3

@gregwym

Description

@gregwym

Hi,

Thanks for this directive, works well. One of the problem i experienced with your setup is the compatibility with RequireJS.

Cuz marked is compatible with AMD standard, when it detect define exists, it will not expost marked into window any more. So the directive will fail to get window.marked.

My work around is manually expose marked into window in the RequireJS bootstrap script.

require(['marked'], function(marked) {
  this.marked = marked;
});

Tho it works well, it's still better to support RequireJS out of the box. Sorry I cannot provide a patch, cuz I'm not sure what's the ideal way of doing this. I will if I find a good solution.

Thanks again for this good lib,
Greg

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions