tmedwards / tweego

Tweego is a free (gratis and libre) command line compiler for Twine/Twee story formats, written in Go.
https://www.motoslave.net/tweego
BSD 2-Clause "Simplified" License
124 stars 23 forks source link

Sugarcube typed.js addon doesn't work with tweego unless you make a script tagged passage #9

Closed freezerburn26 closed 4 years ago

freezerburn26 commented 4 years ago

The typed addon only works with tweego if you make a .twee and give it the [script] tag.

Including the .js file does nothing.

tmedwards commented 4 years ago

JavaScript files, either manually specified or found within a specified directory, that are part of a project's normal sources are compiled into the data chunk in exactly the same way as script-tagged passages. Ensure you aren't confusing normal sources with module sources.

Assuming you're referring to the Typed.js integration module from SugarCube's website, how exactly are you compiling it into your project? The .js, and .css, files from the package are meant to be used within SugarCube's scope, meaning that they need to be compiled as part of your normal sources—i.e., do not use Tweego's module option (-m SRC, --module=SRC) to include them as that bundles them external to SugarCube.

freezerburn26 commented 4 years ago

Hello,

This does work. It might be a good idea to mention this in the docs somewhere.