Skip to content
This repository was archived by the owner on Feb 21, 2025. It is now read-only.

Conversation

@haoxins
Copy link
Owner

@haoxins haoxins commented Jan 13, 2015

close #27

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) when pulling 40f7da5 on conditional into 3d2c461 on master.

@haoxins
Copy link
Owner Author

haoxins commented Jan 13, 2015

@TrySound

sorry for the delay. Please take a glance at this. The code, doc, ...

It should work 😄

@haoxins haoxins merged commit 40f7da5 into master Jan 14, 2015
@haoxins haoxins deleted the conditional branch January 14, 2015 08:51
@TrySound
Copy link
Collaborator

Thanks a lot!
Do you still consider meta-templater as dependancy?

It uses non-strict eval() instead of with. But I think 'evil' more civil than bad 'with' practice.

And JSON sucks in this cool constructions. I forgot about double quotes 10 times for a project.
JSON have no place here, I think.

MT can parse fully JS in arguments. It's flexible and dangerous, but we will not talk about it;))

By extending handlers we could do this:

.pipe(fileInclude({
    handlers: {
        part: function (args) {
            this.include('components/' + args[0] + '.html', args[1]);
        }
    }
}))

It's a little sugar by userself.

And those uninteresting suffixes:))

What do you think?

@haoxins
Copy link
Owner Author

haoxins commented Jan 15, 2015

Do you still consider meta-templater as dependancy?

yes, but not soon. 😢

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Conditional include with variables

4 participants