Plugins are used to extend ventas in a similar way to entity types.
(ventas.plugin/register!
:awesome
{
;; will be used in the administration
:name "A plugin for adding _awesome_ to your store"
;; same semantics as the fixtures of entity types
:fixtures
(fn []
[{:category/name (ventas.entities.i18n/get-i18n-entity
{:en_US "Awesome products"})}])
;; same semantics as the migrations of entity types
:migrations
[{:db/ident :awesome/entity
:db/valueType :db.type/ref
:db/cardinality :db.cardinality/one}]})
The idea is that independent authors should be able to distribute functionality that users can include in their stores.
The plugin above could be uploaded to Clojars and then require
d in the store project.
FAQ:
You can use the lein template to begin with plugin development.
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close