File tree Expand file tree Collapse file tree 4 files changed +15
-2
lines changed
Expand file tree Collapse file tree 4 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ const files = [
1111 'package.json' ,
1212 'README.md' ,
1313 'tsconfig.json' ,
14+ 'tsconfig-build.json' ,
1415]
1516
1617// Replace template values with plugin name.
Original file line number Diff line number Diff line change 44 "license" : " MIT" ,
55 "main" : " dist/index.js" ,
66 "type" : " module" ,
7+ "types" : " dist/index.d.ts" ,
78 "exports" : {
89 "." : " ./dist/index.js" ,
910 "./package.json" : " ./package.json"
1011 },
1112 "scripts" : {
1213 "app" : " node create-app.js" ,
13- "build" : " esbuild index.tsx --outdir=dist --bundle --minify --format=esm --sourcemap --external:react-native --external:react" ,
14+ "build" : " esbuild index.tsx --outdir=dist --bundle --minify --format=esm --sourcemap --external:react-native --external:react && npm run build:types " ,
1415 "watch" : " concurrently --kill-others \" npm run build:watch\" \" npm run copy\" " ,
1516 "copy" : " cpx 'dist/**/*' app/node_modules/<%= name %>/dist --watch" ,
17+ "build:types" : " tsc --project tsconfig-build.json" ,
1618 "build:watch" : " esbuild index.tsx --watch --outdir=dist --bundle --format=esm --sourcemap --external:react-native --external:react" ,
1719 "test" : " jest" ,
1820 "test:watch" : " jest --watchAll" ,
Original file line number Diff line number Diff line change 1+ {
2+ "extends" : " ./tsconfig.json" ,
3+ "compilerOptions" : {
4+ "noEmit" : false ,
5+ "emitDeclarationOnly" : true ,
6+ },
7+ "include" : [" index.tsx" ]
8+ }
Original file line number Diff line number Diff line change 55 "lib" : [" es2017" ],
66 "allowJs" : true ,
77 "jsx" : " react-native" ,
8- "noEmit" : true ,
98 "isolatedModules" : true ,
109 "strict" : true ,
1110 "moduleResolution" : " node" ,
1211 "allowSyntheticDefaultImports" : true ,
1312 "esModuleInterop" : true ,
1413 "skipLibCheck" : true ,
1514 "resolveJsonModule" : true ,
15+ "declaration" : true ,
16+ "noEmit" : true ,
17+ "outDir" : " dist" ,
1618 "paths" : {
1719 "<%= name %>" : [" ." ]
1820 }
You can’t perform that action at this time.
0 commit comments