这是indexloc提供的服务,不要输入任何密码
Skip to content

Add composer create-command in readme #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,24 @@ A [Block based](https://developer.wordpress.org/block-editor/how-to-guides/theme
```

## Get Started :rocket:
1. Clone this repository using `git clone [URL to Git repo]`
1. Having cloned this repository, install node packages and PHP dependencies using: `composer install && npm install`.

That was all! You're good to go with building your block theme. :sparkles:
### Method 1 (Recommended)
```
composer create-project rtcamp/elementary . --stability="dev"
```
This command is equivalant of cloning the repository and running `composer install && npm install`

### Method 2
Manually clone this repository using
```
git clone [URL to Git repo]
```
Having cloned this repository, install node packages and PHP dependencies using
```
composer install && npm install
```

In both the methods, you will be prompted with a theme setup wizard which will help you with the search-replace. That was all! You're good to go with building your block theme. :sparkles:

**Note**: Refer to the `.nvmrc` file to check the supported Node.js version for running this project. If your current Node.js version does not run the project successfully on localhost, please use [Node Version Manager](https://github.com/nvm-sh/nvm) on your terminal to configure the right Node.js version.

Expand Down
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
},
"scripts": {
"phpcs" : "@php ./vendor/bin/phpcs",
"phpcs:fix" : "@php ./vendor/bin/phpcbf"
"phpcs:fix" : "@php ./vendor/bin/phpcbf",
"post-install-cmd": [
"npm i"
]
}
}
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.