Skip to content

Instantly share code, notes, and snippets.

@anthonyec
Created April 13, 2023 20:21
Show Gist options
  • Save anthonyec/7e009b40e582a938ea45f89d26f5bdf9 to your computer and use it in GitHub Desktop.
Save anthonyec/7e009b40e582a938ea45f89d26f5bdf9 to your computer and use it in GitHub Desktop.
TS Pack output for Vector2
🩺 Verifying Package.json...
Common JS Package Detected
βœ“ - Exports Common JS
βœ“ - Exported Common JS Correct File Extension
β—‹ - Exports ES Module
β—‹ - Exports Types for developers
Exporting types, while optional, aid developers who consume your library.
Add "types": "<dist folder>/<@types folder>/index.d.ts" to give them a hand!
β—‹ - Limited files packaged on release
To limit release size, only include build folder with "files" property.
Package.json and README.md will automatically be packaged.
i.e.:
{
"files": ["dist"],
}
βœ• - Additional bundler support - Root
Additional generations of bundler support can be added with "exports" in package.json.
A root exports property (".") informs the consuming resolver to use CJS or ESM.
i.e.:
{
"exports": {
".": {
// [...]
}
}
}
βœ• - Additional bundler support - Root Common JS
Inform bundlers to use the Common JS Bundle when using the keyword "require"
i.e.:
"exports": {
".": {
"require": "./<dist>/<common js folder>/index.cjs"
}
}
πŸ“¦ Verifying Pack Config...
β—‹ - Input file configured
Pack is using a default configuration for it's input file (src/index.ts)
β—‹ - Typescript configured
Pack is using a default configuration for it's typescript (tsconfig.json)
βœ“ - Input file found
βœ“ - tsconfig file found
➜ 230126_vector2 git:(main) βœ— node_modules/.bin/ts-pack -d
πŸš€ Running Pack: @anthonyec/vector2@0.0.1
🩺 Verifying Package.json...
Common JS Package Detected
βœ“ - Exports Common JS
βœ“ - Exported Common JS Correct File Extension
β—‹ - Exports ES Module
βœ“ - Exports Types for developers
βœ“ - Exported Types Correct File Extension
β—‹ - Limited files packaged on release
To limit release size, only include build folder with "files" property.
Package.json and README.md will automatically be packaged.
i.e.:
{
"files": ["dist"],
}
βœ• - Additional bundler support - Root
Additional generations of bundler support can be added with "exports" in package.json.
A root exports property (".") informs the consuming resolver to use CJS or ESM.
i.e.:
{
"exports": {
".": {
// [...]
}
}
}
βœ• - Additional bundler support - Root Common JS
Inform bundlers to use the Common JS Bundle when using the keyword "require"
i.e.:
"exports": {
".": {
"require": "./<dist>/<common js folder>/index.cjs"
}
}
βœ• - Additional bundler support - Root Types
Inform bundlers to use the Types declaration file
i.e.:
"exports": {
".": {
"types": "./<dist>/<@types folder>/index.d.ts"
}
}
πŸ“¦ Verifying Pack Config...
β—‹ - Input file configured
Pack is using a default configuration for it's input file (src/index.ts)
β—‹ - Typescript configured
Pack is using a default configuration for it's typescript (tsconfig.json)
βœ“ - Input file found
βœ“ - tsconfig file found
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment