-
Notifications
You must be signed in to change notification settings - Fork 0
/
.projenrc.ts
58 lines (54 loc) · 1.51 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
import { cdktf, javascript } from 'projen';
const project = new cdktf.ConstructLibraryCdktf({
author: 'huaxk',
authorAddress: 'huaxk@163.com',
cdktfVersion: '^0.9.0',
constructsVersion: '^10.0.25',
defaultReleaseBranch: 'main',
name: 'cdktf-provider-cdk8s',
packageManager: javascript.NodePackageManager.PNPM,
projenrcTs: true,
repositoryUrl: 'https://github.com/huaxk/cdktf-provider-cdk8s.git',
bundledDeps: ['yaml@1.10.2'],
peerDeps: ['cdk8s@>=2.1.6', '@cdktf/provider-kubernetes@>=0.6.0'],
devDeps: ['cdk8s-cli'],
description:
'A compatability layer for using cdk8s constructs within Terraform CDK.',
license: 'MIT',
eslintOptions: {
dirs: ['src'],
ignorePatterns: ['**/node_modules/**', '**/test/imports/**'],
},
jestOptions: {
jestConfig: {
coveragePathIgnorePatterns: ['test/imports'],
},
},
});
const importTask = project.addTask('import', {
condition: '[ ! -f "test/imports/k8s.ts" ]',
exec: 'cd ./test && cdk8s import k8s --language typescript',
});
project.testTask.prependSpawn(importTask);
project.release?.publisher.publishToNpm({
prePublishSteps: [
{
name: 'Prepare Repository',
run: 'mv dist .repo',
},
{
name: 'Install Dependencies',
run: 'cd .repo && npm i --frozen-lockfile',
},
{
name: 'Create js artifact',
run: 'cd .repo && npx projen package:js',
},
{
name: 'Collect js Artifact',
run: 'mv .repo/dist dist',
},
],
registry: 'registry.npmjs.org',
});
project.synth();