An app that makes it easy to integrate Jasonette extensions into Jasonette projects (for both iOS and Android)
-
Clone this repo
-
npm install
-
npm start
- This is pretty much functional for both iOS and Android.
- But understand that it's still work in progress. There are some bugs that needs fixing, so before you try this out make sure to back up the project.
- If you run into a problem, please open an issue.
Below this point is for people writing extensions, so you can stop reading if you're just going to use JEM and not writing an extension yourself.
- Write an extension following the convention
- Extract out only the extension-related files from your XCode or Android project and put it into a folder. Extensions can ONLY contain one class at a time. Write a separate extension if you want another class. If the features are related you can still fit it into a single class as multiple methods anyway.
- Also add a config file named
jr.json
in your folder. Learn how to write jr.json - Push to your Github
- Go to http://jasonregistry.netlify.com and register your Github repo
- Open the extension manager and you'll see that your extension has been added!
Your jr.json file must be a JSON file which contains the following attributes:
version
: Follows semantic versioning. Must upgrade everytime you make a change to your repo and wish to update the registry with the latest version.name
: This is the name that will be used in the JSON. For example if you set thisconsole
and your main class contains methods nameddebug
orlog
, you can call"type": "$console.debug"
or"type": "$console.log"
actions in your JSON markup.description
: This is the description that will show up on the registry list when you open the extension managerclassname
: This is the main class name that will be linked with thename
attribute above. So if you set the classname attribute asJasonConsoleAction
, Jasonette will look forJasonConsoleAction
class every time it runs into the JSON markup specified by thename
attribute above.platform
: Specify your platform. Currently can only be"ios"
or"android"
dependencies
: If you're using 3rd party libraries via Cocoapods or gradle, you need to add the lines you would normally use in aPodfile
(for ios) or abuild.gradle
file (for android). For example:"dependencies": [ "compile 'com.segment.analytics.android:analytics:4.+'" ]
, or"dependencies": ["pod 'Analytics', '~> 3.0'"]
Here are some examples:
- iOS
- Android
If you can't register your extension at first, try one more time after a minute.