Skip to content

Commit 7307fcc

Browse files
committed
chore: 🤖 initial commit
0 parents  commit 7307fcc

16 files changed

+279
-0
lines changed

.commitlintrc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
extends:
2+
- '@commitlint/config-conventional'

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

.eslintrc.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
env:
2+
node: true
3+
ignorePatterns:
4+
- dist
5+
extends:
6+
- eslint:recommended
7+
- plugin:@typescript-eslint/recommended
8+
rules:
9+
semi: 'off'
10+
quotes: 'off'
11+
no-use-before-define: 'off'
12+
'@typescript-eslint/no-var-requires': 'off'
13+
'@typescript-eslint/explicit-function-return-type': 'off'
14+
'@typescript-eslint/explicit-module-boundary-types': 'off'
15+
'@typescript-eslint/semi': error
16+
'@typescript-eslint/quotes':
17+
- error
18+
- single
19+
'@typescript-eslint/no-use-before-define':
20+
- error
21+
- functions: false
22+
classes: false

.github/FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
patreon: floydspace
2+
issuehunt: floydspace
3+
ko_fi: floydspace

.github/workflows/release.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: release
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- beta
7+
- alpha
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
node-version: [10.x, 12.x, 14.x]
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Use Node.js ${{ matrix.node-version }}
17+
uses: actions/setup-node@v1
18+
with:
19+
node-version: ${{ matrix.node-version }}
20+
- run: npm install
21+
- run: npm test
22+
- run: npm run build --if-present
23+
coverage:
24+
needs: test
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v2
28+
- uses: actions/setup-node@v1
29+
with:
30+
node-version: 12
31+
- run: npm install
32+
- run: npm run coverage
33+
- uses: coverallsapp/github-action@master
34+
with:
35+
github-token: ${{ secrets.GITHUB_TOKEN }}
36+
publish:
37+
needs: test
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v2
41+
- uses: actions/setup-node@v1
42+
with:
43+
node-version: 12
44+
- run: npm install
45+
- run: npx semantic-release
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules
2+
.DS_Store
3+
.idea
4+
dist
5+
*.log
6+
package-lock.json

.huskyrc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
hooks:
2+
commit-msg: commitlint -E HUSKY_GIT_PARAMS
3+
pre-push: npm test

.releaserc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
preset: conventionalcommits

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Victor Korzunin
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
λ💨 aws-lambda-nodejs-esbuild
2+
==============
3+
4+
[AWS CDK](https://aws.amazon.com/cdk/) Construct to build Node.js AWS lambdas using [esbuild](https://github.com/evanw/esbuild).
5+
6+
[![Build Status](https://img.shields.io/github/workflow/status/floydspace/aws-lambda-nodejs-esbuild/release)](https://github.com/floydspace/aws-lambda-nodejs-esbuild/actions)
7+
[![Coverage Status](https://coveralls.io/repos/github/floydspace/aws-lambda-nodejs-esbuild/badge.svg?branch=master)](https://coveralls.io/github/floydspace/aws-lambda-nodejs-esbuild?branch=master)
8+
[![npm version](https://badge.fury.io/js/aws-lambda-nodejs-esbuild.svg)](https://badge.fury.io/js/aws-lambda-nodejs-esbuild)
9+
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
10+
11+
12+
Table of Contents
13+
-----------------
14+
- [Features](#features)
15+
- [Installation](#installation)
16+
- [Configure](#configure)
17+
- [Usage](#usage)
18+
- [Author](#author)
19+
20+
21+
Features
22+
--------
23+
24+
* Zero-config: Works out of the box without the need to install any other packages
25+
* Supports ESNext and TypeScript syntax with transforming limitations (See *Note*)
26+
27+
*Note*: The default JavaScript syntax target is set to [`ES2017`](https://node.green/#ES2017), so the final bundle will be supported by all [AWS Lambda Node.js runtimes](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html). If you still using an old lambda runtime and have to respect it you can play with esbuild `target` option, see [JavaScript syntax support](https://github.com/evanw/esbuild#javascript-syntax-support) for more details about syntax transform limitations.
28+
29+
30+
Installation
31+
------------
32+
33+
```sh
34+
yarn add --dev aws-lambda-nodejs-esbuild
35+
# or
36+
npm install -D aws-lambda-nodejs-esbuild
37+
```
38+
39+
40+
Configure
41+
---------
42+
43+
By default, no configuration required, but you can change esbuild behavior:
44+
45+
```ts
46+
TODO
47+
```
48+
49+
Check [esbuild](https://github.com/evanw/esbuild#command-line-usage) documentation for the full list of available options. Note that some options like `entryPoints` or `outdir` cannot be overwritten.
50+
The package specified in the `exclude` option is passed to esbuild as `external`, but it is not included in the function bundle either. The default value for this option is `['aws-sdk']`.
51+
52+
53+
Usage
54+
-----
55+
56+
The normal AWS CDK deploy procedure will automatically compile with `esbuild`:
57+
58+
- Create the AWS CDK project with `cdk init app --language=typescript`
59+
- Install aws-lambda-nodejs-esbuild plugin as above
60+
- Deploy with `cdk deploy`
61+
62+
63+
Author
64+
------
65+
66+
[Victor Korzunin](https://floydspace.github.io/)

0 commit comments

Comments
 (0)