scittle/plugins/demo
Michiel Borkent cd4ac5c74e minor
2023-05-03 22:24:34 +02:00
..
resources/public Fix #58: build system (#59) 2023-05-03 21:27:54 +02:00
bb.edn minor 2023-05-03 22:24:34 +02:00
deps.edn Fix #58: build system (#59) 2023-05-03 21:27:54 +02:00
README.md docs 2023-05-03 21:46:24 +02:00
shadow-cljs.edn Fix #58: build system (#59) 2023-05-03 21:27:54 +02:00

Demo

A demo project of a custom scittle build.

This demo project uses the scittle.datascript plugin which isn't part of the normal scittle distribution.

To produce release .js files, run: bb release.

See:

  • bb.edn with
    • :deps which includes:
      • a dependency on the scittle.build project to build scittle + custom features
      • zero or more plugin dependencies
      • helpers like static file server
    • development :tasks. Run bb dev for development and bb release to produce release artifacts.
  • deps.edn: this only contains a dependency on scittle itself

Available plugins are in the plugins directory inside the top level directory of this repo.

Writing a plugin involves writing

  • SCI configuration (this can be shared via the sci.configs project too)
  • Adding a scittle_plugin.edn file on the plugin's classpath (e.g. in the src directory). This EDN file contains:
    • :name, name of the plugin
    • :namespaces: the namespaces exposed to SCI
    • :js: the name of the produced .js module file
    • :shadow-config: the shadow-cljs configuration specific to this plugin
  • A .cljs file with an init function which calls scittle/register-plugin!.