-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.projenrc.js
90 lines (80 loc) · 1.74 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
const {
AwsCdkTypeScriptApp,
web,
} = require('projen');
const PROJECT_NAME = 'landing-page';
const frontend = new web.ReactTypeScriptProject({
defaultReleaseBranch: 'main',
name: `${PROJECT_NAME}-frontend`,
deps: [
'react',
'react-dom',
],
devDeps: [
'@types/react',
'@types/react-dom',
'@vitejs/plugin-react',
'typescript',
'vite',
'tailwindcss',
'postcss',
'autoprefixer',
],
tsconfig: {
compilerOptions: {
target: 'ESNext',
useDefineForClassFields: true,
lib: [
'DOM',
'DOM.Iterable',
'ESNext',
],
allowJs: false,
skipLibCheck: false,
esModuleInterop: false,
allowSyntheticDefaultImports: true,
strict: true,
forceConsistentCasingInFileNames: true,
module: 'ESNext',
moduleResolution: 'Node',
resolveJsonModule: true,
isolatedModules: true,
noEmit: true,
jsx: 'react-jsx',
},
include: ['./src'],
},
gitignore: [
'.idea',
'.env',
],
});
const packageJson = frontend.tryFindObjectFile('package.json');
packageJson.addOverride('scripts', {
dev: 'vite',
build: 'tsc && vite build',
serve: 'vite preview',
});
frontend.synth();
const backend = new AwsCdkTypeScriptApp({
name: `${PROJECT_NAME}-backend`,
defaultReleaseBranch: 'main',
parent: frontend,
outdir: 'backend',
cdkVersion: '1.121.0',
deps: [
'cdk-spa-deploy',
],
cdkDependencies: [
'@aws-cdk/aws-certificatemanager',
'@aws-cdk/aws-cloudfront',
'@aws-cdk/aws-iam',
'@aws-cdk/aws-route53',
'@aws-cdk/aws-route53-patterns',
'@aws-cdk/aws-route53-targets',
'@aws-cdk/aws-s3',
'@aws-cdk/aws-s3-deployment',
'@aws-cdk/core',
],
});
backend.synth();