diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000000..092d7ed5d79 --- /dev/null +++ b/CONTRIBUTING.md @@ -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). diff --git a/README.md b/README.md index 28eba06c12c..bb44d17d00a 100644 --- a/README.md +++ b/README.md @@ -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 ------------ diff --git a/SETUP.md b/SETUP.md index dcec96934ab..1452edabd5c 100644 --- a/SETUP.md +++ b/SETUP.md @@ -61,10 +61,10 @@ $ sudo bootstrap.sh $ ./build.sh ``` - +``` ## 3. Using Docker @@ -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).