playground build issues
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
mkdir -p public
|
mkdir -p public
|
||||||
echo copy newt
|
echo copy newt
|
||||||
#cp ../lsp.js src/newt.js
|
(cd .. && make lsp.js)
|
||||||
(cd .. && make lsp)
|
cp ../lsp.js src/newt.js
|
||||||
echo build newt worker
|
echo build newt worker
|
||||||
esbuild src/worker.ts --bundle --format=esm --platform=browser > public/worker.js
|
esbuild src/worker.ts --bundle --format=esm --platform=browser > public/worker.js
|
||||||
esbuild src/frame.ts --bundle --format=esm --platform=browser > public/frame.js
|
esbuild src/frame.ts --bundle --format=esm --platform=browser > public/frame.js
|
||||||
|
|||||||
6
playground/src/fs.ts
Normal file
6
playground/src/fs.ts
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import {shim} from './emul';
|
||||||
|
|
||||||
|
// Shim was dumping stuff globally and we've shifted to imports, so I'm adapting it here for now.
|
||||||
|
|
||||||
|
export const {readFileSync, writeFileSync, writeFile, writeSync, readSync } = shim.fs;
|
||||||
|
export default {readFileSync, writeFileSync, writeFile, writeSync, readSync };
|
||||||
7
playground/src/newt.d.ts
vendored
Normal file
7
playground/src/newt.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import { Diagnostic, HoverResult, CodeAction } from './ipc'
|
||||||
|
|
||||||
|
export function LSP_updateFile(name: string, content: string): any;
|
||||||
|
export function LSP_checkFile(name: string): Diagnostic[];
|
||||||
|
export function LSP_hoverInfo(name: string, row: number, col: number): HoverResult | boolean | null;
|
||||||
|
export function LSP_codeActionInfo(name: string, row: number, col: number): CodeAction[] | null;
|
||||||
|
export function LSP_compileJS(name: string): string;
|
||||||
Reference in New Issue
Block a user