Simplify the mechanics of using markdownlint in a browser.

This commit is contained in:
David Anson 2015-06-17 09:09:33 -07:00
parent d263a955f3
commit 070eb19177
5 changed files with 14 additions and 16 deletions

View file

@ -31,9 +31,7 @@
<footer>Copyright &copy; 2015 by <a href="//dlaa.me/">David Anson</a></footer>
</div>
</div>
<script src="browser-polyfills.js"></script>
<script src="markdown-it.min.js"></script>
<script src="require-stub.js"></script>
<script src="markdownlint-browser.js"></script>
<script src="default.js"></script>
</body>

7
demo/markdown-it-stub.js Normal file
View file

@ -0,0 +1,7 @@
"use strict";
// Alias "markdown-it" (expected) to "markdownit" (exported)
module.exports = window.markdownit;
if (!module.exports) {
console.error("markdown-it must be loaded before markdownlint.");
}

View file

@ -1,12 +1,10 @@
CACHE MANIFEST
# 2015-05-08
browser-polyfills.js
# 2015-06-17
default.css
default.htm
default.js
favicon.ico
markdown-it.min.js
markdownlint-browser.js
require-stub.js
NETWORK:
*

View file

@ -1,8 +0,0 @@
"use strict";
// Aliases "markdown-it" (expected) for "markdownit" (exported)
function require(module) {
if (module === "markdown-it") {
return window.markdownit;
}
}