-
Notifications
You must be signed in to change notification settings - Fork 0
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
Jade -> HTML #3
Jade -> HTML #3
Conversation
By using 'gulpist jade' it compiles every Jade file into HTML. Alternatively, you can use 'gulpist watch' to watch for changes on Jade files. Only the most recently changed files will be compiled when using this method.
By providing the extension for the compiled file newer() is now able to compare the dates of both files and compile it.
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.
Hi @pmpinto just last couple small feedbacks. everything else is good 👍
lib/tasks/jade.js
Outdated
|
||
function compileJade(onlyNewFiles) { | ||
var options = { | ||
pretty: config.hasOwnProperty("indentation") ? config.indentation : false |
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.
pretty: config.indentation ? config.indentation : false
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.
That will do it :)
lib/tasks/jade.js
Outdated
.pipe(jade(options)); | ||
|
||
if (onlyNewFiles) { | ||
stream = stream.pipe(newer({ dest: config.dest })); |
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.
put newer
before jade
pipe
lib/tasks/jade.js
Outdated
gulp.task('jade', function() { return compileJade(); }); | ||
|
||
gulp.task('jade:watch', function() { | ||
var filesToWatch = config.hasOwnProperty("watch") ? config.watch : config.src; |
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.
filesToWatch = config.watch ? config.watch : config.src;
lib/tasks/jade.js
Outdated
|
||
gulp.task('jade:watch', function() { | ||
var filesToWatch = config.hasOwnProperty("watch") ? config.watch : config.src; | ||
gulp.watch(filesToWatch, {'dot': true}, function() { compileJade(true); }); |
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.
What is the dot
option here for?
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.
I can't tell, this jade:watch
block was duplicated from another task you have previously created. Just wanted to make sure it worked and eventually forgot to check that.
Either way, please don't merge this just yet. I managed to create some kind of infinite loop or memory leak of some sort that completely froze my computer yesterday. I'll go over this once again and see what I missed.
For some reason I managed to switch the Should be fixed now 👍 Apparently the |
Here's the Jade task.
Please make sure it doesn't break anything. It seems to work nicely, but haven't checked the other tasks.
Also updated the README file 😊