-
Notifications
You must be signed in to change notification settings - Fork 1
/
.projenrc.ts
172 lines (167 loc) · 4.99 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
import { NodePackageManager } from "projen/lib/javascript";
import { VSCodeExtensionProject } from "./src/project/project_type";
const project = new VSCodeExtensionProject({
defaultReleaseBranch: "master",
name: "vscode-projen",
packageManager: NodePackageManager.NPM,
repository: "https://github.com/MarkMcCulloh/vscode-projen.git",
projenrcTs: true,
entrypoint: "./lib/extension.js",
minNodeVersion: "20.0.0",
deps: ["gunzip-maybe", "tar-stream", "pacote", "registry-url"],
devDeps: ["shx", "@types/gunzip-maybe", "@types/tar-stream", "@types/pacote"],
eslintOptions: {
dirs: ["src"],
devdirs: ["test"],
prettier: true,
},
tsconfig: {
compilerOptions: {
lib: ["es2021", "dom"],
},
},
// TODO: Figure out a way to avoid "onStartupFinished"
// This is needed to allow bootstrapping projen in an empty workspace
activationEvents: [
"workspaceContains:.projen/**",
"onView:projen",
"onStartupFinished",
],
contributes: {
configuration: {
title: "Projen",
properties: {
"projen.projects.externalLibraries": {
type: "string",
editPresentation: "multilineText",
default: "",
description:
"When creating a new project, these external libraries will show as options.\nSeparate with newlines.\nMay use `|` after library name to add documentation (e.g. `vue-projen | Vue templates`).",
},
"projen.tasks.executeInTerminal": {
type: "boolean",
default: false,
description:
"When running a task, use the integrated terminal instead of the special task window.",
},
"projen.terminal.alwaysChangeToWorkspaceDirectory": {
type: "boolean",
default: true,
description:
"Before running each command in the integrated terminal, always change the directory to the root.",
},
"projen.managedFiles.decoration.enable": {
type: "boolean",
default: true,
description: "Label and darken projen-managed files in the explorer.",
},
"projen.managedFiles.decoration.badge": {
type: "string",
default: "PJ",
description:
"MUST BE < 3 CHARACTERS.\nText of the label applied to managed projen files. Can leave empty to remove.",
},
"projen.managedFiles.decoration.themeColor": {
type: "string",
default: "gitDecoration.ignoredResourceForeground",
description:
"ThemeColor id to apply to managed files. Leave empty to not apply any color.",
},
},
},
taskDefinitions: [
{
type: "projen",
required: ["task"],
when: "shellExecutionSupported && projen.inProject",
properties: {
task: {
type: "string",
description: "The projen task to execute",
},
},
},
],
viewsContainers: {
activitybar: [
{
id: "projen",
title: "Projen",
icon: "resources/dark/projen-outline.svg",
},
],
},
views: {
projen: [
{
id: "projenProjects",
name: "Projects",
},
],
},
commands: [
{
command: "projen.run",
title: "Run Projen",
icon: {
light: "resources/light/projen-outline.svg",
dark: "resources/dark/projen-outline.svg",
},
},
{
command: "projen.runTask",
title: "Run Projen Task",
icon: "$(play)",
},
{
command: "projen.openProjenRc",
title: "Open Projen File",
icon: "$(gear)",
},
{
command: "projen.new",
title: "Generate Projen Project",
},
],
menus: {
"view/title": [
{
command: "projen.run",
group: "navigation",
when: "projen.inProject == true && view == projenProjects",
},
{
command: "projen.openProjenRc",
group: "navigation",
when: "projen.inProject == true && view == projenProjects",
},
{
command: "projen.run",
group: "navigation",
when: "projen.inProject == true && activeViewlet == 'workbench.view.explorer'",
},
{
command: "projen.openProjenRc",
group: "navigation",
when: "projen.inProject == true && activeViewlet == 'workbench.view.explorer'",
},
],
},
},
displayName: "Projen",
icon: "resources/projen.png",
publishToVSMarketplace: true,
// Disabled for now https://github.com/MarkMcCulloh/vscode-projen/issues/29
publishToOpenVSXRegistry: false,
vscodeVersion: "^1.62.0",
description: "Projen helpers and utilities",
publisher: "MarkMcCulloh",
preview: false,
jest: true,
});
project.vscodeIgnore!.addPatterns("!node_modules/node-gyp/bin/node-gyp.js");
project.addFields({
browser: "./lib/extension.js",
});
project.addExcludeFromCleanup("test/**");
project.synth();