added bin
to package.json to make it executable (#32052)
Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
This commit is contained in:
parent
6b492ca4f2
commit
61726e12c4
3 changed files with 11 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
=== kc-create
|
||||
# kc-create
|
||||
|
||||
Create a new Keycloak ui project based on a template
|
||||
|
||||
|
|
|
@ -10,7 +10,12 @@ import { join, resolve, dirname } from "node:path";
|
|||
import { simpleGit } from "simple-git";
|
||||
import { fileURLToPath } from "url";
|
||||
|
||||
const packageJson = JSON.parse(fs.readFileSync("./package.json", "utf8"));
|
||||
const packageJson = JSON.parse(
|
||||
fs.readFileSync(
|
||||
join(fileURLToPath(import.meta.url), "..", "package.json"),
|
||||
"utf8",
|
||||
),
|
||||
);
|
||||
|
||||
function main() {
|
||||
new Command(packageJson.name)
|
||||
|
@ -72,7 +77,7 @@ async function createProject(name, type) {
|
|||
const data = Mustache.render(contents, {
|
||||
name,
|
||||
type,
|
||||
version: packageJson.version,
|
||||
version: "^25.0.0",
|
||||
});
|
||||
await fs.writeFile(destPath, data);
|
||||
});
|
||||
|
|
|
@ -7,6 +7,9 @@
|
|||
"scripts": {
|
||||
"start": "node create.js"
|
||||
},
|
||||
"bin": {
|
||||
"create-keycloak-theme": "./create.js"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue