typeplate/typeplate.github.io

Assemble Questions

grayghostvisuals opened this issue · 7 comments

@jonschlinkert Questions so far:
#1. In our Gruntfile we use :

require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);

but in the Gruntfile to use assemble we need this line

grunt.loadNpmTasks('assemble');

why can't we have matchdep pull in the NPM task for assemble?
#2. What's the best way to use assemble w/Grunt alongside a watch task in order to work with live reload?

One thought I have is to change the require('matchdep') over to use just-in-time loading of tasks.

If you need help with reworking the Gruntfile, it's something I've done a fair bit lately.

@Melindrea
The point with matchdep is avoiding to write all the loadNpmTasks tasks out by hand. I'd prefer keeping it in unless you can clarify why changing it would benefit more.

just-in-time loading does the same, except that it only loads the tasks used in any given call. So, if it's a task that only calls on assemble, it will only load that, not the watch, connect, etc tasks.

@Melindrea WHOA! If you wanna set that up feel free. If you can do that on another branch off of the assemble branch I'm on now that would rly rock. 🤘

I'll do that. Start with refactoring the standard one and then later merge in Assemble, I assume?

Actually it's cool. I just used it on another project. Pretty easy to integrate. Already taken care of on my local copy. Thanks again.

Yeah, it's really nice. =) I'll let you integrate it, then.