0.0.12 • Published 6 years ago

bavary v0.0.12

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

Getting Started

⚠ Bavary is currently not stable and heavily under development. The API might change and all 0.0.x releases should be treated as test / preview releases.

Install via npm:

$ npm install bavary

Install via yarn:

$ yarn add bavary

Include directly via jsdelivr:

<script src="https://cdn.jsdelivr.net/npm/bavary/lib/bavary.js"></script>

Usage

import {compile} from 'bavary';

// Compile definitions
const parse = compile(`
    entry ['A' | 'B']
`);

// Use compiled definitions to parse a string
const parsed = parse('A');

// Logs "A" to the console
console.log(parsed);

The function compile accepts as second argument a config object;

Getting started

Check out the documentation to get started or jump directly into one of the examples:

  1. string - Parsing strings and support escaped quotes.
  2. hex-color - Parsing different kinds of color types in the hexadecimal format.
  3. number - Parsing floats and integers with optional scientific notation.

CLI

Usage:

$ bvc [files] [options...]

Where files can be any kind of directory, file or glob-pattern. If no output file is specified (via --output) it'll print the result to the console.

FlagExplanationExample
-w, --watchWatches source-files matched by [files]$ bva src/**/*.bv input.txt --watch
-v, --versionPrints the current version$ bva --version
-o, --output <file>Write results to disk$ bva --output result.json
-p, --prettifyPrettify result (Works only in combination with --output)$ bva --output result.json --prettify
-h, --helpShows usage info$ bva --help
0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago