-
Notifications
You must be signed in to change notification settings - Fork 57
/
Copy pathpackage-json.ts
53 lines (53 loc) · 1.28 KB
/
package-json.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
export function packageJson(
npmPackageName: string,
versionInPackageJson: string | undefined,
generatorVersion: string,
description: string,
sdkAfterVersionScript: boolean
): string {
return (
JSON.stringify(
{
name: npmPackageName,
version: versionInPackageJson || generatorVersion,
description,
homepage: 'https://sap.github.io/cloud-sdk/docs/js/getting-started',
main: './index.js',
types: './index.d.ts',
publishConfig: {
access: 'public'
},
files: [
'**/*.js',
'**/*.js.map',
'**/*.d.ts',
'**/d.ts.map',
'**/*-csn.json'
],
repository: {
type: 'git',
url: ''
},
scripts: {
compile: 'npx tsc',
doc: 'npx typedoc',
...(sdkAfterVersionScript
? { version: 'node ../../../after-version-update.js' }
: {})
},
dependencies: {
'@sap-cloud-sdk/core': `^${generatorVersion}`
},
peerDependencies: {
'@sap-cloud-sdk/core': `^${generatorVersion}`
},
devDependencies: {
typedoc: '^0.17.0',
typescript: '~3.8.3'
}
},
null,
2
) + '\n'
);
}