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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose fs as an option to override the default implementations #138

Merged
merged 1 commit into from
Jun 27, 2019

Conversation

pmalouin
Copy link
Contributor

@pmalouin pmalouin commented Jun 27, 2019

As discussed in #131 , this PR exposes a new fs option that allows to change how files are read from the file-system. The fs module is used while rendering "partials" and "includes" and also when calling engine.renderFile().

The option is optional. When omitted, the engine follows the current behavior of loading via the native fs module (Node.js) or via an AJAX request (browser).

Overriding the fs option can be used for specific use cases. Examples:

Closes #131

Feedback appreciated 馃檱

@harttle harttle merged commit edb2cc1 into harttle:master Jun 27, 2019
harttle added a commit that referenced this pull request Jun 27, 2019
harttle pushed a commit that referenced this pull request Jun 27, 2019
# [8.3.0](v8.2.4...v8.3.0) (2019-06-27)

### Features

* fs option implemented by [#138](#138) ([3f5e23c](3f5e23c))
@harttle
Copy link
Owner

harttle commented Jun 27, 2019

馃帀 This PR is included in version 8.3.0 馃帀

The release is available on:

Your semantic-release bot 馃摝馃殌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Preventing file-system access via include/layouts
2 participants