/liquify-schema

📖 JSON Schema stores used in Liquify and the vscode-liquid extension.

Primary LanguageJavaScriptOtherNOASSERTION

@liquify/schema

This module contains JSON Schema Stores which are used by the Liquify IDE extension. This package is available on the npm registry for modules consumed within the project.

The sections schema store that was written for the Shopify Liquid variation is not MIT. Please ask permission before using, borrowing logic and/or adapting it into your projects. Unless you have consent, you cannot implement the structures.

Note  This only applies to the section schema store - all other schemas are MIT.

Why?

Liquify supports completions and validations for JSON files and embedded regions. Projects using the Liquify IDE tool require these stores to provide intellisense features.

Usage

If you are using the Liquify extension (vscode-liquid) these stores will be provided automatically. In cases where you require reference to the stores explicitly, then you can implement them using the unpkg CDN.

When referencing a schema, it is assumed that your text editor supports JSON $schema properties.

{
  "$schema": "https://unpkg.com/@liquify/schema/{store}"
}

Replace the {store} portion with the appropriate Schema Store below.

Internal Usage

Using the module within the workspace points main in the root package.json to the /package directory.

Stores

Below the available schema stores provided in this module.

JSON Schema used for providing intellisense features in .liquidrc, .liquidrc.json files. The stores are also used in vscode workspace settings via the liquid.* property.

JSON Schema used for providing intellisense features for .esthetic files but also on the format property in the .liquidrc file. The stores are also used for on the package.json esthetic field and vscode workspace settings via the liquid.format.* property.

JSON Schema used for providing intellisense features for Shopify OS 2.0 template files. The stores are for Shopify theme environments.

LICENSE IS IMPOSED ~ USAGE REQUIRES PERMISSION

JSON Schema used for providing intellisense features within the Liquify Liquid Language Server package. The stores are passed to {% schema %} embedded regions of the Shopify Liquid variation.

LICENSE IS IMPOSED ~ USAGE REQUIRES PERMISSION

JSON Schema used for providing intellisense features for Shopify Section Groups. The stores are for Shopify theme environments.

LICENSE IS IMPOSED ~ USAGE REQUIRES PERMISSION

JSON Schema used for providing intellisense features within settings_schema.json files. The stores are for Shopify theme environments.

LICENSE IS IMPOSED ~ USAGE REQUIRES PERMISSION

JSON Schema used for providing intellisense features within settings_data.json files. The stores are for Shopify theme environments.

LICENSE IS IMPOSED ~ USAGE REQUIRES PERMISSION

JSON Schema used for providing intellisense features within vscode workspace and user settings. The stores are injected into the vscode-liquid extension configuration field of the containing package.json file.

JSON Schema used for the data references available in the theme-liquid-docs repository.

TODO

  • Tags

Contributing

The stores are written using Draft 7 of the JSON Schema specification. The markdownDescription field links to Markdown files contained in the stores/descriptions directory. Descriptions and generated and injected when running pnpm build and are rendered in hover and completion descriptions.

Publishing

The distributed package is published to the NPM Registry in an isolated manner. See the package.json scripts runners for prepublishOnly and prepublish for a contextual understanding of this.

Testing

The test directory links to generated stores in the package directory. The containing test/live directory is where stores are tested against CDN linked variations.

Author

🥛 Νίκος Σαβίδης