Skip to content
New issue

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

pass options to the engines from ecto #157

Merged
merged 1 commit into from Feb 5, 2024

Conversation

chrisllontop
Copy link
Contributor

Please check if the PR fulfills these requirements

  • Followed the Contributing guidelines.
  • Tests for the changes have been added (for bug fixes/features) with 100% code coverage.
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Currently, ecto receives an options object, but these options are not being passed to the template engines. As a result, the engines cannot be customized or configured.

export class Ecto {
	private readonly __mapping: EngineMap = new EngineMap();
	private readonly __engines: BaseEngine[] = new Array<BaseEngine>();

	private __defaultEngine = 'ejs';

	// Engines
	private readonly __ejs: EJS = new EJS();
	private readonly __markdown: Markdown = new Markdown();
	private readonly __pug: Pug = new Pug();
	private readonly __nunjucks: Nunjucks = new Nunjucks();
	private readonly __handlebars: Handlebars = new Handlebars();
	private readonly __liquid: Liquid = new Liquid();
}

Copy link

codecov bot commented Feb 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5763f47) 100.00% compared to head (3de7581) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #157   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            9         9           
  Lines          714       725   +11     
  Branches       108       109    +1     
=========================================
+ Hits           714       725   +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jaredwray jaredwray merged commit 23cee1b into jaredwray:main Feb 5, 2024
7 checks passed
@chrisllontop chrisllontop deleted the fix-options branch February 5, 2024 02:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants