Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Want to learn: "@sveltejs/kit": "npm:@tal500/[email protected]", where did this package pull from? Do you have an article? #3

Closed
xuxchao opened this issue Mar 24, 2023 · 7 comments

Comments

@xuxchao
Copy link

xuxchao commented Mar 24, 2023

Thanks thank you

@Tal500
Copy link
Owner

Tal500 commented Mar 24, 2023

I used Google translate and the result is "thanks thanks".

You're welcome!

@Tal500 Tal500 closed this as completed Mar 24, 2023
@xuxchao
Copy link
Author

xuxchao commented Mar 24, 2023

Want to learn: "@sveltejs/kit": "npm:@tal500/[email protected]", where did this package pull from? Do you have an article?

@xuxchao
Copy link
Author

xuxchao commented Mar 24, 2023

The main content is the title, not just the content. Hey hey

@Tal500
Copy link
Owner

Tal500 commented Mar 24, 2023

Ah OK, please write this in English so I can understand better.

You asked where the package is from, so the short answer is:
https://www.npmjs.com/package/@tal500/kit

This is a fork of SvelteKit 'kit' package I'm maintaining of PR sveltejs/kit#6265(and all the info appears there), until hopefully legacy support will be merged.
You can see in this page that the "homepage" field refer to the branch 'legacy-builds-versioning', which is a fork of the branch 'legacy-builds' for "temporary" clean fork NPM version purpose.

Hope it answers, you're welcome also to maintain your own fork of PR sveltejs/kit#6265 if you wish to use it carefully since it's unofficial.

Additionally, I'll edit and translate your messages for now.

@Tal500 Tal500 changed the title 想学习一下: "@sveltejs/kit": "npm:@tal500/[email protected]", 这个是从哪里拉取的包呢?有文章么? Want to learn: "@sveltejs/kit": "npm:@tal500/[email protected]", where did this package pull from? Do you have an article? Mar 24, 2023
@xuxchao
Copy link
Author

xuxchao commented Mar 24, 2023

Oh, oh, OK. Thank you for your answer. Originally, it was also published to the npm repository. I am just wondering why we need to specify an npm:?

@Tal500
Copy link
Owner

Tal500 commented Mar 24, 2023

Oh, oh, OK. Thank you for your answer. Originally, it was also published to the npm repository. I am just wondering why we need to specify an npm:?

This line of code:

"@sveltejs/kit": "npm:@tal500/[email protected]",

tells to NPM: "Install the package @tal500/[email protected], but name it as a package named "@sveltejs/kit"".

This makes all the import ... from "@sveltejs/kit/*" to work, even thought the NPM package name is now forked to be "@tal500/kit".
An example of such import, in:

import { sveltekit } from '@sveltejs/kit/vite';

@xuxchao
Copy link
Author

xuxchao commented Mar 24, 2023

Oh, I see. Thanks for clarification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants