Package typings not following package's folder hierachy? #6267
Unanswered
haleksandre
asked this question in
Q&A
Replies: 2 comments
-
I "fixed" this for myself with this little node script. But indeed this should be fixed directly in import * as fs from 'fs/promises';
await processDir('');
await fs.rm('package/lib', {recursive: true});
async function processDir(path) {
const dir = await fs.opendir(`package/lib${path}`);
for await (const item of dir) {
if (item.isDirectory()) {
await processDir(`${path}/${item.name}`);
} else if (item.isFile() && !item.name.includes('.spec.') && !item.name.includes('.stories.')) {
const srcPath = `package/lib${path}/${item.name}`;
const destPath = `package${path}/${item.name}`;
await fs.cp(srcPath, destPath, {force: true});
}
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
That's strange, it should work as you expect. Is this reproducible with a simple hello world component example? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
When packaging I noticed the declaration files matches the original folder hierarchy
package/src/lib/[folders] but not the package's
package/[folders]`?Here's an example of what I mean:
Shouldn't the
package/src/lib/components/button.svelte.d.ts
be generated like sopackage/components/button.svelte.d.ts
so that both the ts/svelte file & it's delaration are side by side?Beta Was this translation helpful? Give feedback.
All reactions