-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
/bin-utils loadJSConfig() doesn't support package-scripts.js exporting a function #88
Comments
Hmmm... I'm not sure I see where the problem is specifically. Do you have a proposed solution? May be easier to understand what's going on if I see a diff for the fixed version. |
@kentcdodds I would like to see the binaries determine whether the config That way,
|
If that makes sense, I don't mind writing implementation. |
Give it a go, I look forward to seeing the implementation :) And don't forget to check the contributing guidelines! |
**What**: closes #88 **Why**: Because we document that you can export a function that returns a configuration, but it doesn't actually work. **How**: Add some logic to `loadConfig` in `src/bin-utils/index.js` to handle the case when the config is a function. Also, we need to pass the input along, so I had to make a few other changes as well. Also added fixtures and tests for this.
**What**: closes #88 **Why**: Because we document that you can export a function that returns a configuration, but it doesn't actually work. **How**: Add some logic to `loadConfig` in `src/bin-utils/index.js` to handle the case when the config is a function. Also, we need to pass the input along, so I had to make a few other changes as well. Also added fixtures and tests for this.
**What**: closes #88 **Why**: Because we document that you can export a function that returns a configuration, but it doesn't actually work. **How**: Add some logic to `loadConfig` in `src/bin-utils/index.js` to handle the case when the config is a function. Also, we need to pass the input along, so I had to make a few other changes as well. Also added fixtures and tests for this.
src/get-scripts-from-config.js
allowspackage-scripts.js
to export a function:but
src/bin-utils/index.js loadJSConfig()
does not:So when attempting to run a
default
script via command line, you get the generic help output with a "no scripts" warning:The text was updated successfully, but these errors were encountered: