This repository was archived by the owner on Feb 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
This repository was archived by the owner on Feb 19, 2022. It is now read-only.
Doc Bug: require is not supported in init.js #32
Copy link
Copy link
Closed
Labels
Description
I'm trying to use the "File Name Parsing" feature of builder-init:
This works (https://github.com/plotly/dash-components-archetype/tree/template-file-name-prompt):
- I have in
init.jsa{{packageName}}prompt - I have an
init/{{packagename}}.txtfile
Result:
~/dev/plotly/test$ builder-init "`pwd`/../dash-components-archetype"
dash-components-archetype-0.1.3.tgz
[builder-init] Preparing templates for: dash-components-archetype
? Please name your component suite. foo-prompted
? Enter a description Dash UI component suite
? GitHub organization or user name
? License organization (e.g., you or your company)
? Destination directory to write foo-prompted
[builder-init] Wrote files:
- foo-prompted/.babelrc
- foo-prompted/.builderrc
- foo-prompted/LICENSE.txt
- foo-prompted/README.md
- foo-prompted/package.json
- foo-prompted/.eslintrc
- foo-prompted/.gitignore
- foo-prompted/.npmignore
- foo-prompted/foo-prompted.txt
- foo-prompted/src/index.js
- foo-prompted/src/components/ExampleComponent.react.js
[builder-init] New dash-components-archetype project is ready at: foo-prompted
This does not work (https://github.com/plotly/dash-components-archetype/tree/template-file-name-derived):
- I have in
init.jsa{{capitalCamelCasePackageName}}derived field - I have an
init/{{capitalCamelCasePackageName}}.txtfile
Result:
EDITED: I copy-pasted the wrong error here before.
~/dev/plotly/test$ builder-init "`pwd`/../dash-components-archetype"
dash-components-archetype-0.1.3.tgz
[builder-init] Preparing templates for: dash-components-archetype
? Destination directory to write yeah-man
Error: Unknown token: 'capitalCamelCasePackageName' for path: /var/folders/dr/4nn6l7t17cvdjcmx6tdtvgrr0000gp/T/builder-init116530-32509-elt0x8/extracted/init/{{capitalCamelCasePackageName}}.txt
Note: When using the derived field, the first prompt is "? Destination directory to write", not "? Please name your component suite."
Repro:
git clone git@github.com:plotly/dash-components-archetype.git
cd dash-components-archetype
git checkout template-file-name-derived
npm install
cd ..
npm install -g builder-init
builder-init "`pwd`/../dash-components-archetype"
# now enter a valid package name like "foo-component-suite"Reactions are currently unavailable