mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-22 07:41:58 +03:00
chore: codesandbox setup (#2907)
This commit is contained in:
parent
d6addc0d0b
commit
0a91c41e0a
20
.codesandbox/task.json
Normal file
20
.codesandbox/task.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"$schema": "https://codesandbox.io/schemas/tasks.json",
|
||||
"setupTasks": [
|
||||
{
|
||||
"name": "Install Dependencies",
|
||||
"command": "yarn install"
|
||||
}
|
||||
],
|
||||
|
||||
"tasks": {
|
||||
"start-web": {
|
||||
"name": "Start Web",
|
||||
"command": "yarn nx dev @affine/web --port 8080",
|
||||
"runAtStart": true,
|
||||
"preview": {
|
||||
"port": 8080
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -5,7 +5,6 @@ import * as path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
import * as p from '@clack/prompts';
|
||||
import { runCli } from '@magic-works/i18n-codegen';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
@ -15,27 +14,6 @@ const cwd = path.resolve(root, 'apps', 'web');
|
||||
|
||||
const dev = await p.group(
|
||||
{
|
||||
server: () =>
|
||||
p.select({
|
||||
message: `Select dev server`,
|
||||
initialValue: 'local',
|
||||
options: [
|
||||
{
|
||||
value: 'local',
|
||||
label: 'local - 127.0.0.1:3000',
|
||||
hint: 'recommend',
|
||||
},
|
||||
{ value: 'dev', label: 'dev - 100.84.105.99:11001' },
|
||||
{
|
||||
value: 'ac',
|
||||
label: 'ac - 100.85.73.88:12001',
|
||||
},
|
||||
{
|
||||
value: 'test',
|
||||
label: 'test - 100.84.105.99:11001',
|
||||
},
|
||||
],
|
||||
}),
|
||||
debugBlockSuite: () =>
|
||||
p.confirm({
|
||||
message: 'Debug blocksuite locally?',
|
||||
@ -51,7 +29,6 @@ const dev = await p.group(
|
||||
);
|
||||
|
||||
const env = {
|
||||
API_SERVER_PROFILE: dev.server,
|
||||
PATH: process.env.PATH,
|
||||
NODE_ENV: 'development',
|
||||
PORT: 8080,
|
||||
@ -77,18 +54,6 @@ if (dev.debugBlockSuite) {
|
||||
env.LOCAL_BLOCK_SUITE = '';
|
||||
}
|
||||
|
||||
if (dev.server === 'local') {
|
||||
console.log('You might need setup OctoBase dev server first.');
|
||||
}
|
||||
|
||||
runCli(
|
||||
{
|
||||
watch: true,
|
||||
cwd: root,
|
||||
},
|
||||
console.error
|
||||
);
|
||||
|
||||
spawn('nx', ['dev', '@affine/web'], {
|
||||
env,
|
||||
cwd,
|
||||
|
Loading…
Reference in New Issue
Block a user