1
Fork 0

Add netlify functions workflow

This commit is contained in:
Jake Howard 2019-01-30 22:22:53 +00:00
parent 44e140dc23
commit d004a6fdbd
Signed by: jake
GPG key ID: 57AFB45680EDD477
7 changed files with 5368 additions and 0 deletions

12
.babelrc Normal file
View file

@ -0,0 +1,12 @@
{
"presets": [
"@babel/preset-typescript",
"@babel/preset-env",
],
"plugins": [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-transform-object-assign",
"@babel/plugin-proposal-object-rest-spread",
"static-fs",
]
}

101
.gitignore vendored Normal file
View file

@ -0,0 +1,101 @@
# Created by https://www.gitignore.io/api/node,hugo
# Edit at https://www.gitignore.io/?templates=node,hugo
### Hugo ###
### Hugo ###
# gitginore template for Hugo projects
# website: https://gohugo.io
# generated files by hugo
/public/
/resources/_gen/
# executable may be added to repository
hugo.exe
hugo.darwin
hugo.linux
### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
.env.test
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
.nuxt
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# End of https://www.gitignore.io/api/node,hugo

8
lambda/index.ts Normal file
View file

@ -0,0 +1,8 @@
const fs = require('fs');
export function handler(event, context, callback) {
callback(null, {
statusCode: 200,
body: JSON.stringify(fs.readdirSync(__dirname))
});
}

0
layouts/index.html Normal file
View file

3
netlify.toml Normal file
View file

@ -0,0 +1,3 @@
[build]
publish = "public"
functions = "public/lambda"

5217
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

27
package.json Normal file
View file

@ -0,0 +1,27 @@
{
"name": "givemoneyto.me",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"build": "netlify-lambda build lambda"
},
"repository": {
"type": "git",
"url": "git+https://github.com/RealOrangeOne/givemoneyto.me.git"
},
"author": "",
"bugs": {
"url": "https://github.com/RealOrangeOne/givemoneyto.me/issues"
},
"homepage": "https://github.com/RealOrangeOne/givemoneyto.me#readme",
"dependencies": {
"@babel/preset-typescript": "^7.1.0",
"babel-plugin-static-fs": "^1.2.0",
"netlify-lambda": "^1.3.0",
"typescript": "^3.2.4"
},
"devDependencies": {
"@types/aws-lambda": "^8.10.18",
"@types/node": "^10.12.19"
}
}