Skip to content

HTML Setup

paige edited this page Nov 14, 2023 · 6 revisions

**DEPRECATED**

Importing

Note: Some things may not function as intended because of HTML spaghetti
You can use a website to import the code into your html file. For this example I'll use cdn.jsdelivr.net because it's the main one I've gotten to work

<!DOCTYPE html>
<html>
	<head>
		<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/nuttmegg/stews/index.js"></script>
	</head>
</html>

Using

Once you have it imported you can actually start using it for things in scripts

<!DOCTYPE html>
<html>
	<head>
		<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/nuttmegg/stews/index.js"></script>
	</head>
	
	<body>
		<script>
			let thing = new Stew( ["a", "b", "c"] );
			
			document.write(thing[1]); // "b"
		</script>
	</body>
</html>