diff --git a/.changeset/small-eggs-pull.md b/.changeset/small-eggs-pull.md new file mode 100644 index 0000000..b465a9e --- /dev/null +++ b/.changeset/small-eggs-pull.md @@ -0,0 +1,5 @@ +--- +"esbuild-cf-functions-plugin": minor +--- + +Initial release diff --git a/README.md b/README.md index 0d113f7..6ca1178 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,15 @@ # `esbuild-cf-functions-plugin` - +[![npm](https://img.shields.io/npm/v/esbuild-cf-functions-plugin)](https://www.npmjs.com/package/esbuild-cf-functions-plugin) +![node-current](https://img.shields.io/node/v/esbuild-cf-functions-plugin) +![esbuild-current](https://img.shields.io/badge/esbuild-^0.14.46-green) +[![Codecov](https://img.shields.io/codecov/c/github/BeeeQueue/esbuild-cf-functions-plugin?token=TOKEN_HERE)](https://app.codecov.io/github/BeeeQueue/esbuild-cf-functions-plugin) This plugin configures ESBuild for building code [compatible][runtime] with [CloudFront Functions][cf-functions]. -As can be seen in the documentation CloudFront Functions do not run on Node, but on AWS's custom JS runtime. +As can be seen in the documentation, CloudFront Functions do not run on Node, but on AWS's custom JS runtime. -According to them it +According to them, it > ... is compliant with ECMAScript (ES) version 5.1 and also supports some features of ES versions 6 through 9. diff --git a/example/README.md b/example/README.md new file mode 100644 index 0000000..d5b47e0 --- /dev/null +++ b/example/README.md @@ -0,0 +1,9 @@ +# Redirect example + +This example shows a set up where a TypeScript function is build and deployed to CloudFront Functions via Terraform! + +The function does one thing: if the path starts with `/foo*` it will redirect it to `/bar*`. + +This can be tested by visiting the URL below and seeing the path change from `/foo/nebula.webp` to `/bar/nebula.webp`! + +https://d31lz94z7iimag.cloudfront.net/foo/nebula.webp diff --git a/package.json b/package.json index 5e78cfb..bd41dbf 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,9 @@ "release": "pnpm build && pnpm changeset publish", "prepare": "simple-git-hooks" }, + "peerDependencies": { + "esbuild": "^0.14.46" + }, "devDependencies": { "@beequeue/eslint-plugin": "0.6.0", "@changesets/changelog-github": "0.4.5",