Skip to content

Multiple config load paths #24

Closed
MajorBreakfast opened this Issue Jan 9, 2014 · 6 comments

4 participants

@MajorBreakfast

We're using load-grunt-config in ember app kit. You previously said that you want to allow multiple config loading paths. How's the progress on that? Thanks!

Proposed solution:
configPath: ['path1', 'path2ThatOverwritesOptionsFromPath1']

Our crappy solution:
stefanpenner/ember-app-kit#409

@MajorBreakfast MajorBreakfast referenced this issue in stefanpenner/ember-app-kit Jan 9, 2014
Merged

Removed custom load-grunt-config package #409

@Pradeek
Pradeek commented Jan 9, 2014

Just a reminder, I had submitted a pull request for this, #16 which was merged and then reverted.

@jgallen23
First+Third member

this is added in the 0.8.0 beta

@jgallen23 jgallen23 closed this Mar 20, 2014
@Kolombiken

I'm running the beta but this doesn't seem to work. Am I missing something?

@jgallen23
First+Third member

What does your gruntfile look like?

@Kolombiken

@jgallen23 Well, what I tried was something like this. Which failed due to configPath not being a string.

module.exports = function(grunt) {
    var path = require("path");

    require('load-grunt-config')(grunt, {
        configPath: [path.join(process.cwd(), 'grunt-config'), path.join(process.cwd(), 'other/grunt-config')],
        init: true,
        loadGruntTasks: {
            pattern: ['grunt-*']
        }
    });
};
@jgallen23
First+Third member

configPath takes a string and you can also pass in overridePath. I'll add support for passing an array of paths in a future version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.