Files
flipper/website/package.json
Anton Nikolaev 21c574ac80 "lint" command for flipper-pkg tool
Summary:
Implemented json schema for flipper plugin package.json and used it for validation in "flipper-pkg lint" command.

Nice thing about json schema is that it not only allows to validate json, but also can be referenced using "$schema" property in json so IDEs like VSCode can find it and use for code completion, validation and to show properties documentation. I'm going to deploy the schema as a part of documentation website so it can be referenced as https://fbflipper.com/schemas/plugin-package/v2.json.

Also the "$schema" field can be used instead of "specVersion" to determine the specification according to which the plugin is defined. E.g., if specification version 3 would be created, it will be described in schema https://fbflipper.com/schemas/plugin-package/v3.json, etc.

Reviewed By: passy

Differential Revision: D21228294

fbshipit-source-id: f21351e584ef936a7d6b314436448489691f83a6
2020-04-27 17:34:11 -07:00

30 lines
1.0 KiB
JSON

{
"scripts": {
"copy-schema": "fcli ensure static/schemas/plugin-package && fcli copy ../desktop/pkg/schemas/plugin-package-v2.json static/schemas/plugin-package/v2.json -o",
"start": "yarn copy-schema && yarn generate-uidocs && docusaurus start",
"build": "yarn copy-schema && yarn generate-uidocs && docusaurus build",
"publish-gh-pages": "docusaurus deploy",
"write-translations": "docusaurus write-translations",
"version": "docusaurus version",
"rename-version": "docusaurus rename-version",
"generate-uidocs": "node ./generate-uidocs.js"
},
"devDependencies": {
"@babel/parser": "^7.8.3",
"@docusaurus/core": "^2.0.0-alpha.50",
"@docusaurus/preset-classic": "^2.0.0-alpha.50",
"docblock-parser": "^1.0.0",
"file-cli": "^1.2.0",
"glob": "^7.1.3",
"react-docgen": "^5.2.1",
"classnames": "^2.2.6",
"react": "^16.13.1",
"react-dom": "^16.13.1"
},
"dependencies": {},
"resolutions": {
"minimist": "1.2.3",
"kind-of": "6.0.3"
}
}