leaonline/easy-speech

How can I add this library as a script tag?

marcusx2 opened this issue · 5 comments

I want to add this library as a script tag on the html, I don't use npm. How can I do it? Something like
<script src="./easy-speech.min.js"></script>
Thanks!

Hi @marcusx2 do you want to have it on your server or do you want to use a CDN?

Currently the whole easy speech is only a single file, index.js (all the rest is development setup).

If you want to include it in your website and host it on your server you can simply download the repo as .zip and extract the index.js file, rename it to easy-speech.js include as in your given example.

It's a client side application. There is no server or anything. Does it work for client side web apps?

So how do you deliver the html/js to the browser if not loaded from a server? Anyways even if you just include it locally you can use the method, described above.

This issue is probably closed.

Of course that, in order to use the include method @marcusx2 said and @jankapunkt elaborated, developer will have to remove the last line export default EasySpeech and minify the library himself.

Otherwise browser will experience that Uncaught SyntaxError: Unexpected token 'export'

@hudsantos thanks for the hint. I opened a new issue for it: #107