Make the dongle to download smaller
This commit is contained in:
parent
624409434a
commit
934c07f365
@ -12,7 +12,7 @@
|
||||
"clean": "rimraf dist/",
|
||||
"build": "yarn clean && tsc && yarn grant-exec-perms && yarn copy-files",
|
||||
"grant-exec-perms": "node dist/bin/tools/grant-exec-perms.js",
|
||||
"test": "node dist/test/build-keycloak-theme.js && node dist/test/download-sample-keycloak-themes.js",
|
||||
"test": "node dist/test",
|
||||
"enable_short_import_path": "yarn build && denoify_enable_short_npm_import_path",
|
||||
"copy-files": "copyfiles -u 1 src/**/*.ftl src/**/*.xml dist/",
|
||||
"generate-messages": "node dist/bin/generate-i18n-messages.js",
|
||||
@ -20,7 +20,7 @@
|
||||
},
|
||||
"bin": {
|
||||
"build-keycloak-theme": "dist/bin/build-keycloak-theme/index.js",
|
||||
"download-sample-keycloak-themes": "dist/bin/download-sample-keycloak-themes.js"
|
||||
"install-builtin-keycloak-themes": "dist/bin/install-builtin-keycloak-themes.js"
|
||||
},
|
||||
"author": "u/garronej",
|
||||
"license": "MIT",
|
||||
|
@ -7,7 +7,7 @@ import {
|
||||
replaceImportFromStaticInJsCode
|
||||
} from "./replaceImportFromStatic";
|
||||
import { generateFtlFilesCodeFactory } from "./generateFtl";
|
||||
import { keycloakBuiltinThemesAndThirdPartyExamplesThemsUrl } from "../download-sample-keycloak-themes";
|
||||
import { builtinThemesUrl } from "../install-builtin-keycloak-themes";
|
||||
import { downloadAndUnzip } from "../tools/downloadAndUnzip";
|
||||
import * as child_process from "child_process";
|
||||
import { ftlValuesGlobalName } from "./ftlValuesGlobalName";
|
||||
@ -86,7 +86,7 @@ export function generateKeycloakThemeResources(
|
||||
const tmpDirPath = pathJoin(themeDirPath, "..", "tmp_xxKdLpdIdLd");
|
||||
|
||||
downloadAndUnzip({
|
||||
"url": keycloakBuiltinThemesAndThirdPartyExamplesThemsUrl,
|
||||
"url": builtinThemesUrl,
|
||||
"destDirPath": tmpDirPath
|
||||
});
|
||||
|
||||
|
@ -2,7 +2,7 @@ import * as fs from "fs";
|
||||
import { join as pathJoin, relative as pathRelative } from "path";
|
||||
import { crawl } from "./tools/crawl";
|
||||
import { downloadAndUnzip } from "./tools/downloadAndUnzip";
|
||||
import { keycloakBuiltinThemesAndThirdPartyExamplesThemsUrl } from "./download-sample-keycloak-themes";
|
||||
import { builtinThemesUrl } from "./install-builtin-keycloak-themes";
|
||||
import { getProjectRoot } from "./tools/getProjectRoot";
|
||||
import * as child_process from "child_process";
|
||||
|
||||
@ -15,7 +15,7 @@ child_process.execSync(`rm -rf ${tmpDirPath}`);
|
||||
|
||||
downloadAndUnzip({
|
||||
"destDirPath": tmpDirPath,
|
||||
"url": keycloakBuiltinThemesAndThirdPartyExamplesThemsUrl
|
||||
"url": builtinThemesUrl
|
||||
});
|
||||
|
||||
type Dictionary = { [idiomId: string]: string };
|
||||
|
@ -4,13 +4,13 @@ import { keycloakThemeBuildingDirPath } from "./build-keycloak-theme";
|
||||
import { downloadAndUnzip } from "./tools/downloadAndUnzip";
|
||||
import { join as pathJoin } from "path";
|
||||
|
||||
export const keycloakBuiltinThemesAndThirdPartyExamplesThemsUrl =
|
||||
"https://github.com/garronej/keycloak-react-theming/releases/download/v0.0.1/other_keycloak_thems.zip";
|
||||
export const builtinThemesUrl =
|
||||
"https://github.com/garronej/keycloak-react-theming/releases/download/v0.0.1/keycloak_11.0.3_builtin_themes.zip";
|
||||
|
||||
if (require.main === module) {
|
||||
|
||||
downloadAndUnzip({
|
||||
"url": keycloakBuiltinThemesAndThirdPartyExamplesThemsUrl,
|
||||
"url": builtinThemesUrl,
|
||||
"destDirPath": pathJoin(keycloakThemeBuildingDirPath, "src", "main", "resources", "theme")
|
||||
});
|
||||
|
@ -1,12 +0,0 @@
|
||||
|
||||
import { sampleReactProjectDirPath } from "./setupSampleReactProject";
|
||||
import * as st from "scripting-tools";
|
||||
import { join as pathJoin } from "path";
|
||||
import { getProjectRoot } from "../bin/tools/getProjectRoot";
|
||||
|
||||
st.execSyncTrace(
|
||||
`node ${pathJoin(getProjectRoot(), "dist", "bin", "download-sample-keycloak-themes")}`,
|
||||
{ "cwd": sampleReactProjectDirPath }
|
||||
)
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
|
||||
|
||||
import {
|
||||
setupSampleReactProject,
|
||||
sampleReactProjectDirPath
|
||||
@ -9,10 +10,15 @@ import { getProjectRoot } from "../bin/tools/getProjectRoot";
|
||||
|
||||
setupSampleReactProject();
|
||||
|
||||
const binDirPath= pathJoin(getProjectRoot(), "dist", "bin");
|
||||
|
||||
st.execSyncTrace(
|
||||
`node ${pathJoin(getProjectRoot(), "dist", "bin", "build-keycloak-theme")}`,
|
||||
`node ${pathJoin(binDirPath, "build-keycloak-theme")}`,
|
||||
{ "cwd": sampleReactProjectDirPath }
|
||||
)
|
||||
|
||||
);
|
||||
|
||||
st.execSyncTrace(
|
||||
`node ${pathJoin(binDirPath, "install-builtin-keycloak-themes")}`,
|
||||
{ "cwd": sampleReactProjectDirPath }
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user