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

[Feature]: varlet cli config support use typescript #720

Closed
1 task done
nonzzz opened this issue Oct 12, 2022 · 3 comments
Closed
1 task done

[Feature]: varlet cli config support use typescript #720

nonzzz opened this issue Oct 12, 2022 · 3 comments

Comments

@nonzzz
Copy link
Contributor

nonzzz commented Oct 12, 2022

Feature request 🚀

Expected:

  • Just a discussion. I think we can load .ts file. For more type safety.
  • Export function defineConfig for javascript user.

Examples:

// varlet.config.js

import { defineConfig } from '@varlet/cli'

export default defineConfig({
 // will be implemented.
})

Others:

  • I'm glad to do it. If you think it's useful.
@haoziqaq
Copy link
Member

ok i expect to implement the config file for the commonjs module

We have plans to refactor the cli into the target module as esm in the future. so don't go to support the ts config file.
So there is no need to support esm and ts configuration files for the time being

@haoziqaq
Copy link
Member

You can separate the command parsing part into bin.js, and expose the defineConfig method in index.js

@nonzzz
Copy link
Contributor Author

nonzzz commented Oct 12, 2022

You can separate the command parsing part into bin.js, and expose the defineConfig method in index.js

oh right. I will do this

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