diff --git a/.last_dir b/.last_dir index 7b4dcb5..e082170 100644 --- a/.last_dir +++ b/.last_dir @@ -1 +1 @@ -js +ts diff --git a/Dockerfile b/Dockerfile index 28892ec..a9e4746 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,13 +4,6 @@ WORKDIR /app COPY ./ . -ARG BUILD_ENV - -RUN echo building $BUILD_ENV - RUN npm install - -RUN BUILD_ENV=$BUILD_ENV npm run build - CMD ["npm", "start"] diff --git a/js/Dockerfile b/js/Dockerfile index a9e4746..28892ec 100644 --- a/js/Dockerfile +++ b/js/Dockerfile @@ -4,6 +4,13 @@ WORKDIR /app COPY ./ . +ARG BUILD_ENV + +RUN echo building $BUILD_ENV + RUN npm install + +RUN BUILD_ENV=$BUILD_ENV npm run build + CMD ["npm", "start"] diff --git a/js/package.json b/js/package.json index dba9bb0..7fb76d2 100644 --- a/js/package.json +++ b/js/package.json @@ -1,8 +1,8 @@ { "name": "sample-js-project", - "version": "1.0.0-pre.2", + "version": "1.6.0-pre.4", "scripts": { - "build": "echo 'Building JS project...'" + "build": "echo 'Building JS project...' && echo $BUILD_ENV" }, "dependencies": {} } diff --git a/package.json b/package.json index 7fb76d2..638379b 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,12 @@ { - "name": "sample-js-project", - "version": "1.6.0-pre.4", + "name": "sample-ts-project", + "version": "1.0.0", "scripts": { - "build": "echo 'Building JS project...' && echo $BUILD_ENV" + "build": "tsc" }, - "dependencies": {} + "dependencies": {}, + "devDependencies": { + "typescript": "^4.5.2" + } } + diff --git a/sample.ts b/sample.ts new file mode 100644 index 0000000..ccc4592 --- /dev/null +++ b/sample.ts @@ -0,0 +1,2 @@ +console.log("Hello from TypeScript"); + diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..bcc1941 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,8 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "commonjs" + }, + "include": ["*.ts"] +} +