forked from pyrohost/pyrodactyl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
root
committed
Jan 19, 2024
0 parents
commit 7ed12e3
Showing
1,345 changed files
with
102,263 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
tab_width = 4 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.{md,nix,yml,yaml}] | ||
indent_size = 2 | ||
tab_width = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
public | ||
node_modules | ||
resources/views | ||
babel.config.js | ||
tailwind.config.js | ||
webpack.config.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/** @type {import('eslint').Linter.Config} */ | ||
module.exports = { | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaVersion: 6, | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
project: './tsconfig.json', | ||
tsconfigRootDir: './', | ||
}, | ||
settings: { | ||
react: { | ||
pragma: 'React', | ||
version: 'detect', | ||
}, | ||
linkComponents: [ | ||
{ name: 'Link', linkAttribute: 'to' }, | ||
{ name: 'NavLink', linkAttribute: 'to' }, | ||
], | ||
}, | ||
env: { | ||
browser: true, | ||
es6: true, | ||
}, | ||
plugins: ['react', 'react-hooks', 'prettier', '@typescript-eslint'], | ||
extends: [ | ||
// 'standard', | ||
'eslint:recommended', | ||
'plugin:react/recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:jest-dom/recommended', | ||
], | ||
rules: { | ||
eqeqeq: 'error', | ||
'prettier/prettier': ['error', {}, { usePrettierrc: true }], | ||
// TypeScript can infer this significantly better than eslint ever can. | ||
'react/prop-types': 0, | ||
'react/display-name': 0, | ||
'@typescript-eslint/no-explicit-any': 0, | ||
'@typescript-eslint/no-non-null-assertion': 0, | ||
// This setup is required to avoid a spam of errors when running eslint about React being | ||
// used before it is defined. | ||
// | ||
// @see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-use-before-define.md#how-to-use | ||
'no-use-before-define': 0, | ||
'@typescript-eslint/no-use-before-define': 'warn', | ||
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }], | ||
'@typescript-eslint/ban-ts-comment': ['error', { 'ts-expect-error': 'allow-with-description' }], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/vendor | ||
*.DS_Store* | ||
!.env.ci | ||
!.env.example | ||
.env* | ||
.vagrant/* | ||
.vscode/* | ||
storage/framework/* | ||
/.idea | ||
/nbproject | ||
/.direnv | ||
|
||
node_modules | ||
*.log | ||
_ide_helper.php | ||
_ide_helper_models.php | ||
.phpstorm.meta.php | ||
.yarn | ||
public/assets/manifest.json | ||
|
||
# For local development with docker | ||
# Remove if we ever put the Dockerfile in the repo | ||
.dockerignore | ||
docker-compose.yml | ||
|
||
# for image related files | ||
misc | ||
.php-cs-fixer.cache | ||
coverage.xml | ||
resources/lang/locales.js | ||
.phpunit.result.cache | ||
|
||
/public/build | ||
/public/hot | ||
result | ||
docker-compose.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"printWidth": 120, | ||
"tabWidth": 4, | ||
"useTabs": false, | ||
"semi": true, | ||
"singleQuote": true, | ||
"jsxSingleQuote": true, | ||
"endOfLine": "lf" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Local Development | ||
Pterodactyl is now powered by React, Typescript, and Tailwindcss using webpack at its core to generate compiled assets. | ||
Release versions of Pterodactyl will include pre-compiled, minified, and hashed assets ready-to-go. | ||
|
||
However, if you are interested in running custom themes or making modifications to the React files you'll need a build | ||
system in place to generate these compiled assets. To get your environment setup you'll need at minimum: | ||
|
||
* [Node.js](https://nodejs.org/en/) v14.x.x | ||
* [Yarn](https://classic.yarnpkg.com/lang/en/) v1.x.x | ||
* [Go](https://golang.org/) 1.17.x | ||
|
||
### Install Dependencies | ||
```bash | ||
yarn install | ||
``` | ||
|
||
The command above will download all of the dependencies necessary to get Pterodactyl assets building. After that, its as | ||
simple as running the command below to generate assets while you're developing. Until you've run this command at least | ||
once you'll likely see a 500 error on your Panel about a missing `manifest.json` file. This is generated by the commands | ||
below. | ||
|
||
```bash | ||
# Build the compiled set of assets for development. | ||
yarn run build | ||
|
||
# Build the assets automatically as they are changed. This allows you to refresh | ||
# the page and see the changes immediately. | ||
yarn run watch | ||
``` | ||
|
||
### Hot Module Reloading | ||
For more advanced users, we also support 'Hot Module Reloading', allowing you to quickly see changes you're making | ||
to the Vue template files without having to reload the page you're on. To Get started with this, you just need | ||
to run the command below. | ||
|
||
```bash | ||
PUBLIC_PATH=http://192.168.1.1:8080 yarn run serve --host 192.168.1.1 | ||
``` | ||
|
||
There are two _very important_ parts of this command to take note of and change for your specific environment. The first | ||
is the `--host` flag, which is required and should point to the machine where the `webpack-serve` server will be running. | ||
The second is the `PUBLIC_PATH` environment variable which is the URL pointing to the HMR server and is appended to all of | ||
the asset URLs used in Pterodactyl. | ||
|
||
#### Development Environment | ||
If you're using the [`pterodactyl/development`](https://github.com/pterodactyl/development) environments, which are | ||
highly recommended, you can just run `yarn run serve` to run the HMR server, no additional configuration is necessary. | ||
|
||
### Building for Production | ||
Once you have your files squared away and ready for the live server, you'll be needing to generate compiled, minified, | ||
and hashed assets to push live. To do so, run the command below: | ||
|
||
```bash | ||
yarn run build:production | ||
``` | ||
|
||
This will generate a production JS bundle and associated assets, all located in `public/assets/` which will need to | ||
be uploaded to your server or CDN for clients to use. | ||
|
||
### Running Wings | ||
To run `wings` in development all you need to do is set up the configuration file as normal when adding a new node, and | ||
then you can build and run a local version of Wings by executing `make debug` in the Wings code directory. This must | ||
be run on a Linux VM of some sort, you cannot run this locally on macOS or Windows. |
Oops, something went wrong.