0.3.0 • Published 4 months ago

weapp-json-schema v0.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

weapp-json-schema

CI NPM VERSION NPM DOWNLOADS LICENSE

JSON schema for weapp.

Usage

You can config in workspace's .vscode/settings.json to use json schemas or config in every specific files.

1. Config in workspace .vscode/settings.json

{
  "json.schemas": [
    {
      "fileMatch": ["project.config.json"],
      "url": "https://unpkg.com/weapp-json-schema/project.schema.json"
    },
    {
      "fileMatch": ["app.json"],
      "url": "https://unpkg.com/weapp-json-schema/app.schema.json"
    },
    {
      "fileMatch": ["**/pages/**/*.json"],
      "url": "https://unpkg.com/weapp-json-schema/page.schema.json"
    },
    {
      "fileMatch": ["sitemap.json"],
      "url": "https://unpkg.com/weapp-json-schema/sitemap.schema.json"
    },
    {
      "fileMatch": ["**/components/**/*.json"],
      "url": "https://unpkg.com/weapp-json-schema/component.schema.json"
    }
  ]
}

2. Use json schema in specific file:

Project schema

Config in your project.config.json:

{
  "$schema": "https://unpkg.com/weapp-json-schema/project.schema.json",
}

App schema

Config in your app.json:

{
  "$schema": "https://unpkg.com/weapp-json-schema/app.schema.json",
}

Page schema

Config in your <page_name>.json:

{
  "$schema": "https://unpkg.com/weapp-json-schema/page.schema.json",
}

Sitemap schema

Config in your sitemap.json:

{
  "$schema": "https://unpkg.com/weapp-json-schema/sitemap.schema.json",
}

Component schema

Config in your <component_name>.json:

{
  "$schema": "https://unpkg.com/weapp-json-schema/component.schema.json",
}

Schemas

Refs

Updated At

2024-01-16

License

MIT License © 2022-PRESENT ntnyq

0.3.0

4 months ago

0.2.0

4 months ago

0.1.2

8 months ago

0.1.1

9 months ago

0.1.0

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago