tabtab icon indicating copy to clipboard operation
tabtab copied to clipboard

feat!: bundle template files as 1 json file

Open KSXGitHub opened this issue 1 year ago • 3 comments

This should allow the pnpm build script to stop copying the template files from this library to pnpm's dist assuming the bundle script used by pnpm can bundle JSON.

BREAKING CHANGE: getCompletionScript no longer returns a Promise

KSXGitHub avatar Oct 01 '24 12:10 KSXGitHub

What is the benefit of this approach?

zkochan avatar Oct 01 '24 13:10 zkochan

The location of the template files is an implementation details. Bundlers shouldn't need to know this location.

This PR would convert the template files from static assets that need to be manually read with fs and copied to the correct location during the bundling process into module files that can simply be required. This would allow bundlers to work with @pnpm/tabtab out of the box. The bundler would embed the template data directly in the resulting JavaScript file as an object of strings.

KSXGitHub avatar Oct 01 '24 13:10 KSXGitHub

ok, but we already have this configured for pnpm or is this change for other consumers?

zkochan avatar Oct 01 '24 13:10 zkochan