MCPcopy
hub / github.com/ampproject/amphtml / buildStoryLocalization

Function buildStoryLocalization

build-system/tasks/build-story-localization.js:94–102  ·  view source on GitHub ↗

* Flattens the structure of the json locale strings and writes them out to the * dist directory. * @param {Object=} options * @return {Promise }

(options = {})

Source from the content-addressed store, hash-verified

92 * @return {Promise<void>}
93 */
94async function buildStoryLocalization(options = {}) {
95 if (options.watch) {
96 watch(LOCALES_DIR).on(
97 'change',
98 debounce(writeStoryLocalizationFiles, watchDebounceDelay)
99 );
100 }
101 await writeStoryLocalizationFiles();
102}
103
104module.exports = {buildStoryLocalization};
105

Callers 2

runPreDistStepsFunction · 0.85
runPreBuildStepsFunction · 0.85

Calls 3

debounceFunction · 0.50
onMethod · 0.45

Tested by

no test coverage detected