Skip to content
Merged
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
10 changes: 10 additions & 0 deletions .github/workflows/richnav-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,19 @@ jobs:
with:
node-version: 12.x

# **** Please update to point to the location where your node dependencies are installed **** #
- uses: actions/cache@v2
id: caching-stage
name: Cache dependencies
with:
path: node_modules
key: ${{ runner.os }}-dependencies-${{ hashfiles('typescript/yarn.lock') }}
restore-keys: ${{ runner.os }}-dependencies-

# **** Please update, at least, the working directory below. You may also want to use npm install instead **** #
- run: yarn
working-directory: typescript
if: steps.caching-stage.outputs.cache-hit != 'true'

# **** If you use NPM to install packages, please uncomment this task and delete the yarn task **** #
# - name: npm install
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/richnav-typescript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,19 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

# **** Please update to point to the location where your node dependencies are installed **** #
- uses: actions/cache@v2
id: caching-stage
name: Cache dependencies
with:
path: node_modules
key: ${{ runner.os }}-dependencies-${{ hashfiles('typescript/yarn.lock') }}
restore-keys: ${{ runner.os }}-dependencies-

# **** Please update the working-directory to the location where your package.json file resides **** #
- run: yarn
working-directory: typescript
if: steps.caching-stage.outputs.cache-hit != 'true'

- uses: microsoft/RichCodeNavIndexer@v0.1
with:
Expand Down
6 changes: 5 additions & 1 deletion typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@
"license": "MIT",
"scripts": {
"build": "tsc -p ./"
},
"dependencies": {
"@types/node": "^14.11.3",
"add-two-number": "^0.2.0"
}
}
}
2 changes: 2 additions & 0 deletions typescript/src/GameObject.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Drawable from './Drawable'
import Interactive from './Interactive'
const add: any = require('add-two-number');

export default class GameObject implements Drawable, Interactive {
posX: number;
Expand All @@ -12,6 +13,7 @@ export default class GameObject implements Drawable, Interactive {

interact(): void {
console.log("Interacting with GameObject");
console.log(`Adding two numbers: ${add(this.posX, this.posY)}`);
}

draw(): void {
Expand Down
4 changes: 4 additions & 0 deletions typescript/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
# yarn lockfile v1


add-two-number@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/add-two-number/-/add-two-number-0.2.0.tgz#f21e52b3a328f3551b247489b4b0351465ef363e"
integrity sha512-zB+QIdul0cHNXAj1xVAhzhk8WQ8JvLYlp1L3kwZr3zIIgdV+U1kp4DkRJRqutvPgDl1jBG9TcbMU3cWgeY9d7w==