-
Notifications
You must be signed in to change notification settings - Fork 5
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
Unhandled rejection TypeError #12
Comments
I will look into it. Thanks |
Indeed! it is a problem. I will roll in a fix soon. |
@mattma thanks,and how can I compile my handlebars templates and concat into a templates.js without wrapping amd by using gulp-htmlbars? |
In your generated Search for task gulp.task('buildhbs', function () {
return gulp.src(clientFolder + '/app/templates/**/*.hbs')
.pipe($.htmlbars({
isHTMLBars: true,
templateCompiler: require('./client/assets/vendors/ember/ember-template-compiler')
}))
.pipe($.wrapAmd({
deps: ['exports'], // dependency array
params: ['__exports__'], // params for callback
moduleRoot: 'client/app/',
modulePrefix: 'rocks/'
}))
.pipe($.replace(
/return export default/, 'return __exports__["default"] ='
))
.pipe($.concat('templates.js'))
.pipe(gulp.dest(clientFolder + '/assets/build/'));
}); So in here |
@mattma thanks. //templates.js by using gulp-ember-template-compiler
Ember.TEMPLATES['application'] = Ember.Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
var stack1, buffer = '';//...
Ember.TEMPLATES['main'] = Ember.Handlebars.template//...
Ember.TEMPLATES['main/index'] = Ember.Handlebars.template//...
//templates.js by using gulp-htmlbars
define("application",["exports"],function(__exports__){
return __exports__["default"] = Ember.HTMLBars.template((function() {
return {
isHTMLBars: true,
blockParams: 0,
cachedFragment: null,
hasRendered: false,//...
define("main",["exports"],function(__exports__)//...
define("main/index",["exports"],function(__exports__)//... |
Have you read this post? I think it should answer your question. If you look at the code that you have attached in your questions, you should see the output of I have been busy but I will take care of this issue soon. |
@mattma thanks.I have resolved the problem.and published a plugin named gulp-ember-template which could compile the handlebars for ember.js>1.11.0. |
@surpmillet Finally get some time today to resolve this issue. Going to submit the patch soon. I did not go in-depth on your plugin. First, it is a great initiative to issue a new plugin. Here is a few things that you need to consider,
gulp-htmlbars is what I wrote which used in |
@surpmillet Could you take the latest Thanks. |
@surpmillet Just gonna close it since I had not heard anything from you. Well, if it is still an issue, please, reopen it. Thanks. |
@mattma OK,thanks for your help |
[22:51:04] [-log:] em-cli is doing REALLY hard to initialize your repo ...
Unhandled rejection TypeError: undefined is not a function
at C:\Users\she\AppData\Roaming\npm\node_modules\ember-rocks\src\commands\create.js:166:7
at tryCatcher (C:\Users\she\AppData\Roaming\npm\node_modules\ember-rocks\node_modules\bluebird\js\main\util.js:2
4:31)
at Promise._settlePromiseFromHandler (C:\Users\she\AppData\Roaming\npm\node_modules\ember-rocks\node_modules\blu
ebird\js\main\promise.js:466:31)
at Promise._settlePromiseAt (C:\Users\she\AppData\Roaming\npm\node_modules\ember-rocks\node_modules\bluebird\js
main\promise.js:545:18)
at Promise._settlePromises (C:\Users\she\AppData\Roaming\npm\node_modules\ember-rocks\node_modules\bluebird\js\m
ain\promise.js:661:14)
at Async._drainQueue (C:\Users\she\AppData\Roaming\npm\node_modules\ember-rocks\node_modules\bluebird\js\main\as
ync.js:79:16)
at Async._drainQueues (C:\Users\she\AppData\Roaming\npm\node_modules\ember-rocks\node_modules\bluebird\js\main\a
sync.js:89:10)
at Async.drainQueues (C:\Users\she\AppData\Roaming\npm\node_modules\ember-rocks\node_modules\bluebird\js\main\as
ync.js:14:14)
at process._tickCallback (node.js:419:13)
The text was updated successfully, but these errors were encountered: