mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
workspace: remove outdated start:all and debug:all
This commit is contained in:
1 parent
9576d35e21
commit
84d1cfd64c
2 files changed
-31
No files matched your search
@@ -1,29 +0,0 @@
|
||||
const os = require('os');
|
||||
const path = require('path');
|
||||
const fs = require('fs-extra');
|
||||
const { filter } = require('lodash');
|
||||
const argv = require('cac')().parse();
|
||||
const hydro = require('hydrooj');
|
||||
|
||||
fs.ensureDirSync(path.resolve(os.homedir(), '.hydro'));
|
||||
const addonPath = path.resolve(os.homedir(), '.hydro', 'addon.json');
|
||||
let addons = filter(
|
||||
fs.readdirSync(path.resolve(process.cwd(), 'packages')),
|
||||
(i) => i !== 'hydrooj',
|
||||
).map((i) => `@hydrooj/${i}`);
|
||||
fs.writeFileSync(addonPath, JSON.stringify(addons, null, 2));
|
||||
|
||||
try {
|
||||
const ui = argv.options.ui || '@hydrooj/ui-default';
|
||||
require.resolve(ui);
|
||||
addons = [ui, ...addons];
|
||||
} catch (e) {
|
||||
console.error('Please also install @hydrooj/ui-default');
|
||||
}
|
||||
|
||||
addons = Array.from(new Set(addons));
|
||||
for (const addon of addons) hydro.addon(addon);
|
||||
(argv.args[0] === 'cli' ? hydro.loadCli : hydro.load)().catch((e) => {
|
||||
console.error(e);
|
||||
process.exit(1);
|
||||
});
|
||||
@@ -21,9 +21,7 @@
|
||||
"lint:ci": "eslint packages --ext ts",
|
||||
"lint:ui": "yarn workspace @hydrooj/ui-default lint --ext .js,.ts,.jsx,.tsx . --fix",
|
||||
"lint:ui:ci": "yarn workspace @hydrooj/ui-default lint --ext .js,.ts,.jsx,.tsx .",
|
||||
"debug:all": "node --trace-warnings --async-stack-traces --trace-deprecation build/start --debug --template",
|
||||
"debug": "node --trace-warnings --async-stack-traces --trace-deprecation node_modules/hydrooj/bin/hydrooj --debug --template",
|
||||
"start:all": "node build/start",
|
||||
"start": "node_modules/.bin/hydrooj",
|
||||
"postinstall": "node build/prepare.js"
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user