Comments (11)
Absolutely. 👍
from grunt-available-tasks.
Incidentally, how would you feel about making this a multitask?
from grunt-available-tasks.
It could work as a multi task, sure; the initial idea was not to over complicate it as it is supposed to be a drop in replacement for running grunt --help
. Remember that the task configuration is completely optional, so any multi task implementation must follow the same rule (this shouldn't be a problem).
I didn't initially register it as a multi task because I thought that one list for all tasks made sense; however there are bound to be cases where you have registered a large amount of tasks and you want to see which ones pertain to JS, which ones to CSS etc. If it's useful for your use case it's bound to be useful to others too.
from grunt-available-tasks.
Yep - I'll definitely make sure that task config is optional. It may be a little difficult to get to less than the following with a multitask, but I'll poke around:
availabletasks: {
default: {}
}
(How would you feel about that as the minimum required config?)
The reason that I need it is because I'm making a helper package that contains a bunch of different grunt tasks. It is supposed to be used with different project types (frontend dep, standalone node module, other custom types for my team, etc). The set of available tasks may differ across those types, so I'd want to see something like this:
availabletasks: {
server: {
// ...
},
client: {
// ...
}
}
from grunt-available-tasks.
If for a multitask it isn't possible not to define a configuration option I guess it isn't the end of the world, but I like the simplicity of not having to define configuration for the task, it "just works". I think right now when a multitask is defined Grunt will look through the initConfig section and fail if it doesn't find any targets (i.e. running grunt availabletasks
will try to find all targets in the config object of the same name).
from grunt-available-tasks.
I think right now when a multitask is defined Grunt will look through the initConfig section and fail if it doesn't find any targets
That is correct. But I think there are depraved ways to get around this via monkey patching. That may just violating the principle of least surprise, though.
from grunt-available-tasks.
Nick, does #3 fix this issue for you? I.e. put your more important tasks in a group and then leave the rest unsorted? Or do you think we still need to define a custom sort?
from grunt-available-tasks.
That is a nice feature, but for my use case I would still like to be able to specify a custom sorting.
from grunt-available-tasks.
OK, I was just curious as to how it would work; would you want to provide an array of tasks that come first, or to specify a comparator function?
from grunt-available-tasks.
Either would be fine; an array would probably be simpler.
from grunt-available-tasks.
Awesome, thanks.
from grunt-available-tasks.
Related Issues (20)
- global setup feuture request HOT 1
- Groups should be ordered in the same order as it is defined in the task HOT 2
- No Tasks are listed HOT 3
- Unable to install, get peerInvalid errors HOT 7
- Clarify install/usage instructions in README HOT 2
- Make it work as a cli task HOT 2
- fails with 'An error occurred while processing a template' if task command contains a template HOT 7
- Allow reporters to iterate over the collection of tasks?
- No "availabletasks" targets found. HOT 3
- Task list empty in latest version (0.5.5) HOT 2
- Documenting subtasks? HOT 1
- ... HOT 1
- Cannot set property 'info' of undefined HOT 2
- Compatibility with `grunt-aglio` and Node `0.12`
- Cannot find module 'grunt-available-tasks/node_modules/underscore.string' HOT 3
- Warning: Cannot read property 'name' of undefined (available_tasks.js ln97) HOT 2
- Looking for a new owner HOT 4
- grunt apigee issue
- Improve the reporter
- Error when running availabletasks. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grunt-available-tasks.