diff --git a/README.md b/README.md index 5804b39a..c2f5865b 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ A [Block based](https://developer.wordpress.org/block-editor/how-to-guides/theme ### Method 1 (Recommended) ``` -composer create-project rtcamp/elementary . --stability="dev" +composer create-project rtcamp/elementary [folder_name] ``` This command is equivalant of cloning the repository and running `composer install && npm install` diff --git a/bin/git-init.sh b/bin/git-init.sh new file mode 100755 index 00000000..3792f571 --- /dev/null +++ b/bin/git-init.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# check if git is initialized already +if [ -d .git ]; then + echo "Git is already initialized" + exit 0 +fi + +git init +git add --all . +git commit -m "Initialize project using rtCamp/theme-elementary" diff --git a/package.json b/package.json index 4f7e6398..ec6d3feb 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "lint:php:fix": "./bin/phpcbf.sh", "lint:package-json": "wp-scripts lint-pkg-json --ignorePath .gitignore", "lint:staged": "lint-staged", - "prepare": "husky install && npm run init", + "prepare": "npm run init && ./bin/git-init.sh && husky install", "start": "wp-scripts start", "test": "npm-run-all --parallel test:*", "test:js": "wp-scripts test-unit-js --config=tests/js/jest.config.js --passWithNoTests",