diff --git a/.dockerignore b/.dockerignore index 6c3840719..941905c66 100644 --- a/.dockerignore +++ b/.dockerignore @@ -5,3 +5,5 @@ /docs /npm-debug.log node_modules + +src/**/*.ts \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 89bda6741..78429488a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,6 +21,10 @@ COPY . . COPY server-package.json package.json +# Copy TypeScript build artifacts into the original directory structure. +RUN ls +RUN cp -R build/src/* src/. + # Install app dependencies RUN set -x \ && npm install \ diff --git a/bin/build-docker.sh b/bin/build-docker.sh index c77850eba..2b3794677 100755 --- a/bin/build-docker.sh +++ b/bin/build-docker.sh @@ -5,6 +5,9 @@ SERIES=${VERSION:0:4}-latest cat package.json | grep -v electron > server-package.json +echo "Compiling typescript..." +npx tsc + sudo docker build -t zadam/trilium:$VERSION --network host -t zadam/trilium:$SERIES . if [[ $VERSION != *"beta"* ]]; then diff --git a/tsconfig.json b/tsconfig.json index bf97f7be2..293c66f7c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -13,8 +13,7 @@ }, "include": [ "./src/**/*.js", - "./src/**/*.ts", - "./*.ts" + "./src/**/*.ts" ], "exclude": ["./node_modules/**/*"], "ts-node": { diff --git a/webpack.config.js b/webpack.config.js index 2e3bd7b17..41077c00e 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -4,7 +4,7 @@ const assetPath = require('./src/services/asset_path'); module.exports = { mode: 'production', entry: { - setup: './src/public/app/setup.ts', + setup: './src/public/app/setup.js', mobile: './src/public/app/mobile.js', desktop: './src/public/app/desktop.js', },