cf2-builder
TypeScript icon, indicating that this package has built-in type declarations

1.1.20Β β€’Β PublicΒ β€’Β Published

cf2-builder

npm-version npm-license npm-download-month npm-min-size ci.yml

🌐 A toolkit to build AWS CloudFront Functions with strict type definitions

Install

npm i cf2-builder

Example

Source

// src/index.ts
import type { ViewerRequestHandler } from 'cf2-builder'

export default ((event) => {
  // ... Application Code
}) satisfies ViewerRequestHandler

Handler Types

Build

import { build } from 'cf2-builder'

await build('src/index.js', 'dist/index.js')

or use CLI

npx cf2-builder src/index.js dist/index.js

Deploy the output js file to CloudFront using your preferred method.

License

MIT

Package Sidebar

Install

npm i cf2-builder

Weekly Downloads

921

Version

1.1.20

License

MIT

Unpacked Size

19.7 kB

Total Files

35

Last publish

Collaborators

  • jill64