Forráskód Böngészése

meta: exclude `tsconfig` files from npm bundles (#4916)

Antoine du Hamel 1 éve
szülő
commit
d85caf6c51

+ 1 - 0
packages/@uppy/audio/.npmignore

@@ -0,0 +1 @@
+tsconfig.*

+ 1 - 0
packages/@uppy/companion-client/.npmignore

@@ -0,0 +1 @@
+tsconfig.*

+ 1 - 0
packages/@uppy/compressor/.npmignore

@@ -0,0 +1 @@
+tsconfig.*

+ 1 - 0
packages/@uppy/core/.npmignore

@@ -0,0 +1 @@
+tsconfig.*

+ 1 - 0
packages/@uppy/drop-target/.npmignore

@@ -0,0 +1 @@
+tsconfig.*

+ 1 - 0
packages/@uppy/image-editor/.npmignore

@@ -0,0 +1 @@
+tsconfig.*

+ 1 - 0
packages/@uppy/locales/.npmignore

@@ -0,0 +1 @@
+tsconfig.*

+ 1 - 0
packages/@uppy/status-bar/.npmignore

@@ -0,0 +1 @@
+tsconfig.*

+ 1 - 0
packages/@uppy/store-default/.npmignore

@@ -0,0 +1 @@
+tsconfig.*

+ 1 - 0
packages/@uppy/tus/.npmignore

@@ -0,0 +1 @@
+tsconfig.*

+ 1 - 0
packages/@uppy/utils/.npmignore

@@ -0,0 +1 @@
+tsconfig.*

+ 1 - 0
packages/@uppy/xhr-upload/.npmignore

@@ -0,0 +1 @@
+tsconfig.*

+ 10 - 1
private/js2ts/index.mjs

@@ -5,7 +5,14 @@
  * TS source. It will rename the files, update the imports, and add a `tsconfig.json`.
  */
 
-import { opendir, readFile, open, writeFile, rm } from 'node:fs/promises'
+import {
+  appendFile,
+  opendir,
+  readFile,
+  open,
+  writeFile,
+  rm,
+} from 'node:fs/promises'
 import { createRequire } from 'node:module'
 import { argv } from 'node:process'
 import { basename, extname, join } from 'node:path'
@@ -149,4 +156,6 @@ await writeFile(
   )}\n`,
 )
 
+await appendFile(new URL('./.npmignore', packageRoot), `\ntsconfig.*\n`)
+
 console.log('Done')