0.1.2 • Published 6 years ago

lofi-schema v0.1.2

Weekly downloads
1
License
BSD3
Repository
github
Last release
6 years ago

Lofi Schema

CLI

npm i lofi-schema -g
# or yarn
yarn global add lofi-schema
lofi-schema graphql -s path/to/file.lofi
lofi-schema go -s path/to/file.lofi
lofi-schema mongoose -s path/to/file.lofi
lofi-schema swift -s path/to/file.lofi

Module

npm i lofi-schema -S
# or yarn
yarn add lofi-schema
import lofiSchema from 'lofi-schema';

const input = `
title
yearReleased #number
`;

lofiSchema.onConverted((error, content, format) => {
  if (error) {
    // Handle error
  }
  else {
    // Use content
  }
});

lofiSchema.startConversion({
  inputFormat: 'lofi',
  input,
  outputFormat: 'graphql'
});

lofiSchema.startConversion({
  inputFormat: 'lofi',
  input,
  outputFormat: 'go'
});

lofiSchema.startConversion({
  inputFormat: 'lofi',
  input,
  outputFormat: 'swift'
});
0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago