0.0.5 • Published 2 years ago

faunadna v0.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Goals

File based management

  1. Create a fauna directory at the root of your project.
  2. Create a functions directory inside of that.
  3. Any file inside of functions can export functions.

CommonJS

module.exports = {
  hello: q.Query(q.Lambda("_", "hello")),
  moreOptions: {
    name: 'goodbye',
    body: q.Lambda("_", "goodbye")
  }
}

ESM

export const hello = q.Query(q.Lambda("_", "hello"));
export const moreOptions = {
  name: 'goodbye',
  body: q.Lambda("_", "goodbye")
}

Command Line Arguments

You can also choose to pass in arguments to specific directories or files

  • --path: The path to the directory or single file where functions are exported.
  • --force: Force overwrite functions