Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/create-vite/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
// @ts-check
const fs = require('fs')
const path = require('path')
const argv = require('minimist')(process.argv.slice(2))
// Avoids autoconversion to number of the project name by defining that the args
// non associated with an option ( _ ) needs to be parsed as a string. See #4606
const argv = require('minimist')(process.argv.slice(2), { string: ['_'] })

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I found it's hard to understand what's going on. We'd better add a comment for that, or just use toString() on usage.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@antfu
Thanks for your comment!

I agree with it's hard to undarstand what's going on. So, I've added a comment for that.
Could you review that?

Thanks.

// eslint-disable-next-line node/no-restricted-require
const prompts = require('prompts')
const {
Expand Down