You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Talking of which, the config file gets fetched once for each file you process. To solve this, please consider fetching the config file only once, like this:
var cfgData = argv.config && JSON.parse(fs.readFileSync(argv.config, 'utf8'));
and use it in the processing file like this: var cfg = cfgData ? Object.keys(cfgData) : [];
and if (cfgData) {config = Object.assign(cfgData, config)}
The text was updated successfully, but these errors were encountered:
Config files without a json extension, for example ".posthtmlrc" can't be used. This is due to the use of require to fetch the config file.
Please consider replacing require with:
JSON.parse(fs.readFileSync(argv.config, 'utf8'))
Talking of which, the config file gets fetched once for each file you process. To solve this, please consider fetching the config file only once, like this:
var cfgData = argv.config && JSON.parse(fs.readFileSync(argv.config, 'utf8'));
and use it in the processing file like this:
var cfg = cfgData ? Object.keys(cfgData) : [];
and
if (cfgData) {config = Object.assign(cfgData, config)}
The text was updated successfully, but these errors were encountered: