Comments (9)
Please see my comment here https://github.com/dgeb/grunt-contrib-ember/issues/1#issuecomment-9004473 and let me know if you're still having trouble.
from grunt-ember-templates.
So $ yeoman ember_handlebars
works. Also $ yeoman ember_handlebars reload
does work (gives a warning <WARN> Cannot call method 'reload' of undefined Use --force to continue. </WARN>
though.
I have ember_handlebars
in initConfig
and also in watch
as in your example and it does nothing when I enter yeoman server
. Also no output about ember.
from grunt-ember-templates.
Have you tried cloning and running my example directly? https://github.com/dgeb/yeoman-ember-basic-example
After cloning, browse to the dir, run npm install grunt-contrib-ember
, then yeoman ember_handlebars
, then yeoman server
(these steps will be reduced if this plugin gets added to yeoman itself).
from grunt-ember-templates.
Ok, actually it works but only if I do $ yeoman ember_handlebars
before running the server. I expected it to work with just running the server. Is this expected behavior? If yes, would be good to add it to the README.
Thanks a lot for your support!
from grunt-ember-templates.
Glad you got it working, but I agree that the extra step shouldn't be necessary. I'll leave this ticket open and try to tackle that soon.
from grunt-ember-templates.
I'm afraid there's no way to cleanly plug the task in somewhere. My own solution is to add the following to the end of the Gruntfile:
// We need to add task 'ember_templates' to almost all tasks.
// By adding it to 'clean' we make sure it is called whenever something new
// is started so this seems to be the "cleanest" hack at the moment.
grunt.renameTask('clean', 'yeoman-clean');
grunt.registerTask('clean', 'yeoman-clean ember_templates');
from grunt-ember-templates.
I found this in the example @dgeb provided and put it in my Gruntfile.js:
watch: {
...
ember_templates: {
files: 'app/scripts/**/*.handlebars',
tasks: 'ember_templates reload'
},
...
}
The templates get recompiled when I change any of the .handlebars files. Does it mean, that this issue is fixed by now?
If so, shouldn't this be added to the example?
from grunt-ember-templates.
@xMartin thanks for your workaround! I added it to my example until there's a cleaner way to customize tasks.
@nhoffmann Good idea - I probably should add the watch
example to my plugin's README. You're right that, with this configuration change, templates get recompiled when any .handlebars file changes are made. This has always worked. However, the annoyance that @xMartin has worked around is the need to explicitly run yeoman ember_handlebars
with a fresh app or after a clean. Ideally, there should be a "cleaner" way to modify tasks.
from grunt-ember-templates.
The README now includes ember_templates
configuration and watch
examples. I'm going to leave out yeoman-specific configuration steps for now.
from grunt-ember-templates.
Related Issues (20)
- Could you please upgrade to ember 2.17.0? HOT 4
- Add an option to print the output in CommonJS style HOT 1
- Errors don't show where they are occurring HOT 2
- Plugin setup HOT 1
- jshint complain about using dot notation HOT 1
- Please update to use handlebars 2.0.0 HOT 6
- ember-template-compiler dependency targets alpha version HOT 7
- Generating templates as "[object Object]". HOT 6
- Templates not redendering anymore in EmberJS app after upgrade from v 0.4.22 HOT 1
- Handlebars 2.0.0
- Ember-template-compiler version conflict HOT 1
- New release with latest changes? HOT 2
- Does not work for ember versions > 1.9.1 HOT 3
- Window not defined HOT 1
- template compilation with ember 2.0.0 fails HOT 8
- Segmentation Fault HOT 4
- Request for Maintainer HOT 5
- Doesn't work with ember-templates-compiler 2.7.2, but works with 2.3.0 HOT 2
- Failure compiling templates with ember#2.11.0-beta.3 HOT 7
- Add grunt-ember-templates build against latest ember HOT 2
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 grunt-ember-templates.