Hello,
I've encountered a persistent issue where YARLE ignores the template setting in a local config.json file when executed as an npm script. It consistently falls back to the built-in default template, resulting in incorrect output.
Environment:
- OS: Windows 11
- YARLE Version:
yarle-evernote-to-md@6.16.0
- Execution Method:
npm run <script_name> from a local project.
Problem Description:
Even when providing a valid config.json via the --configFile flag, and after ensuring no global config exists in %APPDATA%, the conversion log shows that currentTemplate is the default YARLE template, not the content of the file specified in the template property.
Steps to Reproduce:
- Create a new folder and run
npm init -y.
- Install YARLE:
npm install --save-dev yarle-evernote-to-md
- Create
config.json in the project root:
{
"enexSources": ["path/to/any.enex"],
"outputDir": "./output",
"template": "./yarle-template.tmpl",
"isMetadataNeeded": true,
"skipSubjectDate": false
}
- Create
yarle-template.tmpl in the project root:
---
tags: [{tags}]
created: "{created-at}"
---
# {title}
{content}
- Add a script to
package.json:
"scripts": {
"convert": "yarle --configFile ./config.json"
}
- Run the script:
npm run convert
Expected Behavior:
The output Markdown files should be formatted according to yarle-template.tmpl. The conversion log should show the custom template string in the currentTemplate field.
Actual Behavior:
The output uses the default YARLE template. The conversion log shows the default template string in the currentTemplate field, proving the custom template file was not loaded.
Hello,
I've encountered a persistent issue where YARLE ignores the
templatesetting in a localconfig.jsonfile when executed as an npm script. It consistently falls back to the built-in default template, resulting in incorrect output.Environment:
yarle-evernote-to-md@6.16.0npm run <script_name>from a local project.Problem Description:
Even when providing a valid
config.jsonvia the--configFileflag, and after ensuring no global config exists in%APPDATA%, the conversion log shows thatcurrentTemplateis the default YARLE template, not the content of the file specified in thetemplateproperty.Steps to Reproduce:
npm init -y.npm install --save-dev yarle-evernote-to-mdconfig.jsonin the project root:{ "enexSources": ["path/to/any.enex"], "outputDir": "./output", "template": "./yarle-template.tmpl", "isMetadataNeeded": true, "skipSubjectDate": false }yarle-template.tmplin the project root:--- tags: [{tags}] created: "{created-at}" --- # {title} {content}package.json:npm run convertExpected Behavior:
The output Markdown files should be formatted according to
yarle-template.tmpl. The conversion log should show the custom template string in thecurrentTemplatefield.Actual Behavior:
The output uses the default YARLE template. The conversion log shows the default template string in the
currentTemplatefield, proving the custom template file was not loaded.