-
-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
I use Generate to create my own generators and engine as template engine.
When in a template I have a line including a template string (${myVar}), engine seems trying to find the myVar value to inject it in the template.
But here I'm generating a file containing some template strings like in es6 template strings of bash template string.
See below:
- generate generator project: https://github.com/rbecheras/generate-swap-project
- issue: Generate gitlab CI file sirap-group/generate-swap-project#31
- PR: Resolve #31 "generate gitlab ci" sirap-group/generate-swap-project#80
- travis failling: https://travis-ci.org/rbecheras/generate-swap-project/builds/326427995?utm_source=github_status&utm_medium=notification
- My template: https://github.com/rbecheras/generate-swap-project/blob/31-generate-gitlab-ci/src/assets/templates/generate-swap-gitlabci/_gitlab-ci.yml
- The line in the template that throws th ReferenceError: https://github.com/rbecheras/generate-swap-project/blob/31-generate-gitlab-ci/src/assets/templates/generate-swap-gitlabci/_gitlab-ci.yml#L36
- screenshots:
As you can see, here the template for the generating file .gitlab-ci.yml include the following line:
name: ${CI_COMMIT_REF_NAME}${CI_JOB_NAME}
But I need this line to be unchanged after the template have been rendered.
- How to escape the expressions
${myVar}in aenginetemplate ? - Is the expressions
${myVar}and<%= myVar %>equivalent ?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels

