Comments (7)
When I first started writing this npm module I had the same idea in mind and felt I was fighting the convention. But after talking with Yehuda Katz about how the core team expected build tool developers to deal with nested templates, it was clear that if your routes are nested => the templates themselves will also be nested on the file system. And after a little time with the convention it was clear this constraint was something I should embrace.
In addition to the core view on how templates should be precompiled I also feel this convention keeps the module dead simple and easy to use (assuming you can get past wanting more control over template names)
I hope you can understand my opinion on this subject. At this time I'm planning to keep the module as is (with no option to set the name explicitly)
from django-ember-precompile.
perhaps I should have been a little clearer,
My wish is not to override the names of the templates to conflict with the ember conventions, but rather to override your own.
in my own projects I use /static/app/hbs/template.hbs
even a command line switch to set the base directory and extension would be sufficient I believe.
However, if you do not wish to make these changes I can do them myself and simply not merge them back.
from django-ember-precompile.
Interesting - what does that .hbs file extension do for you specifically? I thought that was more for rails specific/ pipeline stuff?
from django-ember-precompile.
I think offering both .handlebars and .hbs as valid extensions would be fine -I'll add this over the weekend :)
Look for a 1.0.3 release on Saturday
from django-ember-precompile.
COMPRESS_PRECOMPILERS = (
('text/x-handlebars', 'django-ember-precompile --ext .hbs --root hbs {infile}'),
)
given the filename /static/app/hbs/template.hbs
it should do the following with the flags
--root hbs
- split at path.sep + 'hbs' + path.sep
and keep only the second half
--ext .hbs
- remove the extension .hbs
sane defaults of --root templates
and --ext .handlebars
when no options are specified would prevent any sort of breakage in existing deployments
from django-ember-precompile.
The more I read into this it seems like you want the extensibility that I don't want to add -fair to say?
If that is the case -any reason you can't just stick to the name "templates" and .handlebars ? or .hbs ?
from django-ember-precompile.
One great question worth asking is -do you want to change this just because you don't like the directory name "templates" or are you using another library that conflicts with this and that other library requires "hbs" / etc ?
If enough people are using another conflicting library (for something server side lets say) I might consider it, but if this configuration is just for configuration sake I'd rather not include it
from django-ember-precompile.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-ember-precompile.