mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-28 10:01:58 +00:00
## About The Pull Request General maintenance for eslint + adds an autofix for import sorting If you're a reviewer/downstream, don't worry s'much about the file diff, these are automated changes. To port this is pretty simple: - `cd tgui` - Update other packages (optional) - `yarn add eslint-plugin-simple-import-sort` - Add linter rules: eslintrc.yml [guide](https://github.com/lydell/eslint-plugin-simple-import-sort?tab=readme-ov-file#usage) && file format rules to eslintignore - `yarn eslint packages --fix` Done! ## Why It's Good For The Game Dev exp ++ ## Changelog N/A nothing player facing
31 lines
673 B
JavaScript
31 lines
673 B
JavaScript
/**
|
|
* @file
|
|
* @copyright 2020 Aleksej Komarov
|
|
* @license MIT
|
|
*/
|
|
|
|
import { reloadByondCache } from './reloader.js';
|
|
import { createCompiler } from './webpack.js';
|
|
|
|
const noHot = process.argv.includes('--no-hot');
|
|
const noTmp = process.argv.includes('--no-tmp');
|
|
const reloadOnce = process.argv.includes('--reload');
|
|
|
|
const setupServer = async () => {
|
|
const compiler = await createCompiler({
|
|
mode: 'development',
|
|
hot: !noHot,
|
|
devServer: true,
|
|
useTmpFolder: !noTmp,
|
|
});
|
|
// Reload cache once
|
|
if (reloadOnce) {
|
|
await reloadByondCache(compiler.bundleDir);
|
|
return;
|
|
}
|
|
// Run a development server
|
|
await compiler.watch();
|
|
};
|
|
|
|
setupServer();
|