forked from cdklabs/jsii-docgen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.projenrc.js
71 lines (62 loc) · 1.93 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
const { typescript, JsonPatch } = require('projen');
const project = new typescript.TypeScriptProject({
name: 'jsii-docgen',
description: 'generates api docs for jsii modules',
repository: 'https://github.com/cdklabs/jsii-docgen',
authorName: 'Amazon Web Services',
authorUrl: 'https://aws.amazon.com',
authorOrganization: true,
defaultReleaseBranch: 'main',
bin: {
'jsii-docgen': 'bin/jsii-docgen',
},
devDeps: [
'@types/fs-extra',
'@types/semver',
],
deps: [
'@jsii/spec',
'case',
'fs-extra',
'glob-promise',
'glob',
'jsii-reflect',
'jsii-rosetta',
'semver',
'yargs',
],
compileBeforeTest: true, // we need this for the CLI test
releaseToNpm: true,
projenUpgradeSecret: 'PROJEN_GITHUB_TOKEN',
autoApproveOptions: {
allowedUsernames: ['cdklabs-automation'],
secret: 'GITHUB_TOKEN',
},
autoApproveUpgrades: true,
minNodeVersion: '14.17.0',
jestOptions: {
jestConfig: {
setupFilesAfterEnv: ['<rootDir>/test/setup-jest.ts'],
},
},
tsconfig: {
compilerOptions: {
target: 'ES2019',
lib: ['es2019'], // allow Array.prototype.flat etc.
skipLibCheck: true,
},
},
});
project.github.tryFindWorkflow('release').file.patch(JsonPatch.add('/jobs/release/env/NODE_OPTIONS', '--max_old_space_size=4096'));
project.github.tryFindWorkflow('build').file.patch(JsonPatch.add('/jobs/build/env/NODE_OPTIONS', '--max_old_space_size=4096'));
const libraryFixtures = ['construct-library'];
// compile the test fixtures with jsii
for (const library of libraryFixtures) {
project.compileTask.exec('npm ci', { cwd: `./test/__fixtures__/libraries/${library}` });
project.compileTask.exec('npm run compile', { cwd: `./test/__fixtures__/libraries/${library}` });
}
// artifacts created by transpilation in tests
project.gitignore.exclude('test/**/.jsii.*');
// local vscode configuration
project.gitignore.exclude('.vscode/');
project.synth();