Exclude unnecessary files from packages (#16374)

* Exclude unnecessary files from packages

* Add back 'copyfiles' in api to copy yaml and liquid files to dist

* Exclude declaration maps and all declaration files for drive packages

Excluding all declaration map files from published packages

Since the "drive" packages are only expected to be used internally, it's
enough to have the declaration files present when developing locally - no
need to include the types in the published packages

* Remove unnecessary entries in "files" field of app/package.json

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
This commit is contained in:
Pascal Jufer
2022-11-15 15:51:04 +01:00
committed by GitHub
parent 96de8994a3
commit df495edae0
11 changed files with 28 additions and 16 deletions

View File

@@ -59,7 +59,7 @@
"scripts": {
"start": "npx directus start",
"prebuild": "pnpm cleanup",
"build": "tsc --build && copyfiles \"src/**/*.*\" -e \"src/**/*.ts\" -u 1 dist",
"build": "tsc --build && copyfiles \"src/**/*.{yaml,liquid}\" -u 1 dist",
"cleanup": "rimraf dist",
"dev": "cross-env NODE_ENV=development SERVE_APP=false ts-node-dev --files --transpile-only --respawn --watch \".env\" --inspect=0 --exit-child -- src/start.ts",
"cli": "cross-env NODE_ENV=development SERVE_APP=false ts-node --script-mode --transpile-only src/cli/run.ts",
@@ -72,8 +72,8 @@
},
"files": [
"dist",
"LICENSE",
"README.md"
"!**/*.test.js",
"!**/__*__/"
],
"dependencies": {
"@authenio/samlify-node-xmllint": "2.0.0",

View File

@@ -10,9 +10,7 @@
"./package.json": "./package.json"
},
"files": [
"dist",
"LICENSE",
"README.md"
"dist"
],
"repository": {
"type": "git",

View File

@@ -8,6 +8,9 @@
".": "./lib/index.js",
"./package.json": "./package.json"
},
"files": [
"lib/index.js"
],
"bin": {
"create-directus-extension": "./lib/index.js",
"cde": "./lib/index.js"

View File

@@ -8,7 +8,6 @@
".": "./dist/index.js",
"./package.json": "./package.json"
},
"types": "dist/index.d.ts",
"keywords": [
"storage",
"filesystem",
@@ -35,7 +34,8 @@
"Rijk van Zanten <rijkvanzanten@me.com>"
],
"files": [
"dist"
"dist",
"!**/*.d.ts?(.map)"
],
"dependencies": {
"@azure/storage-blob": "12.12.0",

View File

@@ -8,7 +8,6 @@
".": "./dist/index.js",
"./package.json": "./package.json"
},
"types": "dist/index.d.ts",
"keywords": [
"storage",
"filesystem",
@@ -25,7 +24,8 @@
"Rijk van Zanten <rijkvanzanten@me.com>"
],
"files": [
"dist"
"dist",
"!**/*.d.ts?(.map)"
],
"scripts": {
"build": "tsc --project ./tsconfig.json",

View File

@@ -8,7 +8,6 @@
".": "./dist/index.js",
"./package.json": "./package.json"
},
"types": "dist/index.d.ts",
"keywords": [
"storage",
"filesystem",
@@ -26,7 +25,8 @@
"Rijk van Zanten <rijkvanzanten@me.com>"
],
"files": [
"dist"
"dist",
"!**/*.d.ts?(.map)"
],
"scripts": {
"build": "tsc --project ./tsconfig.json",

View File

@@ -8,7 +8,6 @@
".": "./dist/index.js",
"./package.json": "./package.json"
},
"types": "dist/index.d.ts",
"keywords": [
"storage",
"filesystem",
@@ -27,7 +26,8 @@
"Rijk van Zanten <rijkvanzanten@me.com>"
],
"files": [
"dist"
"dist",
"!**/*.d.ts?(.map)"
],
"scripts": {
"build": "tsc --project ./tsconfig.json",

View File

@@ -15,6 +15,11 @@
},
"./package.json": "./package.json"
},
"files": [
"dist",
"templates",
"!**/*.d.ts.map"
],
"types": "dist/esm/index.d.ts",
"bin": {
"directus-extension": "cli.js"

View File

@@ -8,6 +8,9 @@
"./package.json": "./package.json"
},
"types": "dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"build": "tsc --build && echo \"Built successfully\"",
"dev": "npm-watch build"

View File

@@ -33,6 +33,11 @@
},
"./package.json": "./package.json"
},
"files": [
"dist",
"!**/*.test.js",
"!**/*.d.ts.map"
],
"sideEffects": false,
"scripts": {
"build": "run-p \"build:* {@}\"",

View File

@@ -36,8 +36,6 @@
"homepage": "https://github.com/directus/directus#readme",
"files": [
"dist",
"LICENSE",
"README.md",
"index.d.ts",
"index.js"
],