2019-01-19, 15:46
Addon Builder scripts
Addon build scripts for KODI. A collection of usefull tools and scripts so you can easily build, package and install your addons for KODI.
Main features
Start your local addon project by creating a new directory and then setup npm in that folder:
Install kodi-addon-builder in your project:
After developing your scripts or skins use these node commands:
You can also use the bin command 'addon' through NPM instead of executing the cli.js file.
NPM Scripts
To make it a bit easier, an example of scripts block for your own package.json:
Questions or issues
Use the github issues page for this project or follow this thread.
>> Changelog
Get it here:
https://www.npmjs.com/package/kodi-addon-builder
Addon build scripts for KODI. A collection of usefull tools and scripts so you can easily build, package and install your addons for KODI.
Main features
- Build - Create a clean dist folder with only the files needed for distribution.
- Versioning - Use semver versioning for your addon and package.json.
- Package - Create versioned zipped packages of your addon so that you can easily distribute and install it.
- Install - Directly deploy your addon into your local Kodi instance for testing.
- Repository - Update your addon in your own Kodi repository and update all files and references (xml, html etc)
Start your local addon project by creating a new directory and then setup npm in that folder:
bash:npm init
Install kodi-addon-builder in your project:
bash:npm install kodi-addon-builder --save-dev
After developing your scripts or skins use these node commands:
Important: All paths to directories should end with a trailing slash.bash:
Commands:
cli.js build Build the addon
cli.js checksum Generate checksum files (.md5) based on input file.
cli.js install Install the addon in local Kodi
cli.js package Package the addon into a zip [aliases: pack]
cli.js repository Package addon and update it in your repository folder
cli.js versioning Get and set version for the addon
Defaults
--packagename, -n Name of the package [required]
Build folders
--src, -s The source files folder to get files from. [default: "./src/"]
--dist, -d The folder for the build result or distributable files [default: "./dist/"]
Options:
--version Show version number [boolean]
--verbose, -v Apply verbose output [default: false]
--help Show help [boolean]
You can also use the bin command 'addon' through NPM instead of executing the cli.js file.
NPM Scripts
To make it a bit easier, an example of scripts block for your own package.json:
json:
"scripts": {
"build": "addon build",
"build-patch": "addon versioning --semver patch && npm run build",
"build-minor": "addon versioning --semver minor && npm run build",
"build-major": "addon versioning --semver major && npm run build",
"build-pack": "npm run build && addon package",
"build-pack-patch": "npm run build-patch && addon package",
"build-pack-minor": "npm run build-minor && addon package",
"build-pack-major": "npm run build-major && addon package",
"build-publish": "npm run build && addon repository",
"build-publish-patch": "npm run build-patch && addon repository",
"build-publish-minor": "npm run build-minor && addon repository",
"build-publish-major": "npm run build-major && addon repository",
"build-install": "npm run build && addon install",
"build-install-patch": "npm run build-patch && addon install",
"build-install-minor": "npm run build-minor && addon install",
"build-install-major": "npm run build-major && addon install"
}
Questions or issues
Use the github issues page for this project or follow this thread.
>> Changelog
Get it here:
https://www.npmjs.com/package/kodi-addon-builder