Comments (4)
Interestingly, it does work this way... (when helps is supplied as an option)
const cli = meow({
help,
argv: ['--root', 'foo']
})
console.log(cli.flags) // { root: 'foo' }
console.log(cli.input) // []
But does not work this way... (when help is a param)
const cli = meow(help, {
argv: ['--root', 'foo']
})
console.log(cli.flags) // {}
console.log(cli.input) // []
from meow.
You need to supply the exact format as process.argv
including the first two arguments with the node binary.
from meow.
Why are you using that option? It's really only meant for testing or if you do any preprocessing of argv.
from meow.
from meow.
Related Issues (20)
- Use Node.js builtin HOT 4
- What is the test coverage? HOT 5
- `allowUnknownFlags: false` prevents aliases for `help` and `version`. HOT 3
- Remove `trim-newlines` dependency HOT 4
- ExperimentalWarning when using Meow with modules HOT 4
- Is it possible to make input required? HOT 3
- Improve importMeta message -`meow - The 'importMeta' option is required. Its value must be 'import.meta' at meow` HOT 7
- Expose package.json version as property HOT 4
- Allow single line help messages HOT 11
- Refactor HOT 6
- Question: huge bundle size? HOT 2
- Choices? HOT 2
- flag.default values validation is faulty
- Feature Proposal - Disable Indent HOT 12
- `meow(...).flags` is `any` in 12.1.0 HOT 1
- Add "types" field in package.json HOT 2
- typescript definitions stopped working HOT 2
- String value converted to Num HOT 2
- Remove hard-rejection
- ESLint `import/no-unresolved` false positive when module is imported HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meow.