Hi Mario thanks for that.
I've a look at zlib, and it seems simple enough to include manually a JS. Any idea about the CSS ? would you use "require" also for the css ? (ok... I have not tried it yet...) I'm developing a plugin https://github.com/sebastianovide/GettingSebDoing for personal use which is a fork of GSD5. I was thinking to add "chartist" to the package.json and then add it to the build command. Surely I could just add a "cp" command in the build script. I was thinking if perhaps adding the link to the js library in tiddlywiki.files would result in tiddlywiki add it at build time. So just wondering if there is better ("cleaner") way of doing it.... On Monday, 29 June 2020 19:45:41 UTC+1, PMario wrote: > > Hi Sebastian, > > I didn't test the lib! > > I'm not sure, how you intend to use / call the chartist functions. .. But > if you want to access the API within a TW file, you'll need to follow a > specific pattern. > So TW will be able to use the lib with node _and_ within a file TW. > > It seems chartist has a dist directory at github. That should make it > easy. https://github.com/gionkunz/chartist-js/tree/develop/dist > > You only need to include chartist.min.js and chartist.css (I'd go with > the human readable CSS)since it seems there are no other dependencies, > which is nice! > > If you have a closer look at the TW plugin zlib: > https://github.com/Jermolene/TiddlyWiki5/tree/master/plugins/tiddlywiki/jszip > <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2FJermolene%2FTiddlyWiki5%2Ftree%2Fmaster%2Fplugins%2Ftiddlywiki%2Fjszip&sa=D&sntz=1&usg=AFQjCNGMVUdAawjxpc1YmXoiGmDGsbDHyQ> > > > It contains a "files" subdirectory, which list the 3rd party files. .. > your config should be very similar. Have a close look at tiddlywiki.files > > You also need the plugins.info, that is needed, so TW can extract and > load the library. > > If you look at startup.js in the jszip lib, you'll see, how the 3rd party > lib can be accessed as a TW plugin. It's as simple as calling require(). > > If you can be more specific, what you want to achieve, it would be easier > to help. > > Hope that helps for the beginning. > > -mario > > > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/fd127bbe-73d5-475a-956b-1e08014c0d1ao%40googlegroups.com.

