refactor
This commit is contained in:
parent
ee3fd977c1
commit
98ff75daff
1163
package-lock.json
generated
1163
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
30
package.json
30
package.json
@ -6,18 +6,17 @@
|
|||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git://github.com/garronej/keycloak-react-theming.git"
|
"url": "git://github.com/garronej/keycloak-react-theming.git"
|
||||||
},
|
},
|
||||||
"main": "src/index.js",
|
"main": "dist/lib/index.js",
|
||||||
"babel": {
|
"types": "dist/lib/index.d.ts",
|
||||||
"presets": [
|
|
||||||
"@babel/preset-env",
|
|
||||||
"@babel/preset-react"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "webpack-dev-server --open",
|
"build": "npm run tsc && npm run grant-exec-perms",
|
||||||
"create": "webpack",
|
"grant-exec-perms": "chmod +x dist/bin/build-keycloak-theme/index.js",
|
||||||
|
"test": "node dist/test/build-keycloak-theme.js",
|
||||||
"enable_short_import_path": "npm run build && denoify_enable_short_npm_import_path"
|
"enable_short_import_path": "npm run build && denoify_enable_short_npm_import_path"
|
||||||
},
|
},
|
||||||
|
"bin": {
|
||||||
|
"build-keycloak-theme": "dist/bin/build-keycloak-theme"
|
||||||
|
},
|
||||||
"author": "u/garronej",
|
"author": "u/garronej",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"files": [
|
"files": [
|
||||||
@ -27,17 +26,20 @@
|
|||||||
"!dist/test/",
|
"!dist/test/",
|
||||||
"!dist/tsconfig.tsbuildinfo"
|
"!dist/tsconfig.tsbuildinfo"
|
||||||
],
|
],
|
||||||
"keywords": [],
|
"keywords": [
|
||||||
|
"keycloak",
|
||||||
|
"react",
|
||||||
|
"theme"
|
||||||
|
],
|
||||||
"homepage": "https://github.com/garronej/keycloak-react-theming",
|
"homepage": "https://github.com/garronej/keycloak-react-theming",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^10.0.0",
|
"@types/node": "^10.0.0",
|
||||||
"denoify": "^0.6.4",
|
"denoify": "^0.6.4",
|
||||||
"evt": "beta",
|
"evt": "beta",
|
||||||
"typescript": "^4.1.5"
|
"typescript": "^4.1.5",
|
||||||
|
"scripting-tools": "^0.19.13"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"scripting-tools": "^0.19.13",
|
"cheerio": "^1.0.0-rc.5"
|
||||||
"cheerio": "^1.0.0-rc.5",
|
|
||||||
"node-html-parser": "^2.1.0"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
import { transformCodebase } from "../tools/transformCodebase";
|
import { transformCodebase } from "tools/transformCodebase";
|
||||||
import * as fs from "fs";
|
import * as fs from "fs";
|
||||||
import { join as pathJoin } from "path";
|
import { join as pathJoin } from "path";
|
||||||
import {
|
import {
|
@ -2,6 +2,7 @@ import { generateKeycloakThemeResources } from "./generateKeycloakThemeResources
|
|||||||
import { generateJavaStackFiles } from "./generateJavaStackFiles";
|
import { generateJavaStackFiles } from "./generateJavaStackFiles";
|
||||||
import type { ParsedPackageJson } from "./generateJavaStackFiles";
|
import type { ParsedPackageJson } from "./generateJavaStackFiles";
|
||||||
import { join as pathJoin } from "path";
|
import { join as pathJoin } from "path";
|
||||||
|
import * as child_process from "child_process";
|
||||||
|
|
||||||
const reactProjectDirPath = process.cwd();
|
const reactProjectDirPath = process.cwd();
|
||||||
|
|
||||||
@ -20,3 +21,4 @@ generateJavaStackFiles({
|
|||||||
keycloakThemeBuildingDirPath
|
keycloakThemeBuildingDirPath
|
||||||
});
|
});
|
||||||
|
|
||||||
|
child_process.execSync("mvn package");
|
3
src/lib/inex.ts
Normal file
3
src/lib/inex.ts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
|
||||||
|
|
||||||
|
export { };
|
@ -7,5 +7,5 @@ process.chdir(sampleReactProjectDirPath);
|
|||||||
|
|
||||||
console.log(`Running main in ${sampleReactProjectDirPath}`);
|
console.log(`Running main in ${sampleReactProjectDirPath}`);
|
||||||
|
|
||||||
import("../bin/main");
|
import("bin/build-keycloak-theme");
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
import { join as pathJoin } from "path";
|
import { join as pathJoin } from "path";
|
||||||
import { generateKeycloakThemeResources } from "../bin/generateKeycloakThemeResources";
|
import { generateKeycloakThemeResources } from "bin/build-keycloak-theme/generateKeycloakThemeResources";
|
||||||
import { setupSampleReactProject } from "./setupSampleReactProject";
|
import { setupSampleReactProject } from "./setupSampleReactProject";
|
||||||
|
|
||||||
const { sampleReactProjectDirPath } = setupSampleReactProject();
|
const { sampleReactProjectDirPath } = setupSampleReactProject();
|
||||||
|
@ -3,7 +3,7 @@ import {
|
|||||||
replaceImportFromStaticInJsCode,
|
replaceImportFromStaticInJsCode,
|
||||||
replaceImportFromStaticInCssCode,
|
replaceImportFromStaticInCssCode,
|
||||||
generateCssCodeToDefineGlobals
|
generateCssCodeToDefineGlobals
|
||||||
} from "../bin/replaceImportFromStatic";
|
} from "bin/build-keycloak-theme/replaceImportFromStatic";
|
||||||
|
|
||||||
const { fixedJsCode } = replaceImportFromStaticInJsCode({
|
const { fixedJsCode } = replaceImportFromStaticInJsCode({
|
||||||
"ftlValuesGlobalName": "keycloakFtlValues",
|
"ftlValuesGlobalName": "keycloakFtlValues",
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"module": "CommonJS",
|
"module": "CommonJS",
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
|
"baseUrl": "src",
|
||||||
"lib": ["es2015", "DOM"],
|
"lib": ["es2015", "DOM"],
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user