- Replace all
marked-extension-templatewith your extension npm name - Replace all
markedExtensionTemplatewith your extension global name - Update description in
/README.md - Update usage in
/README.md - Update options in
/README.md - Write extension in
/src/index.ts - Write tests in
/spec/index.test.js - Write typescript tests in
/spec/index.test-types.ts - Uncomment release in
/.github/workflows/main.yml
import {Marked} from "marked";
import markedExtensionTemplate from "marked-extension-template";
// or UMD script
// <script src="https://cdn.jsdelivr.net/npm/marked/lib/marked.umd.js"></script>
// <script src="https://cdn.jsdelivr.net/npm/marked-extension-template/lib/index.umd.js"></script>
// const Marked = marked.Marked;
const marked = new Marked();
const options = {
// default options
};
marked.use(markedExtensionTemplate(options));
marked.parse("example markdown");
// <p>example html</p>