ericclemmons / ericclemmons/terse-webpack

Alias .then to .getConfig

Open
#32 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
213
Forks
10
PR merge metrics
No merged PRs in 30d

Description

I found out that Webpack supports `module.exports = promise`, so, because I _constantly_ forget to put `.getConfig` on the end, we can instead have:

``` js
.then = (callback) => callback(this.getConfig(), this)
```

That way it _looks_ like a Promise, but resolves to the config.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.