ardoq-local-plugins
A utility for developing plugins locally by syncing your updates with the Ardoq API.
Dependencies
- NPM and Node
- Access to an Ardoq organization with plugin development
Setup (from your working directory)
-
Installation: npm install ardoq-local-plugins
-
Create a local version of the plugin, i.e. "plugin.js"
-
Create a config file "config.json":
{
"api": "https://app.ardoq.com/api/",
"apiToken": "YOUR-API-TOKEN",
"org": "YOUR-ORG-KEY",
"pluginPath": "plugin.js",
"pluginData": "plugin.json"
}
Usage (from your working directory)
# Run:
./node_modules/.bin/ardoq-local-plugins
? -- Choose a plugin for local development --
1) Hello (id: pluginidz)
2) Your plugin name (id: pluginidsss)
3) multibar (id: multibar)
Answer: 1
Warning: Local plugin code differs from the remote version!
? -- Choose which file to keep (other will be backed up) --
1) Remote
2) Local
Answer: 1
Overwrote local with remote version.
Detected changes (/Users/anton164/.Trash/sample-plugin2/plugin.js)
Successfully updated the plugin.
Waiting for changes...
Synced local plugin data from remote:
All up-to-date.
Detected changes (/Users/anton164/.Trash/sample-plugin2/plugin.js)
Successfully updated the plugin.
Waiting for changes...
Now you have successfully synced the plugin to the remote and you can start developing locally!
When you're developing locally, run:
./node_modules/.bin/ardoq-local-plugins
to continually update the remote version of the plugin upon local changes.