-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.projenrc.ts
101 lines (90 loc) · 2.47 KB
/
.projenrc.ts
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
91
92
93
94
95
96
97
98
99
100
101
import { FunctionlessProject } from "@functionless/projen";
import { Husky } from "@mountainpass/cool-bits-for-projen";
import { TurborepoProject } from "projen-turborepo";
import { GithubCredentials } from "projen/lib/github";
const turbo = new TurborepoProject({
defaultReleaseBranch: "main",
devDeps: [
"projen-turborepo",
"@functionless/projen",
"lint-staged",
"@mountainpass/cool-bits-for-projen",
],
name: "functionless-samples",
projenrcTs: true,
turbo: {
pipeline: {
deploy: {},
synth: {},
prepare: {},
},
},
prettier: true,
eslintOptions: {
dirs: [],
lintProjenRc: true,
prettier: true,
},
depsUpgradeOptions: {
workflowOptions: {
projenCredentials: GithubCredentials.fromApp(),
},
},
projenCredentials: GithubCredentials.fromApp(),
gitignore: [".swc"],
// deps: [], /* Runtime dependencies of this module. */
// description: undefined, /* The description is just a string that helps people understand the purpose of the package. */
// packageName: undefined, /* The "name" in package.json. */
});
// prepare is not run when install sub-package, run prepare to run the functionless requirement `ts-patch install -s`
turbo.setScript("postinstall", "turbo run prepare");
new FunctionlessProject({
parent: turbo,
defaultReleaseBranch: "main",
name: "sample1",
outdir: "packages/sample1",
cdkVersion: "2.39.1",
});
const packageJson = turbo.tryFindObjectFile("package.json");
packageJson?.addOverride("lint-staged", {
"*.{tsx,jsx,ts,js,json,md}": ["turbo run eslint -- --"],
});
new Husky(turbo, {
huskyHooks: {
"pre-commit": ["#!/bin/sh", "npx -y lint-staged"],
},
});
const eslintJson = turbo.tryFindObjectFile(".eslintrc.json");
eslintJson?.addOverride("parserOptions.project", [
"./tsconfig.dev.json",
"./packages/sample1/tsconfig.dev.json",
]);
new FunctionlessProject({
parent: turbo,
defaultReleaseBranch: "main",
name: "sagaFunction",
outdir: "packages/sagaFunction",
cdkVersion: "2.39.1",
});
new FunctionlessProject({
parent: turbo,
defaultReleaseBranch: "main",
name: "cron",
outdir: "packages/cron",
cdkVersion: "2.39.1",
devDeps: ["@types/node-fetch"],
deps: ["node-fetch"],
});
new FunctionlessProject({
parent: turbo,
defaultReleaseBranch: "main",
name: "eventBridge",
outdir: "packages/eventBridge",
cdkVersion: "2.39.1",
tsconfig: {
compilerOptions: {
skipLibCheck: false,
},
},
});
turbo.synth();