We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
hygen
I want to get the string output only for each template within my program.
I tried the following code, and see that the log statements I added didn't run.
const { runner } = require('hygen') const Logger = require('hygen/dist/logger').default const path = require('path') const defaultTemplates = path.join(__dirname, 'templates') runner(process.argv.slice(2), { templates: defaultTemplates, cwd: process.cwd(), logger: new Logger(console.log.bind(console)), createPrompter: () => require('enquirer'), exec: (action, body) => { console.log(action); console.log(body); const opts = body && body.length > 0 ? { input: body } : {} //return require('execa').shell(action, opts) }, debug: !!process.env.DEBUG })
I tried the following code, and see the result is not the string content that I expected.
const { runner } = require('hygen') const Logger = require('hygen/dist/logger').default const path = require('path') const defaultTemplates = path.join(__dirname, 'templates') let p = runner(process.argv.slice(2), { templates: defaultTemplates, cwd: process.cwd(), logger: new Logger(console.log.bind(console)), createPrompter: () => require('enquirer'), debug: !!process.env.DEBUG }) p.then(console.log);
So my question is, can I use hygen to get the string output only (for each template)?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I want to get the string output only for each template within my program.
I tried the following code, and see that the log statements I added didn't run.
I tried the following code, and see the result is not the string content that I expected.
So my question is, can I use
hygen
to get the string output only (for each template)?The text was updated successfully, but these errors were encountered: