Merge pull request #3 from boazpoolman/develop

Develop
pull/7/head 0.1.2
Boaz Poolman 2021-03-25 00:07:07 +01:00 committed by GitHub
commit a1704d079b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 4 deletions

1
.gitignore vendored
View File

@ -4,6 +4,7 @@ node_modules
stats.json stats.json
package-lock.json package-lock.json
yarn.lock yarn.lock
files
# Cruft # Cruft
.DS_Store .DS_Store

View File

@ -15,11 +15,19 @@ module.exports = {
* @returns {void} * @returns {void}
*/ */
exportAll: async (ctx) => { exportAll: async (ctx) => {
if (strapi.config.get('autoReload')) {
ctx.send({
message: `Config was successfully exported to ${strapi.plugins['config-sync'].config.destination}.`
});
}
await strapi.plugins['config-sync'].services.main.exportAllConfig(); await strapi.plugins['config-sync'].services.main.exportAllConfig();
ctx.send({ if (!strapi.config.get('autoReload')) {
message: `Config was successfully exported to ${strapi.plugins['config-sync'].config.destination}.` ctx.send({
}); message: `Config was successfully exported to ${strapi.plugins['config-sync'].config.destination}.`
});
}
}, },
/** /**

View File

@ -1,6 +1,6 @@
{ {
"name": "strapi-plugin-config-sync", "name": "strapi-plugin-config-sync",
"version": "0.1.1", "version": "0.1.2",
"description": "Manage your Strapi database configuration as partial json files which can be imported/exported across environments. ", "description": "Manage your Strapi database configuration as partial json files which can be imported/exported across environments. ",
"strapi": { "strapi": {
"name": "config-sync", "name": "config-sync",