apache / apache/cordova-common

Fluent interface for ConfigParser

Open
#38 2 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
42
Forks
45
Avg merge
5h 41m
Merged PRs (30d)
6

Description

Implement a [Fluent interface](https://en.wikipedia.org/wiki/Fluent_interface) for `ConfigParser`.

As a developer, I want to do
```js
new ConfigParser('...')
.addEngine(...)
.addPlugin(...)
.write();
```

Should be possible as a non-breaking change. If in doubt, we could export something like the following as a first step:
```js
class FluentConfigParser extends ConfigParser {
addPlugin (...args) {
return (super.addPlugin(...args), this);
}
addEngine (...args) {
return (super.addEngine(...args), this);
}
}
```

Contributor guide

Open the contributing guide

Research direction

Start by locating ConfigParser and its addEngine, addPlugin, and write methods. Check how existing calls behave, then verify that the fluent example chains these methods without breaking the current API.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.