-
-
Notifications
You must be signed in to change notification settings - Fork 89
Description
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:
[email protected] - 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.jsonin the project root:{ "enexSources": ["path/to/any.enex"], "outputDir": "./output", "template": "./yarle-template.tmpl", "isMetadataNeeded": true, "skipSubjectDate": false } - Create
yarle-template.tmplin 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.