Skip to content

Commit

Permalink
Merge pull request #6 from mikehenrty/upgrade-asset
Browse files Browse the repository at this point in the history
support latest release of parcel bundler
  • Loading branch information
gongpeione committed Jun 17, 2019
2 parents aeb5808 + f0c0889 commit b83d822
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions MarkdownAsset.js
Expand Up @@ -4,18 +4,11 @@ const marked = require('marked');
module.exports = class MarkdownAsset extends HTMLAsset {
constructor(name, pkg, options) {
super(name, pkg, options);
this.type = 'js';
this.markedOptions = pkg.marked || {}
}

parse(code) {
this.contents = marked(code, this.markedOptions);
return super.parse(this.contents);
}

generate() {
return {
js: `module.exports=\`${super.generate()}\``
};
}
}

0 comments on commit b83d822

Please sign in to comment.