-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.projenrc.ts
85 lines (71 loc) · 2.49 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
import { Changesets, Husky, VscodeExtensionRecommendations } from "@floydspace/projen-components";
import { YamlFile } from "projen";
import { Docgen, Examples, TypeScriptLibProject } from "./projenrc";
const org = "floydspace";
const name = "effect-kafka";
const repo = `${org}/${name}`;
const project = new TypeScriptLibProject({
name: name,
description: "📨 Effectful Kafka",
keywords: [
"ecosystem",
"typescript",
"kafka",
"kafka-consumer",
"kafka-producer",
"kafka-client",
"effect",
"confluent-kafka",
"kafkajs",
"rdkafka",
"effect-ts",
],
repository: `https://github.com/${org}/${name}.git`,
homepage: `https://${org}.github.io/${name}`,
typescriptVersion: "~5.5.4",
prettierOptions: { settings: { printWidth: 120 } },
github: true,
githubOptions: { mergify: false, pullRequestLint: false },
release: false,
buildWorkflowOptions: { mutableBuild: false },
pullRequestTemplate: false,
workflowNodeVersion: "lts/*",
workflowPackageCache: true,
devDeps: ["@floydspace/projen-components@next", "tsx"],
});
project.defaultTask?.reset("tsx .projenrc.ts");
new YamlFile(project, ".github/FUNDING.yml", { obj: { github: org } });
new Husky(project, {
huskyHooks: {
"pre-push": ["CI=true pnpm test", "pnpm docgen"],
},
});
new Docgen(project, { repoOwner: org });
new Changesets(project, { repo });
const recommendations = new VscodeExtensionRecommendations(project);
recommendations.addRecommendations("effectful-tech.effect-vscode");
new Examples(project);
project.addGitIgnore(".direnv/"); // flake environment creates .direnv folder
project.addPackageIgnore("/.envrc");
project.addPackageIgnore("/flake.lock");
project.addPackageIgnore("/flake.nix");
project.addPackageIgnore("/docker-compose.yml");
// Effect dependencies
project.addDevDeps("@effect/platform", "@effect/platform-node", "@effect/vitest", "@fluffy-spoon/substitute");
project.addPeerDeps("effect");
// Kafka dependencies
project.addPeerDeps("kafkajs@^2", "@confluentinc/kafka-javascript@>=0.2.1 <1.0.0");
project.addFields({
peerDependenciesMeta: {
kafkajs: { optional: true },
"@confluentinc/kafka-javascript": { optional: true },
},
});
// Build utils
project.addDevDeps("@effect/build-utils");
project.package.manifest.pnpm.patchedDependencies = {
"@effect/build-utils": "patches/@effect__build-utils.patch",
};
project.postCompileTask.exec("build-utils pack-v2");
project.addFields({ publishConfig: { access: "public", directory: "dist" } });
project.synth();