diff --git a/package.json b/package.json index 2f73dc97..01f9c13e 100644 --- a/package.json +++ b/package.json @@ -10,10 +10,10 @@ "types": "dist/index.d.ts", "scripts": { "prepare": "yarn generate-i18n-messages", - "build": "rimraf dist/ && tsc -p src/bin && tsc -p src && tsc -p src/vite-plugin && tsc-alias -p src/tsconfig.json && yarn grant-exec-perms && yarn copy-files dist/ && cp -r src dist/", + "build": "tsc -p src/bin && tsc -p src && tsc -p src/vite-plugin && tsc-alias -p src/tsconfig.json && yarn grant-exec-perms && yarn copy-files dist/ && cp -r src dist/", "generate:json-schema": "ts-node scripts/generate-json-schema.ts", - "grant-exec-perms": "node dist/bin/tools/grant-exec-perms.js", - "copy-files": "copyfiles -u 1 src/**/*.ftl src/**/*.java", + "grant-exec-perms": "ts-node --skipProject scripts/grant-exec-perms.ts", + "copy-files": "copyfiles -u 1 src/**/*.ftl", "test": "yarn test:types && vitest run", "test:keycloakify-starter": "ts-node scripts/test-keycloakify-starter", "test:types": "tsc -p test/tsconfig.json --noEmit", @@ -23,7 +23,6 @@ "generate-i18n-messages": "ts-node --skipProject scripts/generate-i18n-messages.ts", "link-in-app": "ts-node --skipProject scripts/link-in-app.ts", "link-in-starter": "yarn link-in-app keycloakify-starter", - "watch-in-starter": "yarn build && yarn link-in-starter && (concurrently \"tsc -p src -w\" \"tsc-alias -p src/tsconfig.json\" \"tsc -p src/bin -w\")", "copy-keycloak-resources-to-storybook-static": "PUBLIC_DIR_PATH=.storybook/static node dist/bin/copy-keycloak-resources-to-public.js", "storybook": "yarn build && yarn copy-keycloak-resources-to-storybook-static && start-storybook -p 6006", "build-storybook": "yarn build && yarn copy-keycloak-resources-to-storybook-static && build-storybook" @@ -97,7 +96,6 @@ "properties-parser": "^0.3.1", "react": "^18.2.0", "react-dom": "^18.2.0", - "rimraf": "^3.0.2", "scripting-tools": "^0.19.13", "storybook-dark-mode": "^1.1.2", "ts-node": "^10.9.1", diff --git a/src/bin/tools/grant-exec-perms.ts b/scripts/grant-exec-perms.ts similarity index 80% rename from src/bin/tools/grant-exec-perms.ts rename to scripts/grant-exec-perms.ts index 50abb0be..10d44bb4 100644 --- a/src/bin/tools/grant-exec-perms.ts +++ b/scripts/grant-exec-perms.ts @@ -1,10 +1,9 @@ -import { getThisCodebaseRootDirPath } from "./getThisCodebaseRootDirPath"; import { join as pathJoin } from "path"; import { constants } from "fs"; import { chmod, stat } from "fs/promises"; (async () => { - const thisCodebaseRootDirPath = getThisCodebaseRootDirPath(); + const thisCodebaseRootDirPath = pathJoin(__dirname, ".."); const { bin } = await import(pathJoin(thisCodebaseRootDirPath, "package.json"));