chore(package): re-init package with commitizen and standard-release

This commit is contained in:
Pavel Pertsev
2018-05-16 12:54:46 +03:00
parent cb4e7a5643
commit eaf2328575
10640 changed files with 609660 additions and 117 deletions

View File

@@ -0,0 +1,33 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = getNormalizedConfig;
// Given a config and content, plucks the actual
// settings that we're interested in
function getNormalizedConfig(config, content) {
if (content && config === 'package.json') {
// PACKAGE.JSON
// Use the npm config key, be good citizens
if (content.config && content.config.commitizen) {
return content.config.commitizen;
} else if (content.czConfig) {
// Old method, will be deprecated in 3.0.0
// Suppress during test
if (typeof global.it !== 'function') {
console.error("\n********\nWARNING: This repository's package.json is using czConfig. czConfig will be deprecated in Commitizen 3. \nPlease use this instead:\n{\n \"config\": {\n \"commitizen\": {\n \"path\": \"./path/to/adapter\"\n }\n }\n}\nFor more information, see: http://commitizen.github.io/cz-cli/\n********\n");
}
return content.czConfig;
}
} else {
// .cz.json or .czrc
return content;
}
}