https://github.com/architect/package
Package .arc apps for deployment with Cloudformation
https://github.com/architect/package
Last synced: 8 months ago
JSON representation
Package .arc apps for deployment with Cloudformation
- Host: GitHub
- URL: https://github.com/architect/package
- Owner: architect
- License: apache-2.0
- Created: 2019-05-28T18:49:17.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2024-06-19T14:17:22.000Z (almost 2 years ago)
- Last Synced: 2024-10-29T00:42:57.533Z (over 1 year ago)
- Language: JavaScript
- Size: 680 KB
- Stars: 5
- Watchers: 5
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
- Contributing: .github/contributing.md
- License: LICENSE
- Code of conduct: .github/code_of_conduct.md
Awesome Lists containing this project
README
# `@architect/package` [](https://github.com/architect/package/actions?query=workflow%3A%22Node+CI%22)
[@architect/package][npm] packages @architect projects as [`AWS::Serverless`][sam]-compatible JSON. Converts Architect projects into a [AWS Serverless Application Model (SAM)][sam]-compatible format.
## Install
npm i @architect/package
## API
All of this module's methods take as input an [@architect/inventory][inventory]-parsed Architect project.
### pkg(arc)
## Example Usage
```javascript
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)
```
[npm]: https://www.npmjs.com/package/@architect/package
[inventory]: https://www.npmjs.com/package/@architect/inventory
[sam]: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-template.html