diff --git a/flake.nix b/flake.nix index a4f815e..74e8908 100644 --- a/flake.nix +++ b/flake.nix @@ -44,6 +44,7 @@ pkgs.sqlx-cli pkgs.udev pkgs.wasm-pack + pkgs.go-task typeshare.packages."x86_64-linux".default pkgs.nodePackages_latest.typescript-language-server ]; diff --git a/visions/visions-types/.gitignore b/visions/visions-types/.gitignore new file mode 100644 index 0000000..41d1bbd --- /dev/null +++ b/visions/visions-types/.gitignore @@ -0,0 +1,2 @@ +dist +visions.ts diff --git a/visions/visions-types/Taskfile.yml b/visions/visions-types/Taskfile.yml new file mode 100644 index 0000000..4d2d386 --- /dev/null +++ b/visions/visions-types/Taskfile.yml @@ -0,0 +1,7 @@ +version: '3' + +tasks: + build: + cmds: + - typeshare --lang typescript --output-file visions.ts ../server/src + - npx tsc diff --git a/visions/visions-types/package-lock.json b/visions/visions-types/package-lock.json new file mode 100644 index 0000000..f339d13 --- /dev/null +++ b/visions/visions-types/package-lock.json @@ -0,0 +1,28 @@ +{ + "name": "visions-types", + "version": "0.0.1", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "visions-types", + "version": "0.0.1", + "license": "ISC", + "dependencies": { + "typescript": "^5.6.3" + } + }, + "node_modules/typescript": { + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + } + } +} diff --git a/visions/visions-types/package.json b/visions/visions-types/package.json new file mode 100644 index 0000000..034f812 --- /dev/null +++ b/visions/visions-types/package.json @@ -0,0 +1,14 @@ +{ + "name": "visions-types", + "version": "0.0.1", + "description": "Shared data types for Visions", + "main": "visions.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "dependencies": { + "typescript": "^5.6.3" + } +} diff --git a/visions/visions-types/tsconfig.json b/visions/visions-types/tsconfig.json new file mode 100644 index 0000000..2fbee24 --- /dev/null +++ b/visions/visions-types/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "target": "es2016", + "module": "commonjs", + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "outDir": "./dist", + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true + }, + "include": ["./visions.ts"] +}