css.on('add', (filePath) => { css.add(filePath) build.buildCSS() })
build.getSource((err, source) => { if (err) { throw err } locales.on('change', (filePath) => { const locale = getLocale(filePath) if (!selectedLocales || selectedLocales.includes(locale)) { console.log(`The language ${locale} is changed, '${filePath}' is modified.`) dynamicallyBuildOnLanguages(source, locale) } }) locales.on('add', (filePath) => { const locale = getLocale(filePath) if (!selectedLocales || selectedLocales.includes(locale)) { console.log(`The language ${locale} is changed, '${filePath}' is added.`) dynamicallyBuildOnLanguages(source, locale) locales.add(filePath) } }) })
staticFiles.on('add', (filePath) => { staticFiles.add(filePath) build.copyStatic() })
layouts.on('add', (filePath) => { layouts.add(filePath) build.fullBuild({ selectedLocales, preserveLocale }) })