const { src, dest, series } = require('gulp');
const through = require('through2');
const transformToJson = () => {
return src('./src/settings.js')
.pipe(through.obj((file, _, callback) => {
const computed = require(file.path);
file.extname = '.json';
file.contents = Buffer.from(JSON.stringify(computed, null, 4));
callback(null, file);
}))
.pipe(dest('./dist'));
};
module.exports.default = series(transformToJson);