Skip to content

Commit 9a5486c

Browse files
committed
Cleanup and improve build docs
1 parent a072b9c commit 9a5486c

File tree

7 files changed

+64
-125
lines changed

7 files changed

+64
-125
lines changed

.sami.php

Lines changed: 0 additions & 16 deletions
This file was deleted.

.styleci.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

BUILDING.md

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,33 @@
11
# Local Development
2-
Pterodactyl is now powered by Vuejs and Tailwindcss and uses webpack at its core to generate compiled assets. Release
3-
versions of Pterodactyl will include pre-compiled, minified, and hashed assets ready-to-go.
2+
Pterodactyl is now powered by React, Typescript, and Tailwindcss using webpack at its core to generate compiled assets.
3+
Release versions of Pterodactyl will include pre-compiled, minified, and hashed assets ready-to-go.
44

5-
However, if you are interested in running custom themes or making modifications to the Vue files you'll need a build
6-
system in place to generate these compiled assets. To get your environment setup, you'll first need to install at least Nodejs
7-
`8`, and it is _highly_ recommended that you also install [Yarn](https://yarnpkg.com) to manage your `node_modules`.
5+
However, if you are interested in running custom themes or making modifications to the React files you'll need a build
6+
system in place to generate these compiled assets. To get your environment setup you'll need at minimum:
7+
8+
* Node.js 12
9+
* [Yarn](https://classic.yarnpkg.com/lang/en/) v1
10+
* [Go](https://golang.org/) 1.15.
811

912
### Install Dependencies
1013
```bash
1114
yarn install
1215
```
1316

1417
The command above will download all of the dependencies necessary to get Pterodactyl assets building. After that, its as
15-
simple as running the command below to generate assets while you're developing.
18+
simple as running the command below to generate assets while you're developing. Until you've run this command at least
19+
once you'll likely see a 500 error on your Panel about a missing `manifest.json` file. This is generated by the commands
20+
below.
1621

1722
```bash
18-
# build the compiled assets for development
23+
# Build the compiled set of assets for development.
1924
yarn run build
2025

21-
# build the assets automatically when files are modified
26+
# Build the assets automatically as they are changed. This allows you to refresh
27+
# the page and see the changes immediately.
2228
yarn run watch
2329
```
2430

25-
2631
### Hot Module Reloading
2732
For more advanced users, we also support 'Hot Module Reloading', allowing you to quickly see changes you're making
2833
to the Vue template files without having to reload the page you're on. To Get started with this, you just need
@@ -37,21 +42,22 @@ is the `--host` flag, which is required and should point to the machine where th
3742
The second is the `PUBLIC_PATH` environment variable which is the URL pointing to the HMR server and is appended to all of
3843
the asset URLs used in Pterodactyl.
3944

40-
#### Vagrant
41-
If you want to use HMR with our Vagrant image, you can use `yarn run v:serve` as a shortcut for the correct parameters.
42-
In order to have proper file change detection you can use the [`vagrant-notify-forwarder`](https://github.com/mhallin/vagrant-notify-forwarder) to notify file events from the host to the VM.
43-
```sh
44-
vagrant plugin install vagrant-notify-forwarder
45-
vagrant reload
46-
```
45+
#### Development Environment
46+
If you're using the [`pterodactyl/development`](https://github.com/pterodactyl/development) environments, which are
47+
highly recommended, you can just run `yarn run serve` to run the HMR server, no additional configuration is necessary.
4748

4849
### Building for Production
49-
Once you have your files squared away and ready for the live server, you'll be needing to generate compiled, minified, and
50-
hashed assets to push live. To do so, run the command below:
50+
Once you have your files squared away and ready for the live server, you'll be needing to generate compiled, minified,
51+
and hashed assets to push live. To do so, run the command below:
5152

5253
```bash
5354
yarn run build:production
5455
```
5556

56-
This will generate a production ready `bundle.js` and `bundle.css` as well as a `manifest.json` and store them in
57-
the `/public/assets` directory where they can then be access by clients, and read by the Panel.
57+
This will generate a production JS bundle and associated assets, all located in `public/assets/` which will need to
58+
be uploaded to your server or CDN for clients to use.
59+
60+
### Running Wings
61+
To run `wings` in development all you need to do is set up the configuration file as normal when adding a new node, and
62+
then you can build and run a local version of Wings by executing `make debug` in the Wings code directory. This must
63+
be run on a Linux VM of some sort, you cannot run this locally on macOS or Windows.

CONTRIBUTING.md

Lines changed: 38 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,55 @@
11
# Contributing
2-
We're glad you want to help us out and make this panel the best that it can be! We have a few simple things to follow when making changes to files and adding new features.
2+
We're glad you want to help us out and make this panel the best that it can be! We have a few simple things to follow
3+
when making changes to files and adding new features.
4+
5+
### Development Environment
6+
Please check the [`pterodactyl/development`](https://github.com/pterodactyl/development) repository for a Vagrant &
7+
Docker setup that should run on most macOS and Linux distributions. In the event that your platform is not supported
8+
you're welcome to open a PR, or just take a look at our setup scripts to see what you'll need to successfully develop
9+
with Pterodactyl.
10+
11+
#### Building Assets
12+
Please see [`BUILDING.md`](https://github.com/pterodactyl/panel/blob/develop/BUILDING.md) for details on how to actually
13+
build and run the development server.
314

415
### Project Branches
516
This section mainly applies to those with read/write access to our repositories, but can be helpful for others.
617

7-
The `develop` branch should always be in a runnable state, and not contain any major breaking features. For the most part, this means you will need to create `feature/` branches in order to add new functionality or change how things work. When making a feature branch, if it is referencing something in the issue tracker, please title the branch `feature/PTDL-###` where `###` is the issue number.
8-
9-
Moving forward all commits from contributors should be in the form of a PR, unless it is something we have previously discussed as being able to be pushed right into `develop`.
18+
The `develop` branch should always be in a runnable state, and not contain any major breaking features. For the most
19+
part, this means you will need to create `feature/` branches in order to add new functionality or change how things
20+
work. When making a feature branch, if it is referencing something in the issue tracker, please title the branch
21+
`feature/PTDL-###` where `###` is the issue number.
1022

11-
All new code should contain unit tests at a minimum (where applicable). There is a lot of uncovered code currently, so as you are doing things please be looking for places that you can write tests.
23+
All new code should contain tests to ensure their functionality is not unintentionally changed down the road. This
24+
is especially important for any API actions or authentication based controls.
1225

13-
### Update the CHANGELOG
14-
When adding something that is new, fixed, changed, or security-related for the next release you should be adding a note to the CHANGELOG. If something is changing within the same version (i.e. fixing a bug introduced but not released) it should _not_ go into the CHANGELOG.
26+
### The CHANGELOG
27+
You should not make any changes to the `CHANGELOG.md` file during your code updates. This is updated by the maintainers
28+
at the time of deployment to include the relevant changes that were made.
1529

1630
### Code Guidelines
17-
We are a `PSR-4` and `PSR-0` compliant project, so please follow those guidelines at a minimum. In addition, StyleCI runs on all of our code to ensure the formatting is standardized across everything. When a PR is made StyleCI will analyze your code and make a pull to that branch if necessary to fix any formatting issues. This project also ships with a PHP-CS configuration file and you are welcome to configure your local environment to make use of that.
31+
We are a `PSR-4` and `PSR-0` compliant project, so please follow those guidelines at a minimum. In addition we run
32+
`php-cs-fixer` on all PRs and releases to enforce a consistent code style. The following command executed on your machine
33+
should show any areas where the code style does not line up correctly.
1834

19-
All class variable declarations should be in alphabetical order, and constructor arguments should be in alphabetical order based on the classname. See the example below for how this should look, or check out any of the `app/Service` files for examples.
20-
21-
```php
22-
class ProcessScheduleService
23-
{
24-
protected $repository;
25-
protected $runnerService;
26-
27-
public function __construct(RunTaskService $runnerService, ScheduleRepositoryInterface $repository)
28-
{
29-
$this->repository = $repository;
30-
$this->runnerService = $runnerService;
31-
}
35+
```
36+
vendor/bin/php-cs-fixer fix --dry-run --diff --diff-format=udiff --config .php_cs.dist
3237
```
3338

3439
### Responsible Disclosure
35-
This is a fairly in-depth project and makes use of a lot of parts. We strive to keep everything as secure as possible and welcome you to take a look at the code provided in this project yourself. We do ask that you be considerate of others who are using the software and not publicly disclose security issues without contacting us first by email.
40+
This is a fairly in-depth project and makes use of a lot of parts. We strive to keep everything as secure as possible
41+
and welcome you to take a look at the code provided in this project yourself. We do ask that you be considerate of
42+
others who are using the software and not publicly disclose security issues without contacting us first by email.
3643

37-
We'll make a deal with you: if you contact us by email and we fail to respond to you within a week you are welcome to publicly disclose whatever issue you have found. We understand how frustrating it is when you find something big and no one will respond to you. This holds us to a standard of providing prompt attention to any issues that arise and keeping this community safe.
44+
We'll make a deal with you: if you contact us by email and we fail to respond to you within a week you are welcome to
45+
publicly disclose whatever issue you have found. We understand how frustrating it is when you find something big and
46+
no one will respond to you. This holds us to a standard of providing prompt attention to any issues that arise and
47+
keeping this community safe.
3848

39-
If you've found what you believe is a security issue please email us at `support@pterodactyl.io`.
49+
If you've found what you believe is a security issue please email `dane åt pterodactyl døt io`.
4050

41-
### Where to find Us
42-
You can find us in a couple places online. First and foremost, we're active right here on Github. If you encounter a bug or other problems, open an issue on here for us to take a look at it. We also accept feature requests here as well.
51+
### Contact Us
52+
You can find us in a couple places online. First and foremost, we're active right here on Github. If you encounter a
53+
bug or other problems, open an issue on here for us to take a look at it. We also accept feature requests here as well.
4354

44-
You can also find us on [Discord](https://pterodactyl.io/discord). In the event that you need to get in contact with us privately feel free to contact us at `support@pterodactyl.io`. Try not to email us with requests for support regarding the panel, we'll probably just direct you to our Discord.
55+
You can also find us on [Discord](https://discord.gg/pterodactyl).

CONTRIBUTORS.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

codecov.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)