-
Notifications
You must be signed in to change notification settings - Fork 42
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
Fix max stack error. #40
Conversation
@@ -42,7 +42,9 @@ module.exports = function(grunt) { | |||
|
|||
grunt.file.write(dest, content); | |||
grunt.log.writeln('File "' + dest + '" created.'); | |||
next(); | |||
process.nextTick(function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, @vladikoff! You could even bring it down to:
process.nextTick(next);
This is a huge help! I hope @treasonx has some time to review and check in sometime soon :)
So silly that I didn't think of this, who would need more than like 5 Markdown files ;P I need to update a couple of the license documents, i'll merge test and push an update to NPM tomorrow. Thanks a lot! |
@craigshoemaker ah yes, PR Updated. was in a rush to help you :) |
thanks to you both! 😄 |
Pushed 0.6 to NPM with this PR and a bunch of changes for testing and code coverage. Thanks! |
This seems to be happening for me still; I am using 0.6.1 |
@alanhogan can i have some more details? Number of files, config, and a stack trace would be awesome. |
I have only one MD file and I have very little grunt experience, so apologies if I made a dunderheaded mistake. Config: module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
build: {
src: 'js/global.js',
dest: 'js/build/global.min.js'
}
},
compass: {
dist: {}
},
watch: {
scripts: {
files: ['js/*.js'],
tasks: ['uglify'],
options: {
spawn: false,
},
},
css: {
files: ['sass/*.scss','sass/core/*.scss', 'sass/modules/*.scss', 'sass/layouts/*scss'],
tasks: ['compass'],
options: {
spawn: false,
},
},
markdown: {
files: [
{
expand: true,
src: 'docs/*.md',
dest: 'docs/build/',
// dest: 'build/',
ext: '.html'
}
],
options: {
// template: 'myTemplate.jst',
// preCompile: function(src, context) {},
// postCompile: function(src, context) {},
// templateContext: {},
markdownOptions: {
gfm: true,
spawn: false,
// highlight: 'manual',
// codeLines: {
// before: '<span>',
// after: '</span>'
// }
}
}
},
},
connect: {
server: {
options: {
port: 3000,
hostname: '*',
onCreateServer: function(server, connect, options) {
var io = require('socket.io').listen(server);
io.sockets.on('connection', function(socket) {
// do something with socket
});
}
}
}
}
});
// Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks('grunt-contrib-uglify');
//grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-compass');
// grunt-markdown for github-flavored markdown:
grunt.loadNpmTasks('grunt-markdown');
// Default task(s).
grunt.registerTask('default', ['connect', 'uglify', 'compass', 'watch']);
}; Error:
|
I was able to avoid the problem by moving markdown out of |
Hmm that stack trace is interesting. It looks like its coming from util.js not sure what that is.. Is this the entire stack trace you get? I used this grunt task exclusively in a watch when I first wrote it :) I didnt run into any problems. I dont see grunt-markdown as part of your watch in the config you posted. |
@alanhogan It looks like the config for the |
@alanhogan , Probably need something like that as @shama is saying:
Also watch out you forgot a |
Thanks, guys. |
See http://stackoverflow.com/questions/23702801/grunt-task-error-maximum-call-stack-size-exceeded-when-using-grunt-markdown and caolan/async#75