Add config file directory to strapi's watchIgnoreFiles list
parent
43c8678845
commit
7da2f96bba
13
README.md
13
README.md
|
@ -20,6 +20,19 @@ Use `npm` or `yarn` to install and build the plugin.
|
||||||
yarn build
|
yarn build
|
||||||
yarn develop
|
yarn develop
|
||||||
|
|
||||||
|
Add the export path to the `watchIgnoreFiles` list in `config/server.js`.
|
||||||
|
This way your app won't reload when you export the config in development.
|
||||||
|
|
||||||
|
admin: {
|
||||||
|
auth: {
|
||||||
|
...
|
||||||
|
},
|
||||||
|
watchIgnoreFiles: [
|
||||||
|
'**/config-sync/files/**',
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
Some settings for the plugin are able to be modified by creating a file `extensions/config-sync/config/config.json` and changing the following settings:
|
Some settings for the plugin are able to be modified by creating a file `extensions/config-sync/config/config.json` and changing the following settings:
|
||||||
|
|
||||||
|
|
|
@ -15,19 +15,11 @@ 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();
|
||||||
|
|
||||||
if (!strapi.config.get('autoReload')) {
|
ctx.send({
|
||||||
ctx.send({
|
message: `Config was successfully exported to ${strapi.plugins['config-sync'].config.destination}.`
|
||||||
message: `Config was successfully exported to ${strapi.plugins['config-sync'].config.destination}.`
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue