Comments (3)
That's not currently possible. It's easy enough to check the input manually and throw an error if it's not valid.
from meow.
Since this is simple to do, itβd make it all the more convenient for meow
to support this. It could be an option (like isRequired
for flags):
const cli = meow({
// β¦
inputIsRequired: true,
});
I think a simple boolean would be enough, but a function could be accepted like IsRequired
for completeness.
from meow.
We may want more options for the input
in the future, so I would go with {input: {isRequired: true}}
.
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
- 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.