Skip to content

Commit

Permalink
support latest release of parcel bundler
Browse files Browse the repository at this point in the history
  • Loading branch information
mikehenrty committed Oct 11, 2018
1 parent aeb5808 commit f0c0889
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions MarkdownAsset.js
Original file line number Diff line number Diff line change
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 f0c0889

Please sign in to comment.