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

Apply package.json config to set option defaults #1166

Closed
kumar303 opened this issue Dec 21, 2017 · 3 comments
Closed

Apply package.json config to set option defaults #1166

kumar303 opened this issue Dec 21, 2017 · 3 comments

Comments

@kumar303
Copy link
Contributor

kumar303 commented Dec 21, 2017

Is this a feature request or a bug?

feature

What is the current behavior?

You can define a custom config file named web-ext-config.js (as of #730) in your project directory to set option defaults.

What is the expected or desired behavior?

It would be nice to specify a custom key in package.json like webExt that has configuration. This would cut down on the amount of config files littered in one's project directory.

For example, we want to support a case where a developer puts something like this in their package.json:

{
  "name": "some-package",
  "version": "1.0.0",
  "webExt": {
    "sourceDir": "./src",
    "verbose": true,
    "run": {
      "firefox": "nightly"
    }
  }
}

This package.json file contains a custom key named webExt which has configuration data. We want to load that data as if it were in a config file. Read this to learn how to do it: https://stackoverflow.com/questions/10065564/add-custom-metadata-or-config-to-package-json-is-it-valid

Config tracker: #176

@grount
Copy link

grount commented Feb 23, 2018

Hello, would this be a good first contribution?
If so then to my understanding I should place a web-ext-config.js file inside the root directory and specify a custom key in package.json?

@kumar303
Copy link
Contributor Author

Hi @grount , thanks for your interest but @chujungeng is already working on it in #1266

@kumar303
Copy link
Contributor Author

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

No branches or pull requests

2 participants