Exclude setting to stop certain config from being tracked

pull/1/head
Boaz Poolman 2021-03-19 23:25:12 +01:00
parent e73123e2ee
commit 6efa4443ba
1 changed files with 6 additions and 0 deletions

View File

@ -11,6 +11,9 @@ const util = require('util');
module.exports = {
writeConfigFile: async (configName, fileContents) => {
const shouldExclude = strapi.plugins.config.config.exclude.includes(configName);
if (shouldExclude) return;
const json =
!strapi.plugins.config.config.minify ?
JSON.stringify(JSON.parse(fileContents), null, 2)
@ -35,6 +38,9 @@ module.exports = {
},
importFromFile: async (configName) => {
const shouldExclude = strapi.plugins.config.config.exclude.includes(configName);
if (shouldExclude) return;
const coreStoreAPI = strapi.query('core_store');
const fileContents = await strapi.plugins.config.services.config.readConfigFile(configName);