firstandthird / load-grunt-config

Grunt plugin that lets you break up your Gruntfile config by task
firstandthird.github.io/load-grunt-config/
MIT License
374 stars 64 forks source link

Add example for other alias file types #55

Closed tigerclaw-az closed 10 years ago

tigerclaw-az commented 10 years ago

Currently the README only shows an example of how to create an alias file for yaml, but I'd like to see an example of one using JavaScript.

tawez commented 10 years ago

All examples are in section Grunt tasks files aliases.(js|json|yaml|coffee) is just another task, although a bit special one.

I think that adding more examples is not necessary. All you need is already here.

My proposition is: No plan to fix

samdbeckham commented 10 years ago

I'm inclined to agree with @ejwaibel. It's really not clear how to add in alias files in any language other than yaml.

You say they're the same as tasks, but a bit special; what makes them special? Is it a case of writing the following, or is it something else entirely?

default:
module.exports = {
    'default' : [
        'jshint',
        'mocha',
        'notify'
    ]
};
yfr commented 10 years ago

:+1: For not really clear how that looks.

tawez commented 10 years ago

I hope #89 pull request solves the problem

samdbeckham commented 10 years ago

That's a lot clearer, thanks @tawez.

tawez commented 10 years ago

A word of comment:

What makes aliases a bit special is described in README.md:

load-grunt-config will use that to define your tasks aliases (like grunt.registerTask('default', ['jshint']);)

It means, that for each entry in aliasses file load-grunt-config will invoke grunt.registerTask().

General rules: