Important: Node.js > V6.x is a minimum requirement.
npm install -g skpm
skpm create my-plugin
The above command pulls the template from skpm/skpm, prompts for some information, and generates the project at ./my-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
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:
skpm/skpm- The simplest possible plugin setup. (default)
skpm/with-prettier- A plugin setup featuring linting with ESLint and code formatting with Prettier.
💁 Tip: Any Github repo with a 'template' folder can be used as a custom template:
skpm create <project-name> --template=<username>/<repository>
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 watch -- --run
To view the output of your
console.log, you have a few different options:
Console.appand look for the sketch logs
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 isreached, but rather to wait
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. [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
The exact order of execution (without options) is as follows:
versionin package.json as requested (