GithubHelp home page GithubHelp logo

skpm - Sketch Plugin Manager


A utility to create, build and publish sketch plugins.

Installation

Important: Node.js > V6.x is a minimum requirement. You also need the command line tools installed.

npm install -g skpm

Usage

skpm create my-plugin

The above command pulls the template from skpm/skpm, prompts for some information, and generates the project at ./my-plugin/.

Create a new plugin

skpm create <plugin-name>

--name        The plugin display name.
--cwd         A directory to use instead of $PWD.
--force       Force option to create the directory for the new app. [boolean] [default: false]
--template    The repository hosting the template to start from.    [string]  [default: skpm/skpm]
--git         Initialize version control using git.                 [boolean] [default: true]
--install     Installs dependencies.                                [boolean] [default: true]
A note on templates

The purpose of official skpm plugin templates are to provide opinionated development tooling setups so that users can get started with actual plugin code as fast as possible. However, these templates are un-opinionated in terms of how you structure your plugin code and what libraries you use in addition to skpm.

Current available official templates include:

💁 Tip: Any Github repo with a 'template' folder can be used as a custom template: skpm create <project-name> --template=<username>/<repository>

Build the plugin

Once the installation is done, you can run some commands inside the project folder:

npm run build

To watch for changes:

npm run watch

Additionally, if you wish to run the plugin every time it is built:

npm run start

View the plugin's log

To view the output of your console.log, you have a few different options:

  • Use the sketch-dev-tools
  • Open Console.app and look for the sketch logs
  • Look at the ~/Library/Logs/com.bohemiancoding.sketch3/Plugin Output.log file

Skpm provides a convenient way to do the latter:

skpm log

  -f, -F        The `-f` option causes tail to not stop when end of file is
                reached, but rather to wait for additional data to be appended
                to the input.                       [boolean] [default: "false"]
  --number, -n  Shows `number` lines of the logs.                       [number]

Publish the plugin on the registry

To publish a new version of the plugin to the registry:

skpm publish <new-version> | major | minor | patch | premajor | preminor | prepatch | prerelease

  --repo-url          Specify the repository URL (default to the one specified
                      in package.json).                                 [string]
  --skip-release      Do not create a release on GitHub.com.           [boolean]
  --open-release, -o  Open the newly created release on GitHub.com.    [boolean]
  --skip-registry     Do not publish to the plugins registry if not already
                      present.                                         [boolean]
  --download-url      Specify the new version's download URL (default to the
                      asset of the release created on GitHub.com).      [string]

The exact order of execution (without options) is as follows:

  • Run the preversion script
  • Bump version in package.json as requested (patch, minor, major, etc).
  • Run the version script
  • Commit and tag
  • Run the postversion script.
  • Run the prepublish or build script
  • Zip the folder specified in the main field
  • Create a draft release on GitHub
  • Upload the zip to GitHub
  • Publish the release
  • Remove the zip
  • Check the sketchplugins/plugin-directory repo to see if the plugin is already there. If not, open a PR to add it.

License

MIT

skpm's Projects

buffer icon buffer

A drop in replacement for the buffer NodeJS module

console icon console

A drop in replacement for the console module enable system logging

dialog icon dialog

A Sketch module for displaying native system dialogs for opening and saving files, alerting, etc.

events icon events

:ear::lips: Drop-in replacement for the events NodeJS package

fs icon fs

Drop-in replacement for the fs NodeJS package

os icon os

Drop-in replacement for the os NodeJS package

path icon path

A drop in replacement for the path NodeJS module

process icon process

A drop in replacement for the nodejs process global

querystring icon querystring

A drop-in replacement for the querystring NodeJS package

sketch-dev-tools icon sketch-dev-tools

See your plugin logs, inspect the state of Sketch documents, explore actions, and more!

sketch-utils icon sketch-utils

A collection of useful functions to deal with Sketch's CocoaScript bridge

skpm icon skpm

💎📦 A utility to build and publish Sketch plugins

skpm-gui icon skpm-gui

📦💎A GUI for skpm, the Sketch Plugin Manager

stream icon stream

A drop-in replacement for the stream NodeJS package

timers icon timers

:clock1: A drop-in replacement for the timers nodejs module

util icon util

A drop-in replacement for the util NodeJS module

website icon website

:globe_with_meridians: skpm website

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.