Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement online compilation #7

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution')
require("@rushstack/eslint-patch/modern-module-resolution");

module.exports = {
root: true,
'extends': [
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/eslint-config-typescript',
'@vue/eslint-config-prettier/skip-formatting'
],
parserOptions: {
ecmaVersion: 'latest'
}
}
root: true,
extends: [
"plugin:vue/vue3-essential",
"eslint:recommended",
"@vue/eslint-config-typescript",
"@vue/eslint-config-prettier/skip-formatting",
],
parserOptions: {
ecmaVersion: "latest",
},
};
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ coverage
/src/api-client
/wasm-bin/clang.wasm
/wasm-bin/llvm-box.wasm

/.devenv
14 changes: 7 additions & 7 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"$schema": "https://json.schemastore.org/prettierrc",
"semi": false,
"tabWidth": 2,
"singleQuote": true,
"printWidth": 100,
"trailingComma": "none"
}
"$schema": "https://json.schemastore.org/prettierrc",
"semi": false,
"tabWidth": 2,
"singleQuote": true,
"printWidth": 100,
"trailingComma": "none"
}
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
"recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
}
5 changes: 1 addition & 4 deletions auto-imports.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ declare global {
const useAttrs: typeof import('vue')['useAttrs']
const useCssModule: typeof import('vue')['useCssModule']
const useCssVars: typeof import('vue')['useCssVars']
const useDialog: typeof import('naive-ui')['useDialog']
const useLoadingBar: typeof import('naive-ui')['useLoadingBar']
const useMessage: typeof import('naive-ui')['useMessage']
const useNotification: typeof import('naive-ui')['useNotification']
const useSlots: typeof import('vue')['useSlots']
const watch: typeof import('vue')['watch']
const watchEffect: typeof import('vue')['watchEffect']
Expand All @@ -66,4 +62,5 @@ declare global {
declare global {
// @ts-ignore
export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
import('vue')
}
Binary file modified bun.lockb
Binary file not shown.
7 changes: 2 additions & 5 deletions components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,17 @@ export {}
declare module 'vue' {
export interface GlobalComponents {
EditorField: typeof import('./src/components/EditorField.vue')['default']
ElIcon: typeof import('element-plus/es')['ElIcon']
ElPopover: typeof import('element-plus/es')['ElPopover']
FileUpload: typeof import('./src/components/FileUpload.vue')['default']
GeneralBtn: typeof import('./src/components/GeneralBtn.vue')['default']
HeadTitle: typeof import('./src/components/HeadTitle.vue')['default']
MonacoEditor: typeof import('./src/components/MonacoEditor.vue')['default']
NButton: typeof import('naive-ui')['NButton']
NIcon: typeof import('naive-ui')['NIcon']
NPopover: typeof import('naive-ui')['NPopover']
ProgItem: typeof import('./src/components/ProgItem.vue')['default']
ProgList: typeof import('./src/components/ProgList.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
ServerField: typeof import('./src/components/ServerField.vue')['default']
ServerItem: typeof import('./src/components/ServerItem.vue')['default']
ServerOp: typeof import('./src/components/ServerOp.vue')['default']
TabItem: typeof import('./src/components/TabItem.vue')['default']
TheConsole: typeof import('./src/components/TheConsole.vue')['default']
}
Expand Down
6 changes: 3 additions & 3 deletions env.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// <reference types="vite/client" />
/// <reference types="vite-plugin-comlink/client" />
import 'vite/client'
declare module 'monaco-editor';
declare module 'monaco-editor/esm/vs/editor/editor.worker?worker'
import "vite/client";
declare module "monaco-editor";
declare module "monaco-editor/esm/vs/editor/editor.worker?worker";
236 changes: 236 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
devenv.url = "github:cachix/devenv";
};

nixConfig = {
extra-trusted-public-keys = "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=";
extra-substituters = "https://devenv.cachix.org";
};

outputs = { self, nixpkgs, devenv, ... } @ inputs:
let
pkgs = nixpkgs.legacyPackages."x86_64-linux";
in
{
devShell.x86_64-linux = devenv.lib.mkShell {
inherit inputs pkgs;
modules = [
({ pkgs, config, ... }: {
packages = [ pkgs.bun ];
languages.javascript = {
enable = true;
# npm.install.enable = true;
};
})
];
};
};
}



11 changes: 11 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
default:
@just --choose

gen-api:
pnpm run gen-api

build: gen-api
pnpm run build

dev: gen-api
pnpm run dev
Loading