Skip to content

Build your personal knowledge base with Trilium Notes

chore(nx/desktop): start off with empty project

Elian Doran492e953517c6
diff --git a/apps/desktop/eslint.config.mjs b/apps/desktop/eslint.config.mjs
new file mode 100644
index 0000000000..724052a2e2
--- /dev/null
+++ b/apps/desktop/eslint.config.mjs
@@ -0,0 +1,5 @@
+import baseConfig from "../../eslint.config.mjs";
+
+export default [
+ ...baseConfig
+];
diff --git a/apps/desktop/package.json b/apps/desktop/package.json
new file mode 100644
index 0000000000..b0691054ab
--- /dev/null
+++ b/apps/desktop/package.json
@@ -0,0 +1,65 @@
+{
+ "name": "@triliumnext/desktop",
+ "version": "0.0.1",
+ "private": true,
+ "nx": {
+ "targets": {
+ "build": {
+ "executor": "@nx/esbuild:esbuild",
+ "outputs": [
+ "{options.outputPath}"
+ ],
+ "defaultConfiguration": "production",
+ "options": {
+ "platform": "node",
+ "outputPath": "apps/desktop/dist",
+ "format": [
+ "cjs"
+ ],
+ "bundle": false,
+ "main": "apps/desktop/src/main.ts",
+ "tsConfig": "apps/desktop/tsconfig.app.json",
+ "assets": [
+ "apps/desktop/src/assets"
+ ],
+ "esbuildOptions": {
+ "sourcemap": true,
+ "outExtension": {
+ ".js": ".js"
+ }
+ }
+ },
+ "configurations": {
+ "development": {},
+ "production": {
+ "esbuildOptions": {
+ "sourcemap": false,
+ "outExtension": {
+ ".js": ".js"
+ }
+ }
+ }
+ }
+ },
+ "serve": {
+ "executor": "@nx/js:node",
+ "defaultConfiguration": "development",
+ "dependsOn": [
+ "build"
+ ],
+ "options": {
+ "buildTarget": "@triliumnext/desktop:build",
+ "runBuildTargetDependencies": false
+ },
+ "configurations": {
+ "development": {
+ "buildTarget": "@triliumnext/desktop:build:development"
+ },
+ "production": {
+ "buildTarget": "@triliumnext/desktop:build:production"
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/apps/desktop/src/assets/.gitkeep b/apps/desktop/src/assets/.gitkeep
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/apps/desktop/src/main.ts b/apps/desktop/src/main.ts
new file mode 100644
index 0000000000..73c02658c4
--- /dev/null
+++ b/apps/desktop/src/main.ts
@@ -0,0 +1 @@
+console.log('Hello World');
\ No newline at end of file
diff --git a/apps/desktop/tsconfig.app.json b/apps/desktop/tsconfig.app.json
new file mode 100644
index 0000000000..bdf9ba8617
--- /dev/null
+++ b/apps/desktop/tsconfig.app.json
@@ -0,0 +1,19 @@
+{
+ "extends": "../../tsconfig.base.json",
+ "compilerOptions": {
+ "outDir": "dist",
+ "types": [
+ "node"
+ ],
+ "rootDir": "src",
+ "tsBuildInfoFile": "dist/tsconfig.app.tsbuildinfo"
+ },
+ "include": [
+ "src/**/*.ts"
+ ],
+ "exclude": [
+ "eslint.config.js",
+ "eslint.config.cjs",
+ "eslint.config.mjs"
+ ]
+}
diff --git a/apps/desktop/tsconfig.json b/apps/desktop/tsconfig.json
new file mode 100644
index 0000000000..816e3f36f4
--- /dev/null
+++ b/apps/desktop/tsconfig.json
@@ -0,0 +1,10 @@
+{
+ "extends": "../../tsconfig.base.json",
+ "files": [],
+ "include": [],
+ "references": [
+ {
+ "path": "./tsconfig.app.json"
+ }
+ ]
+}
diff --git a/tsconfig.json b/tsconfig.json
index bee892ca8d..f8a33c8a92 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -20,6 +20,12 @@
},
{
"path": "./apps/client"
+ },
+ {
+ "path": "./apps/desktop"
+ },
+ {
+ "path": "./apps/desktop-e2e"
}
]
}