question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is there a way to pass an input in one single commands?

See original GitHub issue

So we can call the command like this: node ./tools/generate.js --create-service "replace_string_1" "replace_string_2" --overwrite

Is there a way to do that?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:18 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
codeBeltcommented, May 9, 2020

I like your idea on having another method like generateFromCommandLine.

// Prompt (Current way)
const { generateTemplateFiles } = require('generate-template-files');

// Command Line way
const { generateFromCommandLine } = require('generate-template-files');

This will keep the current keep @CGeorges happy on how he is doing things and having another method will allow us to control them independently.

I few other name idea in no particular order:

  • generateTemplateFilesWithoutPrompts
  • generateTemplateFilesCommandLine
  • generateTemplateFilesCli
  • generateFromCommandLine

Version 2.4.0 has the command line code that breaks existing usages so I have published another version 2.4.1 removing the command line code. Once I have figured out the new way of writing the command line version I will make a 3.0.0 release.

1reaction
codeBeltcommented, May 3, 2020

Added Command Line Functionality to v2.4.0 and is now published https://www.npmjs.com/package/generate-template-files

Read more comments on GitHub >

github_iconTop Results From Across the Web

Best practice for passing a single line of input to a command's ...
I have a command-line program which takes input from stdin. What's the best way for me to pass a line of stdin into...
Read more >
Pass the Output of a Command as an Argument for Another
In this tutorial, we'll explore some scenarios on how we can use the output of programs as arguments to others.
Read more >
What is the proper way to pass user input to package ...
What is the proper way to pass user input to package commands? · A user entry command \NewDocumentCommand \myAssessments {O{I} O{cc} +m} ·...
Read more >
Automatically enter input in command line - Ask Ubuntu
Just put your desired user input into your input.txt file, whatever answers you want - y, n, digits, strings, etc. Share.
Read more >
Command line arguments in C/C++ - GeeksforGeeks
Argv[0] is the name of the program , After that till argv[argc-1] every element is command -line arguments. For better understanding run this ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found