Skip to content

Commit

Permalink
switch to ts
Browse files Browse the repository at this point in the history
  • Loading branch information
robertlincecum committed Dec 19, 2023
1 parent 66372c2 commit 76d1dc5
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .last_dir
Original file line number Diff line number Diff line change
@@ -1 +1 @@
js
ts
7 changes: 0 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

7 changes: 7 additions & 0 deletions js/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

4 changes: 2 additions & 2 deletions js/package.json
Original file line number Diff line number Diff line change
@@ -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": {}
}
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -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"
}
}

2 changes: 2 additions & 0 deletions sample.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
console.log("Hello from TypeScript");

8 changes: 8 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"target": "es5",
"module": "commonjs"
},
"include": ["*.ts"]
}

0 comments on commit 76d1dc5

Please sign in to comment.