It is possible to create your own package and use them in your apps. This will allow save a lot of developing time importing already built features into your app. For example a package may include the logic to integrate an external service easily with just the installation and setting some required configuration.
There are three steps to follow in order to create a new package:
- Create a new package
- Register the package in Slingr at the developer portal
These steps will be detailed in the following sections.
Create a new package
The first thing you will need to do is creating a new package. We recommend you to follow this guide Develop a package
Register your package
Once the package has been implemented, it is required to register it on the platform so it is available to your apps or, if you decide so, make it public so other people can also use it.
In the Developer Portal
, in Packages
section, developers are able to see the packages they can manage, allowing
to register new packages, update them or disable them.
When you register a new package, this is the information you need to provide:
Label
: the human-friendly name of the package.Name
: the name you will give to the package. The name cannot be modified later and must be lower case and match with the name used in the package definition file (package.json
).Repository
: this will be the Git URL of the repository. The repository needs to be public, have as main branchmaster
and at least one tag with a valid format. If it is private, today we only support GitHub repositories and you need to give read access to the repository to the userslingr-builder
. The URL must be inSSH
format likegit@github.com:workspace_id/repo_name.git
.Folder
: in case the package is under one specific folder. In most cases will be empty.Visibility
: this could be private or public. If it is public any app will be able to use it. If it is private, you will be able to indicate which apps can access the package and it will be available for them.
When you register a new package it is associated to the developer that registered it, but it is possible to transfer the ownership to another account if needed through a tool available in the package edition section.
Once the package gets registered, the platform will find new versions of the package automatically (which are tags with
the corresponding format v1.15.1
for example). You are able to update the version with an action in the developer portal. Every time a new tag
is pushed to the repo, the versions should be updated this way
It is possible to change the icon of the package in the details of the package. The icon requires to be: PNG
format,
size 48x48px
.
It isn’t possible to delete packages. You can disable them, which means that they cannot be used on any app any longer.