Skip to content

How did you integrate the js scripts into the html page? #213

Answered by nroutasuo
45675 asked this question in Q&A
Discussion options

You must be logged in to vote

You will see a few script tags at the bottom of the original .html file, but most of the tags in the @Toby222 's screenshot are generated. I use a JavaScript module loader called RequireJS. This is what refers to it in the html file:
<script data-main="src/config" src="lib/requirejs/require.min.js"></script>

This project was started a long time ago and JavaScript evolves quite fast, so I'm not sure this approach is the way to go today. I think in modern JavaScript it's possible to do something similar without a 3rd party library like Require. But it works well for Level 13.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@45675
Comment options

Answer selected by 45675
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants