github.com/GoogleContainerTools/skaffold/v2@v2.13.2/examples/typescript/README.md (about)

     1  ### Example: TypeScript + Node.js with hot-reload
     2  
     3  [![Open in Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.svg)](https://ssh.cloud.google.com/cloudshell/editor?cloudshell_git_repo=https://github.com/GoogleContainerTools/skaffold&cloudshell_open_in_editor=README.md&cloudshell_workspace=examples/typescript)
     4  
     5  Seeks to be functionally identical to the [Node.js](../nodejs) example, except with TypeScript.
     6  
     7  Swaps [nodemon](https://nodemon.io/) for [tsc-watch](https://github.com/gilamran/tsc-watch#the-nodemon-for-typescript)
     8  
     9  #### Init
    10  
    11  ```bash
    12  skaffold dev
    13  ```
    14  
    15  #### Workflow
    16  
    17  * Make some changes to [index.ts](./backend/src/index.ts):
    18      * The file will be synchronized to the cluster
    19      * `tsc-watch` will restart the application
    20  * Make some changes to `package.json`:
    21      * The full build/push/deploy process will be triggered, fetching dependencies from `npm`
    22  * NOTE: Currently in this example, `tsc-watch` is not configured when `ENV=production`.  To configure it, update the [package.json](./backend/src/package.json) file `scripts.production"` field to be:
    23    * `"production": "tsc && node ./src/index.js"` instead of the default `"production": "node src/index.js",`
    24