-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Attempt to use TypeScript project references
- Loading branch information
Showing
37 changed files
with
482 additions
and
416 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,6 @@ config.env | |
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/sdks | ||
!.yarn/versions | ||
!.yarn/versions | ||
out | ||
out.node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
FROM node:21-alpine | ||
MAINTAINER Candid Dauth <[email protected]> | ||
|
||
CMD yarn run server | ||
CMD yarn run prod-server | ||
EXPOSE 8080 | ||
ENV CACHE_DIR=/opt/facilmap/cache | ||
|
||
|
@@ -19,7 +19,7 @@ USER facilmap | |
|
||
RUN cd .. && yarn install | ||
|
||
RUN cd .. && yarn run build | ||
RUN cd .. && yarn run build:frontend:app && yarn run build:server | ||
|
||
USER root | ||
RUN chown -R root:root /opt/facilmap && mkdir -p "$CACHE_DIR" && chown -R facilmap:facilmap "$CACHE_DIR" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,15 @@ | ||
{ | ||
"extends": "../tsconfig.json", | ||
"extends": "../tsconfig.base.json", | ||
"compilerOptions": { | ||
"outDir": "./out", | ||
"composite": true, | ||
"paths": { | ||
"facilmap-types": ["../types/src/index.ts"] | ||
} | ||
}, | ||
"references": [ | ||
{ "path": "./tsconfig.node.json" }, | ||
{ "path": "../types/tsconfig.json" } | ||
], | ||
"include": ["src/**/*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"extends": "../tsconfig.base.json", | ||
"compilerOptions": { | ||
"composite": true, | ||
"outDir": "out.node" | ||
}, | ||
"include": [ | ||
"vite.config.ts" | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { createServer, type InlineConfig, type ViteDevServer } from "vite"; | ||
import { dirname } from "path"; | ||
import { fileURLToPath } from "url"; | ||
|
||
const root = dirname(fileURLToPath(import.meta.url)); | ||
const dist = `${root}/dist/app`; | ||
|
||
export const paths = { | ||
root, | ||
dist, | ||
base: '/_app/', | ||
mapEntry: "src/map/map.ts", | ||
mapEjs: `${root}/src/map/map.ejs`, | ||
tableEntry: "src/table/table.ts", | ||
tableEjs: `${root}/src/table/table.ejs`, | ||
manifest: `${dist}/manifest.json`, | ||
}; | ||
|
||
export async function serve(inlineConfig: InlineConfig = {}): Promise<ViteDevServer> { | ||
return await createServer({ | ||
root, | ||
...inlineConfig | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,22 @@ | ||
{ | ||
"extends": "../tsconfig.json", | ||
"extends": "../tsconfig.base.json", | ||
"compilerOptions": { | ||
"resolveJsonModule": true | ||
"outDir": "./out", | ||
"composite": true, | ||
"paths": { | ||
"facilmap-client": ["../client/src/client.ts"], | ||
"facilmap-leaflet": ["../leaflet/src/index.ts"], | ||
"facilmap-types": ["../types/src/index.ts"], | ||
"facilmap-utils": ["../utils/src/index.ts"] | ||
} | ||
}, | ||
"references": [ | ||
{ "path": "./tsconfig.node.json" }, | ||
{ "path": "../client/tsconfig.json" }, | ||
{ "path": "../leaflet/tsconfig.json" }, | ||
{ "path": "../types/tsconfig.json" }, | ||
{ "path": "../utils/tsconfig.json" }, | ||
{ "path": "../tsconfig.json" } | ||
], | ||
"include": ["src/**/*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"extends": "../tsconfig.base.json", | ||
"compilerOptions": { | ||
"composite": true, | ||
"outDir": "out.node" | ||
}, | ||
"include": [ | ||
"vite.config.ts", | ||
"vite-define.ts", | ||
"build.ts" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import type { Plugin } from "vite"; | ||
import { readFile } from "fs/promises"; | ||
|
||
export default function definePlugin(): Plugin { | ||
return { | ||
name: "FacilMap define", | ||
config: async (config) => { | ||
const packageJson = JSON.parse(await readFile(new URL("./package.json", import.meta.url), "utf8")); | ||
config.define = config.define ?? {}; | ||
config.define["__FM_VERSION__"] = JSON.stringify(packageJson.version); | ||
} | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,19 @@ | ||
{ | ||
"extends": "../tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "./out", | ||
"composite": true, | ||
"paths": { | ||
"facilmap-client": ["../client/src/client.ts"], | ||
"facilmap-types": ["../types/src/index.ts"], | ||
"facilmap-utils": ["../utils/src/index.ts"] | ||
} | ||
}, | ||
"extends": "../tsconfig.base.json", | ||
"references": [ | ||
{ "path": "./tsconfig.node.json" }, | ||
{ "path": "../client/tsconfig.json" }, | ||
{ "path": "../types/tsconfig.json" }, | ||
{ "path": "../utils/tsconfig.json" } | ||
], | ||
"include": ["src/**/*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"extends": "../tsconfig.base.json", | ||
"compilerOptions": { | ||
"composite": true, | ||
"outDir": "out.node" | ||
}, | ||
"include": [ | ||
"vite.config.ts", | ||
"rollup-icons.ts", | ||
"download-icons.ts" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.