Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Vayel
Copy link

@Vayel Vayel commented Mar 12, 2014

No description provided.

@AnthonyMDev
Copy link

Where do you need to provide the variables for including from a variable with this commit?

@Vayel
Copy link
Author

Vayel commented May 8, 2014

First of all, sorry for my French English.

Line 159, we split the include's path : paths.dir.to.file becomes ['paths', 'dir', 'to', 'file']
Then, options contains the vars passed to EJS, so we check if options.paths.dir.to.file exists,
by looking for options.paths, then options.paths.dir...

So, to include a file from a var, you just need to write : include paths.foo.bar and, on the condition that you passed a var paths.foo.bar to EJS when compiling, it'll include the file having the content of paths.foo.bar as path.

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.

2 participants