Skip to content
This repository has been archived by the owner on Mar 27, 2019. It is now read-only.

use templates now for html, allow custom names #437

Closed
wants to merge 1 commit into from

Conversation

matthewmueller
Copy link
Contributor

This PR does 2 things:

  • uses the new templates key for html, jade, etc. templates
  • allows you to give custom names for example
does this component have html? yes // okay create name template.html
does this component have html? no // do not create anything
does this component have html? template.jade // create template.jade

This PR also sets a precedent that we should be requiring templates using:

// good
var template = require('./template.html');

// bad
var template = require('./template');

Personally, I think this is must more understandable and allows templates and scripts to share the same name. It's also more in line with what the templates key does.

@buschtoens
Copy link

+1


Sent from Mailbox for iPhone

On Mon, Nov 18, 2013 at 1:29 AM, Matthew Mueller notifications@github.com
wrote:

This PR does 2 things:

  • uses the new templates key for html, jade, etc. templates
  • allows you to give custom names for example
does this component have html? yes // okay create name template.html
does this component have html? no // do not create anything
does this component have html? template.jade // create template.jade

This PR also sets a precedent that we should be requiring templates using:

// good
var template = require('./template.html');
// bad
var template = require('./template');

Personally, I think this is must more understandable and allows templates and scripts to share the same name. I think with the introduction of the templates key, this is a good change.
You can merge this Pull Request by running:
git pull https://github.com/component/component update/component-create
Or you can view, comment on it, or merge it online at:
#437
-- Commit Summary --

@jonathanong
Copy link
Contributor

@matthewmueller you wanna rebase and merge this?

@jonathanong
Copy link
Contributor

componentjs/create.js#1

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

Successfully merging this pull request may close these issues.

4 participants