Skip to content
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

Utility for generating grunt task info #9

Open
elliot-nelson opened this issue May 27, 2020 · 0 comments
Open

Utility for generating grunt task info #9

elliot-nelson opened this issue May 27, 2020 · 0 comments

Comments

@elliot-nelson
Copy link
Contributor

Related to lazy-loading: once the lazyLoadTasks method is merged, if you have a very large directory full of local tasks, it can be a pain to manually maintain this list. For one project I built a grunt task that you can run on a directory and spit out the JSON data that becomes your task's lazy-load config (a map of file names and task names, basically).

I'm not sure exactly how you'd structure it, but it would be kind of cool if we could get this tool into this package proper, and then a user that's already using it would get it "for free".

require('grunt-lazyload')(grunt);
grunt.lazyLoadNpmTasks('grunt-lazyload', ['generate-lazyload-config']);
$ grunt generate-lazyload-config:localfolder/mytasks

{
    "grunt-foo.js": ["foo"],
    "grunt-bar.js": ["bar", "baz"],
    ...
}

(The user can then copy/paste this updated def into their Gruntfile, or, they could get fancy and hook this into git-precommit and run it any time a task is added, etc.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant