@architect/package packages @architect projects as AWS::Serverless
-compatible JSON. Converts Architect projects into a AWS Serverless Application Model (SAM)-compatible format.
npm i @architect/package
All of this module's methods take as input an @architect/inventory-parsed Architect project.
let inventory = require('@architect/inventory')
let pkg = require('@architect/package')
// fake out an .arc file as a string
let arcString = `
@app
mybasicapp
@http
get /
`
// export as sam
let inv = await inventory({ rawArc: arcString, deployStage: 'staging' })
let sam = pkg(inv)
console.log(sam)