ngitflow
Version:
Node Git Flow
33 lines (24 loc) • 605 B
JavaScript
;
const rc = require('rc');
const packageJson = require('../package.json');
const DEFAULTS = {
versionFiles: []
};
class Configurations {
static list() {
const config = rc(packageJson.name, DEFAULTS, []);
delete config['configs'];
delete config['config'];
return config;
}
static get(name) {
return this.list()[name];
}
static versionFiles() {
return this.get('versionFiles') || [];
}
static prereleaseId() {
return this.get('prereleaseId') || 'snapshot';
}
}
module.exports = Configurations;