@@ -34,7 +34,7 @@ const releasePleaseManifest = require('../.release-please-manifest.json');
34
34
license : rootManifest . license ,
35
35
engines : rootManifest . engines ,
36
36
main : 'lib/index.js' ,
37
- types : 'lib /index.d.ts'
37
+ types : 'types /index.d.ts'
38
38
} ;
39
39
console . log ( '📦 initialising "package.json"' ) ;
40
40
await fs . writeFile (
@@ -56,7 +56,7 @@ This module is part of [FT.com Reliability Kit](https://github.com/Financial-Tim
56
56
console . log ( '📄 adding ".npmignore"' ) ;
57
57
await fs . writeFile (
58
58
path . join ( packagePath , '.npmignore' ) ,
59
- [ '!*.d.ts' , '!*.d.ts.map' , ' CHANGELOG.md', 'docs' , 'test' ] . join ( '\n' )
59
+ [ 'CHANGELOG.md' , 'docs' , 'test' ] . join ( '\n' )
60
60
) ;
61
61
62
62
// Bootstrap base JavaScript files
@@ -68,6 +68,14 @@ This module is part of [FT.com Reliability Kit](https://github.com/Financial-Tim
68
68
`module.exports = {};
69
69
`
70
70
) ;
71
+ console . log ( '🏗 adding "types/index.d.ts"' ) ;
72
+ const typesPath = path . join ( packagePath , 'types' ) ;
73
+ await fs . mkdir ( typesPath ) ;
74
+ await fs . writeFile (
75
+ path . join ( typesPath , 'index.d.ts' ) ,
76
+ `declare module '@dotcom-reliability-kit/${ name } ' {}
77
+ `
78
+ ) ;
71
79
72
80
// Bootstrap test JavaScript files
73
81
console . log ( '🏗 adding "test/unit/lib/index.spec.js"' ) ;
0 commit comments