vanilla-lang

Elegant json-like configuration language

Usage no npm install needed!

<script type="module">
  import vanillaLang from 'https://cdn.skypack.dev/vanilla-lang';
</script>

README

Vanilla

Vanilla is a elegant json inspired configuration/markup language

Differences

Types: numbers, strings, booleans, null, objects

Rules

  1. The language can only go 3 layers down (root -> object/variable/array -> array/variable)
  2. Objects, variables, arrays can not contain an item of the same type, recursion does not exist
  3. Arrays can not contain variables only values
  4. Mixins can only be used in variables

Installation

npm install -g vanilla-lang

Usage

root
  @test "this is a mixin"
  'this is a example comment'
  'this is a example
  multiline comment'
  user
    password @test
    inventory
      - "item 1"
      - "item 2"
      - "item 3"

In the javascript code:

const vanilla = require("vanilla-lang");
const config = vanilla.load("config.va");
console.log(config.user);