0.1.4 • Published 7 years ago

sketch-module-update v0.1.4

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

sketch-module-update

Downloads per month Latest version

A sketch module to check if an plugin's update is available on Github and prompt the user to download it.

Usage

update.js:

import update from 'sketch-module-update'

const repoFullName = 'mathieudutour/git-sketch-plugin'

const optionalOptions = {
  timeBetweenChecks: 24 * 60 * 60 * 1000, // 1 day by default
  title: 'A new MyPluginName plugin version is available!'
}

export default update(repoFullName, optionalOptions)

manifest.json:

...
"commands": [
  {
    "name": "update",
    "identifier": "update",
    "script": "update.cocoascript",
    "handlers" : {
      "actions": {
        "OpenDocument": "onRun"
      }
    }
  },
...

API Documentation

Options available:

namedefault
timeBetweenChecks24 * 60 * 60 * 1000
prefKeyrepoFullName + '-update-last-check'
customizeAlertfunction (context, alert) {}
title'A new ' + repo + ' plugin version is available!'
okButtonDownload update
laterButtonRemind me later

Installation

sketch-module-update is available from npm.

npm install --save sketch-module-update

Compatibility

sketch-module-update requires Sketch >= 3.4 (not with the sandboxed version ie from the App Store).

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago