Marketplace / Composer.json
Note: You are currently reading the documentation for Bolt 3.7. Looking for the documentation for Bolt 5.2 instead?
Each extension or theme requires a composer.json, which holds some important meta data.
That meta data includes information like name, author, keywords, icon, screenshots and so on.
For extensions, it also includes information about the extension class and the public assets folder.
Example composer.json for Themes¶
{
"name": "dropbear/jungle",
"description": "Full responsive blog template in jungle style",
"type": "bolt-theme",
"keywords": ["jungle", "responsive", "blog", "modern"],
"require": {
"bolt/bolt": "^3.0"
},
"license": "MIT",
"authors": [
{
"name": "Kenny Koala",
"email": "kenny@dropbear.com.au"
}
],
"extra": {
"bolt-icon": "icon.png",
"bolt-screenshots": [
"screenshots/teaser.png",
"screenshots/screenshot1.png",
"screenshots/screenshot2.png"
]
}
}
Example composer.json for Extensions¶
{
"name": "dropbear/koala-catcher",
"description": "Catching koalas like a Pro",
"type": "bolt-extension",
"keywords": ["dropbear", "dangerous"],
"require": {
"bolt/bolt": "^3.0"
},
"license": "MIT",
"authors": [
{
"name": "Kenny Koala",
"email": "kenny@dropbear.com.au"
}
],
"autoload": {
"psr-4": {
"Bolt\\Extension\\DropBear\\KoalaCatcher\\": "src"
}
},
"extra": {
"bolt-assets": "web",
"bolt-class": "Bolt\\Extension\\DropBear\\KoalaCatcher\\KoalaCatcherExtension",
"bolt-icon": "icon.png",
"bolt-screenshots": [
"screenshots/teaser.png",
"screenshots/screenshot1.png",
"screenshots/screenshot2.png"
]
}
}
General Required Fields¶
namedescriptiontypekeywordsbolt/bolt: in therequiresection, must be a version constraint of Boltlicenseauthors: at least one author item
Additional Extension Required Fields¶
autoloadsection for the extension classbolt-classin theextrasection
General Optional Fields¶
bolt-iconin theextrasectionbolt-screenshotsin theextrasection
Edit this page on GitHub
Couldn't find what you were looking for? We are happy to help you in the forum, on Slack or on Github.
Couldn't find what you were looking for? We are happy to help you in the forum, on Slack or on Github.