From 2e4a21e396c7bfed2ac4b4804491555e7ed8dc75 Mon Sep 17 00:00:00 2001 From: JounQin Date: Thu, 1 Feb 2024 09:56:39 +0000 Subject: [PATCH] deploy: e1938a8c6c472a3aab99d3c5204768cd9c7008fb --- 404.html | 2 +- cli/installation/binary.html | 2 +- cli/installation/cargo.html | 2 +- cli/installation/docker.html | 2 +- cli/installation/homebrew.html | 2 +- cli/installation/npm.html | 2 +- cli/introduction.html | 2 +- cli/usage/configuration.html | 2 +- cli/usage/conversion-and-extraction.html | 2 +- cli/usage/formatting.html | 2 +- cli/usage/language-server.html | 2 +- cli/usage/validation.html | 2 +- configuration/developing-schemas.html | 2 +- configuration/directives.html | 2 +- configuration/file.html | 2 +- configuration/formatter-options.html | 2 +- configuration/using-schemas.html | 2 +- editor.html | 2 +- hashmap.json | 2 +- index.html | 2 +- lib/introduction.html | 2 +- lib/javascript.html | 2 +- lib/javascript/lib.html | 2 +- lib/javascript/lsp.html | 2 +- lib/rust/taplo-common.html | 2 +- lib/rust/taplo-lsp.html | 2 +- lib/rust/taplo.html | 2 +- 27 files changed, 27 insertions(+), 27 deletions(-) diff --git a/404.html b/404.html index 207437dd0..d12a2bd34 100644 --- a/404.html +++ b/404.html @@ -14,7 +14,7 @@
Skip to content

404

PAGE NOT FOUND

But if you don't change your direction, and if you keep looking, you may end up where you are heading.
- diff --git a/cli/installation/binary.html b/cli/installation/binary.html index 94786ff1c..bb548429a 100644 --- a/cli/installation/binary.html +++ b/cli/installation/binary.html @@ -18,7 +18,7 @@
Skip to content
On this page

Binary Releases

We pre-compile each release for all major operating systems, these releases can be found on GitHub.

Variations

Taplo offers features — such as the language server — that might not be useful for most use-cases. For this reason we build multiple variations that differ in terms of features.

Default Build

The default build with commonly-used features.

Download

Full Build

The full build contains the following additional features:

Download

Example

bash
curl -fsSL https://github.com/tamasfe/taplo/releases/latest/download/taplo-full-linux-x86_64.gz \
   | gzip -d - | install -m 755 /dev/stdin /usr/local/bin/taplo
- diff --git a/cli/installation/cargo.html b/cli/installation/cargo.html index 53be27bba..eaaad2a40 100644 --- a/cli/installation/cargo.html +++ b/cli/installation/cargo.html @@ -17,7 +17,7 @@
Skip to content
On this page

Cargo

If you have a Rust toolchain installed, you can install Taplo via the taplo-cli crate from crates.io.

sh
cargo install taplo-cli --locked

WARNING

Taplo depends on OpenSSL in order to fetch schemas via HTTPS, you will most likely need the openssl development files to be installed (openssl-dev or openssl-devel on most Linux-based systems).

TIP

Make sure to use --locked if you run into weird compile errors due to incompatible dependencies.

Features

The following features are available:

  • lsp: the language server
  • toml-test: an interface for toml-test
- diff --git a/cli/installation/docker.html b/cli/installation/docker.html index a65a769fb..2053a7e9e 100644 --- a/cli/installation/docker.html +++ b/cli/installation/docker.html @@ -17,7 +17,7 @@
Skip to content
On this page

Docker

Each version of Taplo is also available packaged in a small Docker image on Docker Hub.

sh
docker run tamasfe/taplo --help
- diff --git a/cli/installation/homebrew.html b/cli/installation/homebrew.html index 8df2dc6e2..414282c80 100644 --- a/cli/installation/homebrew.html +++ b/cli/installation/homebrew.html @@ -17,7 +17,7 @@
Skip to content
On this page

Homebrew

Taplo is available on Homebrew under the taplo formula.

sh
brew install taplo
- diff --git a/cli/installation/npm.html b/cli/installation/npm.html index 56c0f1ca0..09af51f0d 100644 --- a/cli/installation/npm.html +++ b/cli/installation/npm.html @@ -17,7 +17,7 @@
Skip to content
On this page

NPM

The default build of Taplo is published to NPM as @taplo/cli. You will need Node.js (tested with 16 and up) in order to use it.

Install with npm

sh
npm install -g @taplo/cli

Install with Yarn

sh
yarn global add @taplo/cli

Install with pnpm

sh
pnpm install -g @taplo/cli

Run without installing

Alternatively you can run it once "without installing":

sh
npx @taplo/cli --help
sh
pnpm dlx @taplo/cli --help
- diff --git a/cli/introduction.html b/cli/introduction.html index 3eb0e90e9..865fb34ae 100644 --- a/cli/introduction.html +++ b/cli/introduction.html @@ -17,7 +17,7 @@
Skip to content
On this page

Introduction

Taplo CLI aims to be an one stop shop tool for working with TOML files via the command line. The features include validation, formatting, and querying TOML documents with a jq-like fashion.

- diff --git a/cli/usage/configuration.html b/cli/usage/configuration.html index 6d2ba8702..80301f787 100644 --- a/cli/usage/configuration.html +++ b/cli/usage/configuration.html @@ -17,7 +17,7 @@
Skip to content
On this page

Configuration

Log Level

Taplo uses the Rust tracing library for configurable logging features and respects the RUST_LOG environment variable. All logs regardless of log level are printed to the standard error output.

In most cases you might wish to disable logging below a certain log level. As an example if you wish to only see error messages, you can do the following:

sh
RUST_LOG=error taplo lint foo.toml

The available log levels:

  • trace
  • debug
  • info
  • warn
  • error

Configuration File

Taplo CLI, by default, searches the current working directory for a Taplo configuration file. This behaviour can be disabled by either supplying --no-auto-config or --config <path> flags. The TAPLO_CONFIG environmental variable can also be used to set the configuration, but the --config flag will take precedence.

- diff --git a/cli/usage/conversion-and-extraction.html b/cli/usage/conversion-and-extraction.html index c77b2e446..2a0dbf29c 100644 --- a/cli/usage/conversion-and-extraction.html +++ b/cli/usage/conversion-and-extraction.html @@ -44,7 +44,7 @@ "baz_field": "baz 2" } ]

More Examples

More examples for query expressions using the same document above:

expressionoutput formatoutput
baz.0.baz_fieldjson"baz 1"
baz.*.baz_fieldjson[ "baz 1", "baz 2" ]
baz.1.baz_fieldvaluebaz 2
baz.1tomlbaz_field = "baz 2"

INFO

The outputs have been slightly modified to fit into the table format.

- diff --git a/cli/usage/formatting.html b/cli/usage/formatting.html index 59ed8cce2..b95686ab8 100644 --- a/cli/usage/formatting.html +++ b/cli/usage/formatting.html @@ -17,7 +17,7 @@
Skip to content
On this page

Formatting

It is possible to format files in-place or via standard i/o.

sh
taplo fmt foo.toml

Or

sh
cat foo.toml | taplo fmt -

INFO

By default Taplo will bail on documents that contain syntax errors to avoid destructive edits, you can use the --force flag to suppress this and try to format the invalid document(s) anyway.

Options

Formatter options are read from the configuration file, on top of that it is possible to specify overrides via the --option flag:

sh
taplo fmt --option indent_tables=false foo.toml

Check

It is possible to check whether the given files are properly formatted via the --check flag. When this flag is supplied, no formatting will be done.

- diff --git a/cli/usage/language-server.html b/cli/usage/language-server.html index f9ed92f19..26fb30b6e 100644 --- a/cli/usage/language-server.html +++ b/cli/usage/language-server.html @@ -17,7 +17,7 @@
Skip to content
On this page

Language Server

The TOML language server can be used via the CLI and it supports communication via standard i/o or TCP.

TIP

The language server is not part of the default builds, and is not available if Taplo was installed via NPM.

Consult the build or installation documentation on how to enable the functionality.

Via Standard i/o

taplo lsp stdio

In this mode Taplo expects messages from the standard input, and will print messages intended for the client to the standard output.

Via TCP

taplo lsp tcp --address 0.0.0.0:9181

The server will listen on the given TCP address.

Multiple clients are not supported.

- diff --git a/cli/usage/validation.html b/cli/usage/validation.html index f333648a9..1555f59d7 100644 --- a/cli/usage/validation.html +++ b/cli/usage/validation.html @@ -17,7 +17,7 @@
Skip to content
On this page

Validation

Taplo supports validation of TOML files, by default it will only look for syntax errors and some semantic errors such as duplicate keys.

sh
taplo check foo.toml

Schema Validation

Taplo supports validation via JSON Schemas (Draft 4).

Using a Specific Schema

sh
taplo check --schema https://example.com/foo-schema.json foo.toml

Using a Schema Catalog

Taplo supports schema catalogs such as the JSON Schema Store for retrieving schemas and matching them to files via file names.

You can enable this by either specifying a catalog via the --schema-catalog flag, or enabling the use of the default catalogs via --default-schema-catalogs.

- diff --git a/configuration/developing-schemas.html b/configuration/developing-schemas.html index dd9f2d817..8cf5f82ce 100644 --- a/configuration/developing-schemas.html +++ b/configuration/developing-schemas.html @@ -68,7 +68,7 @@ ] } } - diff --git a/configuration/directives.html b/configuration/directives.html index 911b6b2d1..0db065d3d 100644 --- a/configuration/directives.html +++ b/configuration/directives.html @@ -18,7 +18,7 @@
Skip to content
On this page

Directives

The behaviour of Taplo can be further customized by comments in TOML files called directives.

All directive comments must follow the following pattern: #:<name> <content>.

A header directive means that it is at the beginning of the document and can only be preceded by other directives or comments.

The schema Directive

It is possible to override the schema for a specific document by using the schema header directive. A relative file path or an URL can be provided.

Example:

toml
#:schema ./foo-schema.json
 foo = "bar"

TIP

Relative paths are relative to the document file, if the file path is not known, Taplo will be unable to find the schema.

WARNING

Multiple schema directives in the same document are not supported and the behaviour is undefined.

- diff --git a/configuration/file.html b/configuration/file.html index 392b7a062..12ce0e8db 100644 --- a/configuration/file.html +++ b/configuration/file.html @@ -30,7 +30,7 @@ [rule.formatting] reorder_keys = true - diff --git a/configuration/formatter-options.html b/configuration/formatter-options.html index d932a3e35..9b8b75cf5 100644 --- a/configuration/formatter-options.html +++ b/configuration/formatter-options.html @@ -17,7 +17,7 @@
Skip to content
On this page

Formatter Options

This page contains a list of formatting options the formatter accepts.

WARNING

In some environments (e.g. in Visual Studio Code and JavaScript) the option keys are camelCase to better fit the conventions. For example align_entries becomes alignEntries.

In some environments (e.g., Visual Studio Code), one needs to reload the extension to let the settings take effect.

optiondescriptiondefault value
align_entriesAlign entries vertically. Entries that have table headers, comments, or blank lines between them are not aligned.false
align_commentsAlign consecutive comments after entries and items vertically. This applies to comments that are after entries or array items.true
array_trailing_commaPut trailing commas for multiline arrays.true
array_auto_expandAutomatically expand arrays to multiple linestrue
array_auto_collapseAutomatically collapse arrays if they fit in one line.true
compact_arraysOmit whitespace padding inside single-line arrays.true
compact_inline_tablesOmit whitespace padding inside inline tables.false
inline_table_expandExpand values (e.g. arrays) inside inline tables.true
compact_entriesOmit whitespace around =.false
column_widthTarget maximum column width after which arrays are expanded into new lines.80
indent_tablesIndent subtables if they come in order.false
indent_entriesIndent entries under tables.false
indent_stringIndentation to use, should be tabs or spaces but technically could be anything.2 spaces (" ")
trailing_newlineAdd trailing newline to the source.true
reorder_keysAlphabetically reorder keys that are not separated by blank lines.false
reorder_arraysAlphabetically reorder array values that are not separated by blank lines.false
allowed_blank_linesThe maximum amount of consecutive blank lines allowed.2
crlfUse CRLF line endings.false
- diff --git a/configuration/using-schemas.html b/configuration/using-schemas.html index 44ea79079..8657ac46b 100644 --- a/configuration/using-schemas.html +++ b/configuration/using-schemas.html @@ -17,7 +17,7 @@
Skip to content
On this page

Using Schemas

JSON schemas can be assigned to TOML documents according to the following in priority order starting with the highest priority:

  1. set manually in the environment, e.g. as a CLI flag or an IDE setting
  2. schema directives at the top of the document
  3. as an URL under the $schema key in the root of the document
  4. configuration file rule
  5. default schema set in the configuration file
  6. contributed by an extension (Visual Studio Code only)
  7. an association based on a schema catalog

Extra root CA certificate could be added by specifying with the TAPLO_EXTRA_CA_CERTS environment. The provided paths must be absolute paths. For example, TAPLO_EXTRA_CA_CERTS=/home/taplo-user/custom-ca.pem

- diff --git a/editor.html b/editor.html index 041ebc59e..cd00828f9 100644 --- a/editor.html +++ b/editor.html @@ -17,7 +17,7 @@
- diff --git a/hashmap.json b/hashmap.json index 55f49de54..075c5aa4c 100644 --- a/hashmap.json +++ b/hashmap.json @@ -1 +1 @@ -{"cli_usage_configuration.md":"42b248ee","cli_installation_binary.md":"0224eb37","configuration_using-schemas.md":"caae3a1d","configuration_directives.md":"ce9f0e1e","configuration_developing-schemas.md":"16493582","cli_installation_homebrew.md":"5f50e331","cli_installation_cargo.md":"a4cda0b7","configuration_formatter-options.md":"ee063f96","cli_installation_npm.md":"1b5fab6b","cli_installation_docker.md":"7cf32942","cli_usage_validation.md":"fcb3e587","cli_introduction.md":"4100ce2e","cli_usage_language-server.md":"8692c440","configuration_file.md":"87510b63","cli_usage_formatting.md":"77fc7e16","cli_usage_conversion-and-extraction.md":"6416bc17","lib_rust_taplo.md":"73d897a5","index.md":"6250977f","lib_introduction.md":"9080576d","lib_javascript.md":"defa08d7","lib_javascript_lsp.md":"f041a4f4","lib_javascript_lib.md":"5f89577f","lib_rust_taplo-common.md":"ddb8596f","lib_rust_taplo-lsp.md":"b95e517b","editor.md":"23a6b4f7"} +{"cli_installation_docker.md":"7cf32942","configuration_developing-schemas.md":"16493582","configuration_directives.md":"ce9f0e1e","configuration_using-schemas.md":"caae3a1d","configuration_formatter-options.md":"ee063f96","cli_installation_homebrew.md":"5f50e331","index.md":"6250977f","cli_installation_npm.md":"1b5fab6b","lib_introduction.md":"9080576d","lib_javascript.md":"defa08d7","cli_introduction.md":"4100ce2e","cli_usage_configuration.md":"42b248ee","configuration_file.md":"87510b63","cli_usage_conversion-and-extraction.md":"6416bc17","cli_usage_language-server.md":"8692c440","lib_javascript_lsp.md":"f041a4f4","lib_javascript_lib.md":"5f89577f","cli_usage_validation.md":"fcb3e587","lib_rust_taplo.md":"73d897a5","lib_rust_taplo-common.md":"ddb8596f","cli_installation_binary.md":"0224eb37","lib_rust_taplo-lsp.md":"b95e517b","cli_installation_cargo.md":"a4cda0b7","cli_usage_formatting.md":"77fc7e16","editor.md":"23a6b4f7"} diff --git a/index.html b/index.html index ae56b17d1..c0b7f35df 100644 --- a/index.html +++ b/index.html @@ -17,7 +17,7 @@
Skip to content
Taplo
A versatile, feature-rich TOML toolkit.
Latest TOML Version
Supports TOML 1.0.0 .
Validation
Validate TOML documents syntactically or against JSON schemas.
Customizable Formatter
Formatter with fine-grained options.
Embeddable Language Server
Embeddable language server with features based on JSON schemas.
Cross-Platform
Available wherever Rust compiles.
- diff --git a/lib/introduction.html b/lib/introduction.html index 5b429e07d..d73b15ae6 100644 --- a/lib/introduction.html +++ b/lib/introduction.html @@ -17,7 +17,7 @@
Skip to content
On this page

Introduction

Taplo aims to be easily embeddable into existing software of varying programming languages and environments.

- diff --git a/lib/javascript.html b/lib/javascript.html index 2b5049398..295e8413f 100644 --- a/lib/javascript.html +++ b/lib/javascript.html @@ -17,7 +17,7 @@
Skip to content
On this page
- diff --git a/lib/javascript/lib.html b/lib/javascript/lib.html index 52d3bb423..791c2f747 100644 --- a/lib/javascript/lib.html +++ b/lib/javascript/lib.html @@ -17,7 +17,7 @@
Skip to content
On this page

Taplo Lib

@taplo/lib exposes high-level functions for general use, such as formatting and validation. It is not possible to examine the AST or other aspects of TOML documents.

The published library contains type definitions that are fully documented.

- diff --git a/lib/javascript/lsp.html b/lib/javascript/lsp.html index 1cb62adfa..ffce5910e 100644 --- a/lib/javascript/lsp.html +++ b/lib/javascript/lsp.html @@ -17,7 +17,7 @@
Skip to content
On this page

Taplo LSP

@taplo/lsp exposes a high-level interface for the language server. It is possible to use it in any WASM-compatible environment, even in browsers and web workers. The interface is fully generic to its environment and relies on callback handlers that must be provided.

The published library contains type definitions that are fully documented.

- diff --git a/lib/rust/taplo-common.html b/lib/rust/taplo-common.html index 1d4e7745c..b3050df29 100644 --- a/lib/rust/taplo-common.html +++ b/lib/rust/taplo-common.html @@ -17,7 +17,7 @@
Skip to content
On this page

Taplo Common

The taplo-common includes functionality for schema-based validation and other commonly used tools that are shared between the CLI and the LSP.

WARNING

The taplo-common crate is not intended for general use as-is and it's only here for the sake of completeness.

- diff --git a/lib/rust/taplo-lsp.html b/lib/rust/taplo-lsp.html index 574441c84..03966d35b 100644 --- a/lib/rust/taplo-lsp.html +++ b/lib/rust/taplo-lsp.html @@ -17,7 +17,7 @@
Skip to content
On this page

Taplo LSP

The taplo-lsp crate exposes a language server implementation that uses lsp-async-stub, it is generic over its environment so it is possible to embed it in your own software if needed.

- diff --git a/lib/rust/taplo.html b/lib/rust/taplo.html index 6cb6279de..98e0a6a3b 100644 --- a/lib/rust/taplo.html +++ b/lib/rust/taplo.html @@ -17,7 +17,7 @@
Skip to content
On this page

Taplo Core

The taplo core crate aims to be a generic-purpose lower-level TOML library, it parses TOML documents into an AST and DOM, and also exposes some other functionality, such as formatting.

-