sketchapp-json-plugin icon indicating copy to clipboard operation
sketchapp-json-plugin copied to clipboard

Add `version` configuration and update tooling

Open larsonjj opened this issue 8 years ago • 1 comments

Overview

This PR updates much of the development tooling to help with keeping code consistent, accurate, and easily consumable. It adds eslint, prettier, and consumable flow typing. It also removes unused code: generateId and adds version parameter to fromSJSONDictionary and fromSJSON functions.

Going forward, the added benefits are as follows:

  • Consumers of this repo will be able to get flow typings from the npm package directly.
  • Contributors won't have to worry about code styling as much, because editorconfig, prettier, and eslint configurations will make sure all code committed is consistent.
  • New version parameter for fromSJSONDictionary and fromSJSON functions will now aloow plugin authors to specify sketch version caps, if they so choose. Otherwise use 999 to allow all sketch versions.

Changes

  • Added eslint make sure code is always following consistant rules,
  • Added prettier along with lint-staged to make sure all code is formatted and styled consistantly across all code updates
  • Added new version parameter to fromSJSONDictionary and fromSJSON functions
  • Updated flow files and configuration to be better consumed by other authors who use this lib. Based on: https://javascriptplayground.com/blog/2017/01/npm-flowjs-javascript/
  • Updated documentation to reflect changes.
  • Deleted generateId file as it wasn't used anywhere

larsonjj avatar Sep 24 '17 21:09 larsonjj

Hey @darknoon,

Planning on merging this to master soon-ish (today or tomorrow). Not sure if you had a chance to review it yet, but that would be greatly appreciated 👍

Once merged, a new npm build v0.2.0 would be super useful as well. If you are busy, feel free to add me as a collaborator on npm and I can take care of publishing it.

Cheers 🍻

larsonjj avatar Oct 04 '17 16:10 larsonjj