Skip to content

jstors/farm-plugin-yaml

Repository files navigation

farm-plugin-yaml

This plugin provides a YAML parser for FARM.

Currently only simple YAML syntax parsing is supported.

Usage

pnpm install -D @jstors/farm-plugin-yaml

Configuration

export default defineConfig({
  plugins: [
      '@jstors/farm-plugin-yaml',
  ]
});

Template

import yamlFile from './base.yaml'

console.log(yamlFile)

Transform Code

languages:
  - Ruby
  - Perl
  - Python 
websites:
  YAML: yaml.org 
  Ruby: ruby-lang.org 
  Python: python.org 
  Perl: use.perl.org
number: 1
is: true
c: 
module.exports = {"websites":{"YAML":"yaml.org","Ruby":"ruby-lang.org","Python":"python.org","Perl":"use.perl.org"},"is":"true","number":"1","c":"null","languages":["Ruby","Perl","Python"]}