eshikerya / package

Package .arc apps for deployment with Cloudformation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@architect/package Travis Build Status Appveyor Build Status codecov

@architect/package packages @architect projects as AWS::Serverless -compatible JSON. Converts project .arc files into a AWS Serverless Application Model (SAM)-compatible format.

Install

npm i @architect/package

API

All of this module's methods take as input an @architect/parser-parsed @architect project .arc file.

pkg(arc)

Depending on the size of your @architect project and its passed-in parsed .arc file(the arc parameter), will invoke either toCFN for larger projects or toSAM for smaller ones.

pkg.toCFN(arc)

pkg.toSAM(arc)

Example Usage

let parse = require('@architect/parser')
let pkg = require('@architect/package')

// fake out an .arc file as a string
let arcString = `
@app
mybasicapp

@http
get /
`

// parse .arc string into a plain javascript object
let arc = parse(arcString)

// export as sam
let sam = pkg(arc)
console.log(sam)

About

Package .arc apps for deployment with Cloudformation

License:Apache License 2.0


Languages

Language:JavaScript 99.3%Language:HTML 0.5%Language:CSS 0.2%