Seems to be working
This commit is contained in:
parent
83755d1f5f
commit
236ab9dd2b
3
.gitignore
vendored
3
.gitignore
vendored
@ -41,3 +41,6 @@ jspm_packages
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
/dist
|
/dist
|
||||||
|
|
||||||
|
/build
|
||||||
|
/keycloak_build
|
||||||
|
@ -25,7 +25,7 @@ export function generateFtlFilesCodeFactory(
|
|||||||
"jsCode": $(element).html()!
|
"jsCode": $(element).html()!
|
||||||
});
|
});
|
||||||
|
|
||||||
$(element).html(fixedJsCode);
|
$(element).text(fixedJsCode);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -88,7 +88,7 @@ export function generateFtlFilesCodeFactory(
|
|||||||
[
|
[
|
||||||
'',
|
'',
|
||||||
'<script>',
|
'<script>',
|
||||||
` window.${ftlValuesGlobalName} = { "pageBasename": "${pageBasename}" };'`,
|
` window.${ftlValuesGlobalName} = { "pageBasename": "${pageBasename}" };`,
|
||||||
'</script>',
|
'</script>',
|
||||||
''
|
''
|
||||||
].join("\n"),
|
].join("\n"),
|
||||||
|
@ -10,7 +10,7 @@ import {
|
|||||||
import { generateFtlFilesCodeFactory } from "./generateFtl";
|
import { generateFtlFilesCodeFactory } from "./generateFtl";
|
||||||
|
|
||||||
|
|
||||||
const reactAppBuildDirPath = pathJoin(__dirname, "build");
|
const reactAppBuildDirPath = pathJoin(process.cwd(), "build");
|
||||||
|
|
||||||
assert(
|
assert(
|
||||||
fs.existsSync(reactAppBuildDirPath),
|
fs.existsSync(reactAppBuildDirPath),
|
||||||
|
@ -12,7 +12,7 @@ export function replaceImportFromStaticInJsCode(
|
|||||||
|
|
||||||
const fixedJsCode = jsCode!.replace(
|
const fixedJsCode = jsCode!.replace(
|
||||||
/"static\//g,
|
/"static\//g,
|
||||||
`window.${ftlValuesGlobalName}.url.resourcesPath.replace(/^\//,"") + "/" + "static/`
|
`window.${ftlValuesGlobalName}.url.resourcesPath.replace(/^\\//,"") + "/" + "static/`
|
||||||
);
|
);
|
||||||
|
|
||||||
return { fixedJsCode };
|
return { fixedJsCode };
|
||||||
@ -80,7 +80,7 @@ export function generateCssCodeToDefineGlobals(
|
|||||||
")"
|
")"
|
||||||
].join("")
|
].join("")
|
||||||
].join(" "))
|
].join(" "))
|
||||||
.map(line => " " + line),
|
.map(line => ` ${line};`),
|
||||||
"}"
|
"}"
|
||||||
].join("\n")
|
].join("\n")
|
||||||
};
|
};
|
||||||
|
@ -6,7 +6,7 @@ import { crawl } from "denoify/tools/crawl";
|
|||||||
import { createDirectoryIfNotExistsRecursive } from "denoify/tools/createDirectoryIfNotExistsRecursive";
|
import { createDirectoryIfNotExistsRecursive } from "denoify/tools/createDirectoryIfNotExistsRecursive";
|
||||||
|
|
||||||
/** Apply a transformation function to every file of directory */
|
/** Apply a transformation function to every file of directory */
|
||||||
export async function transformCodebase(
|
export function transformCodebase(
|
||||||
params: {
|
params: {
|
||||||
srcDirPath: string;
|
srcDirPath: string;
|
||||||
destDirPath: string;
|
destDirPath: string;
|
||||||
@ -35,7 +35,7 @@ export async function transformCodebase(
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
await createDirectoryIfNotExistsRecursive(
|
createDirectoryIfNotExistsRecursive(
|
||||||
path.dirname(
|
path.dirname(
|
||||||
path.join(
|
path.join(
|
||||||
destDirPath,
|
destDirPath,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user