Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Allow dash for folder and file names? #43

Closed
pixelfreak opened this Issue Sep 13, 2012 · 2 comments

Comments

Projects
None yet
3 participants
Contributor

pixelfreak commented Sep 13, 2012

If I do this:

this.match('find-a-product', 'find-a-product#index');

It'll look for views/find_a_product/index.jade. Is it possible to use dash instead?

Is it a common naming convention in Node.js to use underscore?

Thanks!

I haven't seen a leading convention yet. I know in Ruby, underscores became popular because the language style is to use snake_case. In Javascript, it's camelCase so maybe directories should be like that?

Owner

jaredhanson commented Nov 28, 2013

View paths use underscore by convention in Locomotive. In 0.4.x it'll be possible to change this, using notation like:

this.views.resolve.use(require('../resolvers/camelCase')());

I'm not going to encourage or formally document this though, and implementing the resolver will be left to the developer.

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