Rename setting beautify to minify

pull/1/head
Boaz Poolman 2021-03-19 22:50:12 +01:00
parent e4b5c1d0f9
commit e73123e2ee
2 changed files with 2 additions and 5 deletions

View File

@ -1,5 +1,5 @@
{ {
"destination": "extensions/config/files/", "destination": "extensions/config/files/",
"beautify": true, "minify": false,
"exclude": [] "exclude": []
} }

View File

@ -12,7 +12,7 @@ const util = require('util');
module.exports = { module.exports = {
writeConfigFile: async (configName, fileContents) => { writeConfigFile: async (configName, fileContents) => {
const json = const json =
strapi.plugins.config.config.beautify ? !strapi.plugins.config.config.minify ?
JSON.stringify(JSON.parse(fileContents), null, 2) JSON.stringify(JSON.parse(fileContents), null, 2)
: fileContents; : fileContents;
@ -38,9 +38,6 @@ module.exports = {
const coreStoreAPI = strapi.query('core_store'); const coreStoreAPI = strapi.query('core_store');
const fileContents = await strapi.plugins.config.services.config.readConfigFile(configName); const fileContents = await strapi.plugins.config.services.config.readConfigFile(configName);
// If there is no corresponding config file we should not try to import.
if (!fileContents) return;
try { try {
const configExists = await strapi const configExists = await strapi
.query('core_store') .query('core_store')