Skip to content

Platform-OS/platformos-tools

Repository files navigation


platformOS logo
platformOS Tools

A comprehensive suite of developer tools for platformOS Liquid development

CI


Table of Contents

Features

  • Syntax Highlighting — Rich syntax support for platformOS Liquid templates
  • Code Formatting — Automatic code formatting with Prettier integration
  • Linting & Diagnostics — Real-time code analysis and error detection
  • IntelliSense — Intelligent code completion and suggestions
  • Language Server — Full LSP implementation for IDE integration
  • Parser — Fast and accurate LiquidHTML parser
  • Graph Analysis — Dependency tracking and code navigation
  • Multi-Environment — Support for Node.js, Browser, and VS Code environments

Quick Start

For CLI Users

Install the platformOS CLI (pos-cli) which includes all the necessary tools:

npm install -g @platformos/pos-cli

The pos-cli automatically includes the linter, formatter, and all other platformOS developer tools from this repository.

For VS Code Users

Install the platformOS Liquid extension from the VS Code marketplace:

code --install-extension platformOS.platformos-check-vscode

For Standalone Tool Integration

If you want to integrate individual tools into your own projects or build pipeline:

# Install prettier plugin for code formatting
npm install --save-dev @platformos/prettier-plugin-liquid

# Install platformOS check for linting
npm install --save-dev @platformos/platformos-check-node

Packages

This monorepo contains a comprehensive suite of tools for platformOS development:

Core Packages

Common utilities, types, and shared functionality used across all packages.

A fast and accurate parser for LiquidHTML templates. Powers all syntax analysis and tooling.

Prettier plugin for automatic code formatting of LiquidHTML templates.

Linting & Analysis

Core linting engine and rule definitions shared across environments.

Node.js implementation of platformOS linter for CLI and build tools.

Browser-compatible version of the linter for web-based editors.

Language Server

Language Server Protocol (LSP) implementation providing IDE features.

Node.js runtime for the language server.

Browser-compatible language server for web IDEs.

Editor Integration

Official VS Code extension for platformOS Liquid development with full IDE support.

Language Server Protocol client for CodeMirror editors.

Utilities

Dependency graph analysis for platformOS projects, tracking relationships between templates and components.

JSONC (JSON with Comments) language support utilities.

Tool for maintaining and updating documentation.

Installation

Prerequisites

  • Node.js 16.x or higher
  • Yarn 1.22.x or higher

For Development

Clone the repository and install dependencies:

git clone https://github.com/Platform-OS/platformos-tools.git
cd platformos-tools
yarn install

Build all packages:

yarn build

Run tests:

yarn test

Development

Project Structure

platformos-tools/
├── packages/           # All packages live here
│   ├── platformos-common/
│   ├── liquid-html-parser/
│   ├── prettier-plugin-liquid/
│   └── ...
├── docs/              # Documentation
└── scripts/           # Build and development scripts

Available Scripts

  • yarn build — Build all packages
  • yarn test — Run all tests
  • yarn format — Format code with Prettier
  • yarn type-check — Type check all packages
  • yarn playground — Start CodeMirror playground
  • yarn dev:web — Start VS Code web extension development

Testing Changes

For VS Code extension development:

  1. Open the repository in VS Code
  2. Press F5 to launch the extension development host
  3. Set breakpoints and debug as needed

For other packages:

yarn workspace @platformos/package-name test

See CONTRIBUTING.md for detailed development guidelines.

Integration

These tools are designed to work together and are integrated into:

  • platformOS CLI (pos-cli) — Official CLI tool for platformOS development
  • VS Code — Through the official extension
  • Prettier — As a formatting plugin
  • CodeMirror — Through the language client package
  • Custom Build Tools — Individual packages can be integrated into any JavaScript build pipeline

Contributing

Contributions to the platformOS Tools repository are highly encouraged.

See CONTRIBUTING.md for more details.

Credits

This project was originally forked from Shopify's Theme Tools. We are grateful to Shopify and the open-source community for creating and maintaining these excellent developer tools. The original project is licensed under MIT, and we continue to maintain this fork under the same license.

License

MIT.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors