-
Notifications
You must be signed in to change notification settings - Fork 0
/
.projenrc.js
57 lines (50 loc) · 1.9 KB
/
.projenrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
const { TypeScriptProject } = require('projen');
const dependencies = {
"aws-dynamodb": "^0.1.69",
"aws-lambda": "^1.0.6",
"aws-sdk": "^2.713.0",
'@types/aws-lambda': '^8.10.64',
"@middy/core": "^1.4.0",
"@middy/input-output-logger": "^1.4.0",
"@middy/http-error-handler": "^1.4.0",
"@middy/http-cors": "^1.4.0",
"@types/http-errors": "^1.8.0",
"http-errors": "^1.8.0",
};
const devDeps = {
'alf-cdk-app-pipeline': 'github:mmuller88/alf-cdk-app-pipeline#v0.0.10',
// "@types/aws-lambda": "^8.10.64",
'aws-sdk-mock': '5.1.0',
"prettier": "^2.1.2",
};
const name = 'alf-cdk';
const project = new TypeScriptProject({
name: name,
authorAddress: "[email protected]",
authorName: "Martin Müller",
repository: `https://github.com/mmuller88/${name}`,
dependencies,
peerDependencies: dependencies,
devDependencies: devDeps,
keywords: [
"cdk",
"lambda",
"dynamodb"
],
releaseWorkflow: false,
});
const stage = '${STAGE:-dev}';
project.addScripts({
'clean': 'rm -rf ./cdk.out && rm -rf ./cdk.out ./build lib',
'build': 'yarn run clean && yarn install && yarn run test && yarn run compile && cp src/package.json lib && cd lib && yarn install ',
'cdkdeploy': `yarn run build && cdk deploy ${name}-${stage} --profile damadden88 --require-approval never`,
'cdksynth': `yarn run build && cdk synth ${name}-${stage} --profile damadden88`,
'cdkdestroy': `yarn run build && yes | cdk destroy ${name}-${stage} --profile damadden88`,
'cdkpipelinediff': `yarn run build && cdk diff ${name}-pipeline --profile damadden88 || true`,
'cdkpipelinedeploy': `yarn run build && cdk deploy ${name}-pipeline --profile damadden88 --require-approval never`,
});
project.tsconfig.compilerOptions.rootDir=undefined;
project.tsconfig.compilerOptions.noImplicitAny=false;
project.tsconfig.compilerOptions.esModuleInterop=true;
project.gitignore.exclude('cdk.out','tmp');
project.synth();