Fork me on GitHub
#scittle
<
2023-04-22
>
borkdude09:04:28

@daslu @alandipert I've noticed the desire to make custom plugins for scittle is growing. For #C029PTWD3HR (SCI scripting env on Node.js) I've supported this better through the use of exposing features (libraries that will be compiled through Closure for use with SCI) on the classpath. The nbb build script will detect these features, merge shadow-cljs compilation configuration etc and then you will just get extra .js files as output, on top of what the default nbb produces. This allows you to add to nbb without changing anything to its code. See https://github.com/babashka/nbb/blob/main/doc/dev.md#features and https://github.com/babashka/nbb-features One project using this is https://github.com/logseq/nbb-logseq which is nbb + logseq-specific features, such as datascript. Such a thing could also be made for scittle such that: ā€¢ You can add the libraries you want (without me supporting and distributing them in the normal scittle distribution, you'll just host your own version on npm / cdn) ā€¢ Without changing anything to scittle itself

šŸ˜ 10
šŸ‘€ 6
alandipert17:04:14

agreed, sign me up. does it make sense for me to continue the hoplon plugin for scittle? or should i be pursuing something along these lines instead?

borkdude17:04:22

@alandipert it still makes sense as it will still make creating the build-time feature easier

borkdude17:04:12

Until the above is realized, maintaining a fork of scittle and publishing it that way also works of course, The above mentioned is just to make that process easier

šŸ‘ 4
thanks3 2
cldwalker13:04:33

The enhanced nbb for logseq has been working great. Release process is easy with a couple bb tasks - https://github.com/logseq/nbb-logseq#release-process @alandipert Heyo from bullcity!

šŸ‘‹ 2
šŸ‘€ 2
borkdude15:05:07

Made the issue and started digging into it: https://github.com/babashka/scittle/issues/58

ā¤ļø 1
metal 1
borkdude19:05:13

I ported the nbb build script to scittle to allow making custom plugins for custom builds. A demo project is here which allows you to add datascript as a scittle plugin. https://github.com/babashka/scittle/tree/main/plugins/demo Please give it a spin! We could add as many libs to plugins as we like. You can also build plugins outside of scittle's repo, they are just dependencies you add to bb.edn. If there are over time clear enough use cases some plugins can go into the "normal" distribution, but it's not difficult to compile your own distribution of scittle and push it to npm and use vs jsdelivr etc.

metal 9
borkdude19:05:36

If you have any feedback, let me know

Daniel Slutsky13:05:34

Thanks, @U04V15CAJ! Is the demo above intended to be an example user-side project which is using scittle and one of its plugins (datascript)? Does it mean that now, to use scittle with plugins, the user will need their own build setup?

borkdude13:05:52

plugin meaning: something that is not part of the regular scittle distribution

borkdude13:05:19

so instead of forking scittle you can now use this build setup and just upgrade scittle without making changes to the forked scittle code

Daniel Slutsky13:05:11

are we encouraged to add Pull Requests with plugins to the scittle repo? currently I am using these in the scittle fork: https://github.com/mentat-collective/MathBox.cljs https://github.com/mentat-collective/emmy https://github.com/cnuernber/tmdjs

borkdude13:05:44

you're encouraged if you want your plugins to be visible with others, since they're in the same place, but you're not forced to

Daniel Slutsky13:05:06

makes sense, thanks!

šŸ‘ 1
borkdude19:05:13
replied to a thread:@daslu @alandipert I've noticed the desire to make custom plugins for scittle is growing. For #C029PTWD3HR (SCI scripting env on Node.js) I've supported this better through the use of exposing features (libraries that will be compiled through Closure for use with SCI) on the classpath. The nbb build script will detect these features, merge shadow-cljs compilation configuration etc and then you will just get extra `.js` files as output, on top of what the default nbb produces. This allows you to add to nbb without changing anything to its code. See https://github.com/babashka/nbb/blob/main/doc/dev.md#features and https://github.com/babashka/nbb-features One project using this is https://github.com/logseq/nbb-logseq which is nbb + logseq-specific features, such as datascript. Such a thing could also be made for scittle such that: ā€¢ You can add the libraries you want (without me supporting and distributing them in the normal scittle distribution, you'll just host your own version on npm / cdn) ā€¢ Without changing anything to scittle itself

I ported the nbb build script to scittle to allow making custom plugins for custom builds. A demo project is here which allows you to add datascript as a scittle plugin. https://github.com/babashka/scittle/tree/main/plugins/demo Please give it a spin! We could add as many libs to plugins as we like. You can also build plugins outside of scittle's repo, they are just dependencies you add to bb.edn. If there are over time clear enough use cases some plugins can go into the "normal" distribution, but it's not difficult to compile your own distribution of scittle and push it to npm and use vs jsdelivr etc.

metal 9