workspace: remove outdated start:all and debug:all

pull/461/head
undefined 2 years ago
parent 9576d35e21
commit 84d1cfd64c

@ -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:ci": "eslint packages --ext ts",
"lint:ui": "yarn workspace @hydrooj/ui-default lint --ext .js,.ts,.jsx,.tsx . --fix", "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 .", "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", "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", "start": "node_modules/.bin/hydrooj",
"postinstall": "node build/prepare.js" "postinstall": "node build/prepare.js"
}, },

Loading…
Cancel
Save