Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Parametrize runtime to reduce number of templates #464

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,563 changes: 23 additions & 1,540 deletions manifest-v2.json

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions manifest-v3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"version": "3.0",
"groups": [
{
"rootDir": "nodejs01",
"runtimes": [
"nodejs16.x",
"nodejs18.x"
],
"exclude": [
"hello-img"
]
},
{
"rootDir": "nodejs01/hello-img",
"runtimes": [
{
"runtime": "nodejs18.x",
"displayRuntime": "amazon/nodejs18.x-base"
}
]
},
{
"rootDir": "al2/graalvm",
"runtimes": [
{
"runtime": "provided.al2",
"displayRuntime": "graalvm.java11 (provided.al2)"
}
]
}
]
}
229 changes: 229 additions & 0 deletions nodejs01/cw-event/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@

# Created by https://www.toptal.com/developers/gitignore/api/osx,linux,python,windows,sam
# Edit at https://www.toptal.com/developers/gitignore?templates=osx,linux,python,windows,sam

### Linux ###
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### OSX ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
pytestdebug.log

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/
doc/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
#poetry.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
# .env
.env/
.venv/
env/
venv/
ENV/
env.bak/
venv.bak/
pythonenv*

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# operating system-related files
# file properties cache/storage on macOS
*.DS_Store
# thumbnail cache on Windows
Thumbs.db

# profiling data
.prof


### SAM ###
# Ignore build directories for the AWS Serverless Application Model (SAM)
# Info: https://aws.amazon.com/serverless/sam/
# Docs: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-reference.html

**/.aws-sam

### Windows ###
# Windows thumbnail cache files
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk

# End of https://www.toptal.com/developers/gitignore/api/osx,linux,python,windows,sam
Expand Down
20 changes: 20 additions & 0 deletions nodejs01/cw-event/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Cookiecutter NodeJS CloudWatch Events Quick Start Application

A cookiecutter template to create a NodeJS CloudWatch Events Quick Start Application using [Serverless Application Model (SAM)](https://github.com/awslabs/serverless-application-model).

## Requirements

* [AWS SAM CLI](https://github.com/awslabs/aws-sam-cli)

## Usage

Generate a boilerplate template in your current project directory using the following syntax:

* **NodeJS 18**: `sam init --runtime nodejs18.x --app-template quick-start-cloudwatch-events --name cwe-app`

> **NOTE**: ``--name`` allows you to specify a different project folder name

# Credits

* This project has been generated with [Cookiecutter](https://github.com/audreyr/cookiecutter)

12 changes: 12 additions & 0 deletions nodejs01/cw-event/cookiecutter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"project_name": "Name of the project",
"runtime": "nodejs18.x",
"architectures": {
"value": [
"x86_64", "arm64"
]
},
"_copy_without_render": [
".gitignore"
]
}
2 changes: 2 additions & 0 deletions nodejs01/cw-event/setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[install]
prefix=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
Loading
Loading