Browse Source

Move code style sections to CONTRIBUTING.md

pull/3296/head
Jamie Taylor 11 months ago
parent
commit
00cc6921c7
No account linked to committer's email address
3 changed files with 16 additions and 12 deletions
  1. 10
    0
      CONTRIBUTING.md
  2. 2
    0
      README.md
  3. 4
    12
      SETUP.md

+ 10
- 0
CONTRIBUTING.md View File

@@ -0,0 +1,10 @@
1
+# Code Standards
2
+
3
+- For PHP, we adhere to [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) and this will be enforced by StyleCI.
4
+- For CSS, we use the [BEM](http://getbem.com/) conventions.
5
+
6
+# React vs Laravel Blades
7
+
8
+Previously, using React was generally preferred for pages which involved interaction beyond simple hyperlinks (ie. when state is present that can be modified by the user) or when real-time changes were presented to the user (ie. the state is volatile and dependant on back-end updates). Otherwise Laravel Blades were used instead.
9
+
10
+However, we have since decided to move towards providing all data from Laravel as JSON and using React to consume this and perform rendering instead. The goal is to help ensure that there will a consistent data interface being used (i.e. the data/JSON is identical for what React uses and what the game client will be using via the API).

+ 2
- 0
README.md View File

@@ -28,6 +28,8 @@ Contributions can be made via pull requests to this repository. We hope to credi
28 28
 
29 29
 Note that while we already have certain standards in place, nothing is set in stone. If you have an issue with the way code is structured; with any libraries we are using; with any processes involved with contributing, *please* bring it up. I welcome all feedback so we can make contributing to this project as pain-free as possible.
30 30
 
31
+Please see [CONTRIBUTING.md](CONTRIBUTING.md) for information about the code standards we expect from pull requests.
32
+
31 33
 Seeking Help
32 34
 ------------
33 35
 

+ 4
- 12
SETUP.md View File

@@ -61,10 +61,10 @@ $ sudo bootstrap.sh
61 61
 $ ./build.sh
62 62
 ```
63 63
 
64
-<!-- You can then run the standalone php server from inside the `public` folder:
64
+You can then run the standalone php server from inside the `public` folder:
65 65
 ```
66 66
 php -S 127.0.0.1:8080
67
-``` -->
67
+```
68 68
 
69 69
 ## 3. Using Docker
70 70
 
@@ -106,18 +106,10 @@ Note that if you use the bundled docker-compose setup, yarn/webpack will be alre
106 106
 
107 107
 Run the above command to rebuild the database and seed with sample data. In order for the seeder to seed beatmaps, you must enter a valid osu! API key into your `.env` configuration file as it obtains beatmap data from the osu! API.
108 108
 
109
-# Developing
109
+# Development
110 110
 
111
-### Generating assets while developing
111
+## Generating assets while developing
112 112
 
113 113
 To continuously generate assets as you make changes to files (less, coffeescript) you can run `webpack` in `watch` mode.
114 114
 
115 115
     $ yarn run watch
116
-
117
-### React vs Laravel Blade templates
118
-
119
-For the time being, using React is generally preferred for pages which involve interaction beyond simple hyperlinks (ie. when state is present that can be modified by the user) or when real-time changes are presented to the user (ie. the state is volatile depending on back-end updates).
120
-
121
-### Use of BEM for CSS naming
122
-
123
-Much of the CSS present abides to [BEM](http://getbem.com/) conventions but there is also a fair deal that doesn't. We haven't come to a unanimous decision about how to proceed going forward, so please use your own discretion or continue the discussion in the relevant [issue](https://github.com/ppy/osu-web/issues/53).

Loading…
Cancel
Save