sketchapp-json-plugin
sketchapp-json-plugin copied to clipboard
Add `version` configuration and update tooling
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
versionparameter forfromSJSONDictionaryandfromSJSONfunctions will now aloow plugin authors to specify sketch version caps, if they so choose. Otherwise use999to allow all sketch versions.
Changes
- Added
eslintmake sure code is always following consistant rules, - Added
prettieralong withlint-stagedto make sure all code is formatted and styled consistantly across all code updates - Added new
versionparameter tofromSJSONDictionaryandfromSJSONfunctions - 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
generateIdfile as it wasn't used anywhere
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 🍻