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

Add the stringify method #24

Open
sergkudinov opened this issue May 13, 2019 · 2 comments
Open

Add the stringify method #24

sergkudinov opened this issue May 13, 2019 · 2 comments

Comments

@sergkudinov
Copy link
Contributor

sergkudinov commented May 13, 2019

Add the stringify method, documentation and tests.

The method converts an array, which is result of the compile method, to a CLI command string. For example:
If the Parameters config is:

{
  commands: { 
    'start': {
      options: {
        'myparam': {}
}  }  }  }

The script like this:

parameters(config).stringify({
  command: 'start',
  myparam: 'my value'  
})

will output this:

process.execPath ./bin/myscript start --myparam ‘my value'
@wdavidw
Copy link
Member

wdavidw commented May 14, 2019

I dont understand, is it exactly what stringify (soon to be called compile) method is doing ? Stringify, in its new version shall return a string, not an array.

@sergkudinov
Copy link
Contributor Author

Forgot to change copy paste. Changed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants