0.0.9 • Published 6 years ago
dj-hello-world-iife v0.0.9
DJ Hello World - IIFE
Simple demonstration of packaging for IIFE using single project.
Description
This project attempts to use one source code to distribute multiple packages. This project is compiled for IIFE. For more detail check the github repo.
Using the Package
Before anything we should install the dependencies:
npm i dj-hello-world-iife
Via script tag
Write a html file importing the script.
<script src="node_modules/dj-hello-world-iife/index.js"></script>
After importing the script you can use the global variable DJ_Hello_World
.
<script>
let world = new DJ_Hello_World.World();
world.sayHello();
</script>
Check the printed messages in the console from browser's Developer Tools tab.
0.0.9
6 years ago