mirror of
https://github.com/jakejarvis/dark-mode.git
synced 2025-06-27 16:45:40 -04:00
bundle into a UMD script via webpack for both browser & node
This commit is contained in:
@ -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>
|
||||
|
@ -1,5 +0,0 @@
|
||||
import darkMode from "../index.js";
|
||||
|
||||
darkMode({
|
||||
toggle: document.querySelector(".dark-mode-toggle"),
|
||||
});
|
Reference in New Issue
Block a user