feat: migrate workbench to React
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
'use strict';
|
||||
|
||||
const path = require("path");
|
||||
const { startWorkbench } = require("../workbench/server");
|
||||
const fs = require("fs");
|
||||
const path = require('path');
|
||||
const { startWorkbench } = require('../workbench/server');
|
||||
const fs = require('fs');
|
||||
|
||||
const args = process.argv.slice(2);
|
||||
const index = args.indexOf("--input");
|
||||
const index = args.indexOf('--input');
|
||||
const inputFile = index >= 0 && args[index + 1] ? path.resolve(args[index + 1]) : null;
|
||||
const input = inputFile ? JSON.parse(fs.readFileSync(inputFile, "utf8")) : null;
|
||||
const portIndex = args.indexOf("--port");
|
||||
const input = inputFile ? JSON.parse(fs.readFileSync(inputFile, 'utf8')) : null;
|
||||
const portIndex = args.indexOf('--port');
|
||||
const port = portIndex >= 0 ? Number(args[portIndex + 1]) : 8787;
|
||||
startWorkbench({ input, inputFile, repoRoot: path.resolve(__dirname, ".."), port });
|
||||
startWorkbench({ input, inputFile, repoRoot: path.resolve(__dirname, '..'), port });
|
||||
|
||||
Reference in New Issue
Block a user