build: reformat repo to new clang@1.4.0 (#36628)

PR Close #36628
This commit is contained in:
Joey Perrott
2020-04-13 17:43:52 -07:00
committed by atscott
parent 4b3f9ac739
commit 26f49151e7
1163 changed files with 31727 additions and 24036 deletions

View File

@ -26,7 +26,7 @@ export class NodeFilesystem implements Filesystem {
return entries.filter((entry: any) => entry.stats.isDirectory())
.map((entry: any) => path.posix.join(_path, entry.entry))
.reduce(
async(list: Promise<string[]>, subdir: string) =>
async (list: Promise<string[]>, subdir: string) =>
(await list).concat(await this.list(subdir)),
Promise.resolve(files));
}
@ -47,5 +47,7 @@ export class NodeFilesystem implements Filesystem {
fs.writeFileSync(file, contents);
}
private canonical(_path: string): string { return path.posix.join(this.base, _path); }
private canonical(_path: string): string {
return path.posix.join(this.base, _path);
}
}

View File

@ -23,7 +23,7 @@ const configParsed = JSON.parse(fs.readFileSync(config).toString());
const filesystem = new NodeFilesystem(distDir);
const gen = new Generator(filesystem, baseHref);
(async() => {
(async () => {
const control = await gen.process(configParsed);
await filesystem.write('/ngsw.json', JSON.stringify(control, null, 2));
})();

View File

@ -133,7 +133,7 @@ function arrayBufferToWords32(buffer: ArrayBuffer, endian: Endian): number[] {
return words32;
}
function byteAt(str: string | Uint8Array, index: number): number {
function byteAt(str: string|Uint8Array, index: number): number {
if (typeof str === 'string') {
return index >= str.length ? 0 : str.charCodeAt(index) & 0xff;
} else {
@ -141,7 +141,7 @@ function byteAt(str: string | Uint8Array, index: number): number {
}
}
function wordAt(str: string | Uint8Array, index: number, endian: Endian): number {
function wordAt(str: string|Uint8Array, index: number, endian: Endian): number {
let word = 0;
if (endian === Endian.Big) {
for (let i = 0; i < 4; i++) {