bundle into a UMD script via webpack for both browser & node

This commit is contained in:
jake committed 2021-08-04 11:31:37 -04:00
1 parent 0d48f8e8af
commit df3b462de0
9 files changed
+1311 -55

No files matched your search

+6 -1
View File
@@ -13,6 +13,11 @@
<p><a href="https://github.com/jakejarvis/dark-mode-example" target="_blank" rel="noopener">View the source code</a> or <a href="https://jarv.is/notes/dark-mode/" target="_blank" rel="noopener">read the post</a>.</p>
<script src="main.js"></script>>
<script src="../dist/index.js"></script>
<script>
window.darkMode({
toggle: document.querySelector(".dark-mode-toggle"),
});
</script>
</body>
</html>
-5
View File
@@ -1,5 +0,0 @@
import darkMode from "../index.js";
darkMode({
toggle: document.querySelector(".dark-mode-toggle"),
});