Skip to content

Commit

Permalink
temp try without prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
luca-peruzzo committed Nov 26, 2024
1 parent 80c0243 commit 8841e1a
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/bin/update-kc-gen.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { BuildContext } from './core';
import * as fs from 'fs';
import { join as pathJoin } from 'path';
import { getIsPrettierAvailable, runPrettier } from './tools/runPrettier';
// import { getIsPrettierAvailable, runPrettier } from './tools/runPrettier';
import * as crypto from 'crypto';

export async function command(params: { buildContext: BuildContext }) {
Expand Down Expand Up @@ -89,35 +89,35 @@ export async function command(params: { buildContext: BuildContext }) {
return;
}

let sourceCode = [
const sourceCode = [
`// This file is auto-generated by keycloakify. Do not edit it manually.`,
`// Hash: ${hash}`,
``,
newContent,
].join('\n');

let svelteSourceCode = [
const svelteSourceCode = [
`<script lang="ts">`,
`// This file is auto-generated by keycloakify. Do not edit it manually.`,
`// Hash: ${hash}`,
``,
newSvelteContent,
].join('\n');

run_prettier: {
if (!(await getIsPrettierAvailable())) {
break run_prettier;
}
// run_prettier: {
// if (!(await getIsPrettierAvailable())) {
// break run_prettier;
// }

sourceCode = await runPrettier({
filePath,
sourceCode,
});
svelteSourceCode = await runPrettier({
filePath: svelteFilePath,
sourceCode: svelteSourceCode,
});
}
// sourceCode = await runPrettier({
// filePath,
// sourceCode,
// });
// svelteSourceCode = await runPrettier({
// filePath: svelteFilePath,
// sourceCode: svelteSourceCode,
// });
// }

fs.writeFileSync(filePath, Buffer.from(sourceCode, 'utf8'));
fs.writeFileSync(svelteFilePath, Buffer.from(svelteSourceCode, 'utf8'));
Expand Down

0 comments on commit 8841e1a

Please sign in to comment.