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

Feature request: allow to use JS configuration of auto-changelog #245

Open
trycontrolmymind opened this issue Sep 1, 2022 · 2 comments
Open

Comments

@trycontrolmymind
Copy link

Allow to use JS configuration of auto-changelog.

We have several projects with same auto-changelog configuration, so we want to re-use them using like
.auto-changelog.config.js.

const common = require("common-config-auto-changelog");

module.exports = {
...common,
};

Is it possible?

@ljharb
Copy link
Contributor

ljharb commented Sep 1, 2022

I have hundreds of projects that would benefit from a way to share configs - but rather than allowing it to be logicful, I’d prefer adding an “extends” key that points to a requireable path (which could be json from a package).

@webketje
Copy link
Contributor

webketje commented Jan 3, 2023

FWIW it's already possible to do this by creating a small wrapper script:

/** @file ./merge-configs.js */

const { writeFileSync } = require('fs')
const common = require('common-config-auto-changelog')
const overrides = require('.auto-changelog.json')

writeFileSync('.auto-changelog', JSON.stringify(Object.assign({}, common, overrides), null, 2))
node ./merge-configs.js && auto-changelog
# .gitignore
.auto-changelog

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

No branches or pull requests

3 participants