parent
9c33ed50de
commit
f78d6643b7
|
@ -0,0 +1 @@
|
||||||
|
_
|
|
@ -41,5 +41,8 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"husky": "^6.0.0"
|
"husky": "^6.0.0"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"prepare": "husky install"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ module.exports = {
|
||||||
) {
|
) {
|
||||||
await strapi.plugins['config-sync'].services.main.deleteConfigFile(configName);
|
await strapi.plugins['config-sync'].services.main.deleteConfigFile(configName);
|
||||||
} else {
|
} else {
|
||||||
await strapi.plugins['config-sync'].services.main.writeConfigFile(configPrefix, currentConfig.key, currentConfig);
|
await strapi.plugins['config-sync'].services.main.writeConfigFile(configPrefix, currentConfig.key.replace('::', '##'), currentConfig);
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
|
@ -22,9 +22,9 @@ module.exports = {
|
||||||
const shouldExclude = strapi.plugins['config-sync'].config.exclude.includes(`${configType}.${configName}`);
|
const shouldExclude = strapi.plugins['config-sync'].config.exclude.includes(`${configType}.${configName}`);
|
||||||
if (shouldExclude) return;
|
if (shouldExclude) return;
|
||||||
|
|
||||||
// Check if the JSON content should be minified.
|
// Check if the JSON content should be minified.
|
||||||
const json =
|
const json =
|
||||||
!strapi.plugins['config-sync'].config.minify ?
|
!strapi.plugins['config-sync'].config.minify ?
|
||||||
JSON.stringify(fileContents, null, 2)
|
JSON.stringify(fileContents, null, 2)
|
||||||
: JSON.stringify(fileContents);
|
: JSON.stringify(fileContents);
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ module.exports = {
|
||||||
|
|
||||||
await Promise.all(configFiles.map(async (file) => {
|
await Promise.all(configFiles.map(async (file) => {
|
||||||
const type = file.split('.')[0]; // Grab the first part of the filename.
|
const type = file.split('.')[0]; // Grab the first part of the filename.
|
||||||
const name = file.split(/\.(.+)/)[1].split('.').slice(0, -1).join('.'); // Grab the rest of the filename minus the file extension.
|
const name = file.split(/\.(.+)/)[1].split('.').slice(0, -1).join('.').replace('##', '::'); // Grab the rest of the filename minus the file extension.
|
||||||
|
|
||||||
if (
|
if (
|
||||||
configType && configType !== type ||
|
configType && configType !== type ||
|
||||||
|
@ -201,6 +201,6 @@ module.exports = {
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
exportSingleConfig: async (configType, configName) => {
|
exportSingleConfig: async (configType, configName) => {
|
||||||
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue