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

feat(create-vuepress): add create-helper (close #1) #15

Merged
merged 11 commits into from
Jan 26, 2024
Merged

Conversation

Mister-Hope
Copy link
Member

No description provided.

@Mister-Hope Mister-Hope linked an issue Dec 29, 2023 that may be closed by this pull request
Copy link

github-actions bot commented Dec 29, 2023

Pull Request Test Coverage Report for Build 7664516576

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 60.194%

Totals Coverage Status
Change from base Build 7664484376: 0.0%
Covered Lines: 48
Relevant Lines: 75

💛 - Coveralls

create/package.json Outdated Show resolved Hide resolved
@nruffing
Copy link
Contributor

  • Should we generate a .gitignore or try to append to an existing one?

  • Should we add a typescript option?

These might be better as a future enhancement.

@Mister-Hope
Copy link
Member Author

Mister-Hope commented Jan 1, 2024

typescript is not actually needed bro, all ts files are handled by esbuild, and editors like vscode can use built-in ts lib to parse the project.

since we are not generating git project, I remove the .gitignore logic.

you can try pnpm create vuepress-theme-hope, it has more logic. The create helper is modified from it.

@nruffing
Copy link
Contributor

nruffing commented Jan 1, 2024

For typescript I was referring to adding an option to generate the vuepress site with *.ts files instead of *.js. This would be similar to the option in the the create vue template using pnpm create vue.

@Mister-Hope
Copy link
Member Author

cc @nruffing Could you please check this again?

@meteorlxy meteorlxy changed the title feat: add create-helper feat(create-vuepress): add create-helper (close #1) Jan 24, 2024
bundler,
}: CreatePackageJsonOptions): Promise<void> => {
const packageJsonPath = join(targetDir, 'package.json')
// TODO: Update it
Copy link
Member

@meteorlxy meteorlxy Jan 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can make use of npm view vuepress@next version command to get the latest version. ref code

Copy link
Member Author

@Mister-Hope Mister-Hope Jan 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am negative towards it, a lot of area in China can counter timeout at this stage.

E.g.: yarn is using a different config, and users can still meet timeout with the default registry even if they set mirror registry in yarn.

Also, we are likely to ship breaking changes in the comming rc versions, so fixing it to a exact version should be the best choice at this momenet.

However we can improve this later once vuepress2 reach stable.

@Mister-Hope
Copy link
Member Author

Mister-Hope commented Jan 24, 2024

For typescript I was referring to adding an option to generate the vuepress site with *.ts files instead of *.js. This would be similar to the option in the the create vue template using pnpm create vue.

This could be am improvement, but I don't think this is needed. Here are reasons:

  • Vue need this because typescript need to be manually installed and @vue/eslint-config-typescript, vue-tsc and other tools could be handed. Also it's vue's job to show users how to write typescript in vue sfc, and how vue sfc are imported (and correctly type resolved) in ts files. However we do not need to show users the above things.

  • We already ask users a lot of questions, like language, bundler, preset, workflow, etc.

  • Expert users which are familiar with typescript and vue projects should have no issue converting the existing files to TypeScript.

  • A lot of our users may even not familiar with JavaScript (Not frontend coders). JavaScript should be better for them an we should not question these people about it.

  • The docs config file can be converted to ts just by changing the extension name.

So under this point of view, rare people would benefit from this config, so I think this is not needed.

@Mister-Hope Mister-Hope merged commit 531a7e8 into main Jan 26, 2024
41 checks passed
@Mister-Hope Mister-Hope deleted the create-helper branch January 26, 2024 07:14
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

Successfully merging this pull request may close these issues.

[Feature request] Create helper
3 participants