Skip to content

Commit

Permalink
Move code style sections to CONTRIBUTING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nekodex committed Jun 1, 2018
1 parent 660d6e5 commit 00cc692
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Code Standards

- 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.
- For CSS, we use the [BEM](http://getbem.com/) conventions.

# React vs Laravel Blades

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.

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 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ Contributions can be made via pull requests to this repository. We hope to credi

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.

Please see [CONTRIBUTING.md](CONTRIBUTING.md) for information about the code standards we expect from pull requests.

Seeking Help
------------

Expand Down
16 changes: 4 additions & 12 deletions SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ $ sudo bootstrap.sh
$ ./build.sh
```

<!-- You can then run the standalone php server from inside the `public` folder:
You can then run the standalone php server from inside the `public` folder:
```
php -S 127.0.0.1:8080
``` -->
```

## 3. Using Docker

Expand Down Expand Up @@ -106,18 +106,10 @@ Note that if you use the bundled docker-compose setup, yarn/webpack will be alre

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.

# Developing
# Development

### Generating assets while developing
## Generating assets while developing

To continuously generate assets as you make changes to files (less, coffeescript) you can run `webpack` in `watch` mode.

$ yarn run watch

### React vs Laravel Blade templates

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).

### Use of BEM for CSS naming

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).

0 comments on commit 00cc692

Please sign in to comment.