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

Chore: conflate templates #58

Merged
merged 7 commits into from
Apr 12, 2016
Merged

Conversation

lyzadanger
Copy link
Contributor

Per #56 ... this PR combines the previous partials and layouts src objects in the options object, which did pretty much the same thing. Now there is a single templates src, defaults to:

templates: {
    basedir: 'src/templates',
    glob: 'src/templates/**/*'
  }

All files matching glob are parsed, registered as partials on Handlebars and made available on drizzleData.templates for the rest of the build. README and tests are updated accordingly; several modules renamed from layouts -> templates. Various tests added and passing.

Fixes #56

registerPartials(options.src.partials, options), // Partials as partials
registerPartials(options.src.patterns, options, 'patterns'), // Patterns
registerPartials(options.src.layouts, options) // Layouts as partials
registerPartials(options.src.templates, options), // Partials as partials
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick. Should it be // Templates as partials? :)

@gerardo-rodriguez
Copy link
Member

Nitpick comment. LGTM! 👍

@lyzadanger lyzadanger merged commit 5f1d986 into feature-rewrite Apr 12, 2016
@lyzadanger lyzadanger deleted the chore-conflate-templates branch April 12, 2016 17:56
@lyzadanger lyzadanger mentioned this pull request Apr 12, 2016
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