exopublish
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

Exopublish

A Publishing tool for Exosite Widget JavaScript and Lua script files.

What it does

Using a config file containing mappings of widget JavaScript or Lua script files to the corresponding Exosite identifiers (e.g. Resource-Id), it can upload the script files to the appropriate location in Exosite.

Why Exopublish?

Initially it was a part of Exoedit but it turned out that the publishing features might also be usable to be used from code, for example for automated deployment.

Installation

npm install exopublish

Usage

var exopublish = require("exopublish");

// Get the relative paths of all configured domain widget script files:
exopublish.getDomainWidgets().then(function(paths) {
    // do something with paths (which is an array of paths to the files)
});

// Get the relative paths of all configured portal widget script files:
exopublish.getPortalWidgets().then(function(paths) {
    // do something with paths (which is an array of paths to the files)
});

// Get the relative paths of all configured Device Lua script files:
exopublish.getDeviceLuaScripts().then(function(paths) {
    // do something with paths (which is an array of paths to the files)
});

// Publish a script to exosite:
exopublish.publishOne(
    "<path as written in the config file>", 
    "<code to publish>", 
    "exositeUser@example.com", 
    "myPassword")
    .then(function(){
        console.log("Published the script");
    });

Readme

Keywords

Package Sidebar

Install

npm i exopublish

Weekly Downloads

0

Version

0.1.2

License

MIT

Last publish

Collaborators

  • teggno