Fix generated .gitignore
This commit is contained in:
parent
0168d32f96
commit
fa529c911a
@ -1,7 +1,7 @@
|
||||
|
||||
import { transformCodebase } from "../tools/transformCodebase";
|
||||
import * as fs from "fs";
|
||||
import { join as pathJoin, basename as pathBasename } from "path";
|
||||
import { join as pathJoin } from "path";
|
||||
import {
|
||||
replaceImportFromStaticInCssCode,
|
||||
replaceImportFromStaticInJsCode
|
||||
@ -98,12 +98,8 @@ export function generateKeycloakThemeResources(
|
||||
"destDirPath": themeResourcesDirPath
|
||||
});
|
||||
|
||||
//const keycloakResourcesWithinPublicDirPath = pathJoin(reactAppBuildDirPath, "..", "public", "keycloak_static");
|
||||
|
||||
const reactAppPublicDirPath = pathJoin(reactAppBuildDirPath, "..", "public");
|
||||
|
||||
|
||||
|
||||
transformCodebase({
|
||||
"srcDirPath": themeResourcesDirPath,
|
||||
"destDirPath": pathJoin(
|
||||
@ -123,13 +119,6 @@ export function generateKeycloakThemeResources(
|
||||
const keycloakResourcesWithinPublicDirPath =
|
||||
pathJoin(reactAppPublicDirPath, subDirOfPublicDirBasename);
|
||||
|
||||
fs.writeFileSync(
|
||||
pathJoin(keycloakResourcesWithinPublicDirPath, ".gitignore"),
|
||||
Buffer.from([
|
||||
resourcesPath,
|
||||
resourcesCommonPath
|
||||
].map(s=>pathBasename(s)).join("\n"))
|
||||
);
|
||||
|
||||
fs.writeFileSync(
|
||||
pathJoin(keycloakResourcesWithinPublicDirPath, "README.txt"),
|
||||
@ -139,6 +128,14 @@ export function generateKeycloakThemeResources(
|
||||
].join(" "))
|
||||
);
|
||||
|
||||
fs.writeFileSync(
|
||||
pathJoin(keycloakResourcesWithinPublicDirPath, ".gitignore"),
|
||||
Buffer.from([
|
||||
"*",
|
||||
"!.gitignore"
|
||||
].join("\n"))
|
||||
);
|
||||
|
||||
child_process.execSync(`rm -r ${tmpDirPath}`);
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user