build: move clang formating out of gulp stream for cldr (#33699)
PR Close #33699
This commit is contained in:

committed by
Kara Erickson

parent
4613639a02
commit
cdceb60bd0
@ -8,6 +8,7 @@
|
||||
|
||||
const fs = require('fs');
|
||||
const yargs = require('yargs').argv;
|
||||
const shelljs = require('shelljs');
|
||||
const {I18N_DATA_FOLDER, RELATIVE_I18N_DATA_FOLDER, HEADER} = require('./extract');
|
||||
const OUTPUT_NAME = `closure-locale.ts`;
|
||||
|
||||
@ -57,11 +58,8 @@ module.exports = (gulp, done) => {
|
||||
`${RELATIVE_I18N_DATA_FOLDER}/${OUTPUT_NAME}`, generateAllLocalesFile(GOOG_LOCALES, ALIASES));
|
||||
|
||||
console.log(`Formatting ${I18N_DATA_FOLDER}/${OUTPUT_NAME}..."`);
|
||||
const format = require('gulp-clang-format');
|
||||
const clangFormat = require('clang-format');
|
||||
return gulp.src([`${I18N_DATA_FOLDER}/${OUTPUT_NAME}`], {base: '.'})
|
||||
.pipe(format.format('file', clangFormat))
|
||||
.pipe(gulp.dest('.'));
|
||||
shelljs.exec(`yarn clang-format -i ${I18N_DATA_FOLDER}/${OUTPUT_NAME}`, {silent: true});
|
||||
done();
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user