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

Accept BLANKET_CONFIG env var for alternate config file path #542

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Accept BLANKET_CONFIG env var for alternate config file path #542

wants to merge 1 commit into from

Conversation

JamesMGreene
Copy link

A BLANKET_CONFIG file will contain ONLY the JSON that is normally
accessed from a 'package.json' file's 'config.blanket' object

For example, in "package.json":

{
  "config": {
    "blanket": {
      "pattern": "src"
    }
  }
}

Equivalent in a standalone config file, e.g. ".grunt/blanket.json":

{
  "pattern": "src"
}

Usage (in Bash):

BLANKET_CONFIG=.grunt/blanket.json mocha --require blanket -R html-cov > coverage.html

Purpose:

Having this configuration optionally stored in a separate file has [at least] the following benefits:

  • Externals tools (e.g. Grunt, etc.) would be able to generate a config file on the fly without affecting the very important "package.json" file
  • Provides a better separation of concerns for configuration files, just as JSHint, JSCS, Travis CI, etc. all use their own config files rather than piggybacking on "package.json"
  • For Node modules, this de-bloats the "package.json" file a bit, so there are fewer bits published to NPM

A BLANKET_CONFIG file will contain ONLY the JSON that is normally
accessed from a 'package.json' file's 'config.blanket' object
@JamesMGreene
Copy link
Author

Corresponding PR for travis-cov: alex-seville/travis-cov#10

@JamesMGreene
Copy link
Author

@alex-seville: Any idea why the Travis CI build failed? If I run grunt && npm test locally, it succeeds just fine.

@JamesMGreene
Copy link
Author

Ping @alex-seville

@alex-seville
Copy link
Owner

Not sure why it failed before, but now there are merge conflicts on the PR

@alex-seville
Copy link
Owner

If the merge conflict is fixed I think this would be great to merge. Sorry for the delay.

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

Successfully merging this pull request may close these issues.

2 participants