Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace app engine js compilation with ts-node #1570

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions appengine/typescript/.gcloudignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
# Exclude compiled .js files
*.js

# Exclude dependencies
node_modules/
3 changes: 0 additions & 3 deletions appengine/typescript/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
# Exclude compiled .js files
*.js

# Exclude dependencies
node_modules/
12 changes: 2 additions & 10 deletions appengine/typescript/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
# App Engine TypeScript sample

This sample provides an example of how to compile TypeScript files while
deploying to App Engine.

The `gcp-build` NPM script is used to trigger the TypeScript compilation
process. This step happens automatically when deploying to App Engine, but must
be performed manually when developing locally.
This sample provides an example of how to deploy TypeScript files to
to App Engine.

## Setup

Expand All @@ -15,10 +11,6 @@ Install dependencies:

## Running locally

1. Perform the build step:

npm run gcp-build

1. Run the completed program

npm start
Expand Down
8 changes: 3 additions & 5 deletions appengine/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,15 @@
"node": ">=8.0.0"
},
"scripts": {
"prepare": "npm run gcp-build",
"pretest": "npm run gcp-build",
"test": "repo-tools test app -- index.js",
"test": "repo-tools test app -- index.ts",
"posttest": "npm run lint",
"lint": "tslint -p .",
"start": "node ./index.js",
"gcp-build": "tsc -p .",
"start": "ts-node ./index.ts",
"deploy": "gcloud app deploy"
},
"dependencies": {
"express": "^4.16.3",
"ts-node": "^8.5.4",
"typescript": "^3.0.1"
},
"devDependencies": {
Expand Down