From 2026cf0b306fd371680bfd92a875bed561c714b2 Mon Sep 17 00:00:00 2001 From: ymekuria Date: Wed, 8 Jun 2022 13:54:56 -0700 Subject: [PATCH 1/7] feat: add index.ts entry point to template --- templates/project-ts/src/index.ts | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 templates/project-ts/src/index.ts diff --git a/templates/project-ts/src/index.ts b/templates/project-ts/src/index.ts new file mode 100644 index 00000000..961aac7f --- /dev/null +++ b/templates/project-ts/src/index.ts @@ -0,0 +1,3 @@ +import { Add } from './Add'; + +export { Add }; \ No newline at end of file From 27d4924e4bab59e857d3f182123d9b5700d29cbe Mon Sep 17 00:00:00 2001 From: ymekuria Date: Wed, 8 Jun 2022 14:43:13 -0700 Subject: [PATCH 2/7] refactor: rename file to run sudoku contract locally to run.ts --- examples/sudoku/ts/src/{index.ts => run.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename examples/sudoku/ts/src/{index.ts => run.ts} (100%) diff --git a/examples/sudoku/ts/src/index.ts b/examples/sudoku/ts/src/run.ts similarity index 100% rename from examples/sudoku/ts/src/index.ts rename to examples/sudoku/ts/src/run.ts From b0dab789f1d1006b62841ac718732e6973e0fc0d Mon Sep 17 00:00:00 2001 From: ymekuria Date: Wed, 8 Jun 2022 14:44:27 -0700 Subject: [PATCH 3/7] feat: add index.ts entry point to sudoku example --- examples/sudoku/ts/src/index.ts | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 examples/sudoku/ts/src/index.ts diff --git a/examples/sudoku/ts/src/index.ts b/examples/sudoku/ts/src/index.ts new file mode 100644 index 00000000..e6ca2088 --- /dev/null +++ b/examples/sudoku/ts/src/index.ts @@ -0,0 +1,3 @@ +import { SudokuZkApp } from './sudoku'; + +export { SudokuZkApp }; From 814165d3232919a214393aa3f836f82fe9af0ccb Mon Sep 17 00:00:00 2001 From: ymekuria Date: Wed, 8 Jun 2022 14:45:39 -0700 Subject: [PATCH 4/7] refactor: rename file to run tictactoe contract locally to run.ts --- examples/tictactoe/ts/src/{index.ts => run.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename examples/tictactoe/ts/src/{index.ts => run.ts} (100%) diff --git a/examples/tictactoe/ts/src/index.ts b/examples/tictactoe/ts/src/run.ts similarity index 100% rename from examples/tictactoe/ts/src/index.ts rename to examples/tictactoe/ts/src/run.ts From cc1936578dff003cd38bea179bb33b5f5420d01e Mon Sep 17 00:00:00 2001 From: ymekuria Date: Wed, 8 Jun 2022 14:48:34 -0700 Subject: [PATCH 5/7] feat: add index.ts entry point to tictactoe example --- examples/tictactoe/ts/src/index.ts | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 examples/tictactoe/ts/src/index.ts diff --git a/examples/tictactoe/ts/src/index.ts b/examples/tictactoe/ts/src/index.ts new file mode 100644 index 00000000..721ca4d9 --- /dev/null +++ b/examples/tictactoe/ts/src/index.ts @@ -0,0 +1,3 @@ +import { TicTacToe, Board } from './tictactoe'; + +export { TicTacToe, Board }; From 17c332460c526682b0b305ef8d96c4c5ed550316 Mon Sep 17 00:00:00 2001 From: ymekuria Date: Wed, 8 Jun 2022 15:24:43 -0700 Subject: [PATCH 6/7] feat: update example comment instructions to use run.js --- examples/sudoku/ts/src/run.ts | 2 +- examples/tictactoe/ts/src/run.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/sudoku/ts/src/run.ts b/examples/sudoku/ts/src/run.ts index efb3649e..178cc578 100644 --- a/examples/sudoku/ts/src/run.ts +++ b/examples/sudoku/ts/src/run.ts @@ -7,7 +7,7 @@ * * To run locally: * Build the project: `$ npm run build` - * Run with node: `$ node build/src/index.js`. + * Run with node: `$ node build/src/run.js`. */ import { deploy, diff --git a/examples/tictactoe/ts/src/run.ts b/examples/tictactoe/ts/src/run.ts index ea45c589..794e074d 100644 --- a/examples/tictactoe/ts/src/run.ts +++ b/examples/tictactoe/ts/src/run.ts @@ -7,7 +7,7 @@ * * To run locally: * Build the project: `$ npm run build` - * Run with node: `$ node build/src/index.js`. + * Run with node: `$ node build/src/run.js`. */ import { Field, PrivateKey, Mina, shutdown, isReady } from 'snarkyjs'; From 4b9d2df03a0a714f616f7400e367cef9c30d17c2 Mon Sep 17 00:00:00 2001 From: ymekuria Date: Wed, 8 Jun 2022 16:02:52 -0700 Subject: [PATCH 7/7] fix: update example and template contract imports --- examples/sudoku/ts/src/index.ts | 2 +- examples/tictactoe/ts/src/index.ts | 2 +- templates/project-ts/src/index.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/sudoku/ts/src/index.ts b/examples/sudoku/ts/src/index.ts index e6ca2088..531cd026 100644 --- a/examples/sudoku/ts/src/index.ts +++ b/examples/sudoku/ts/src/index.ts @@ -1,3 +1,3 @@ -import { SudokuZkApp } from './sudoku'; +import { SudokuZkApp } from './sudoku.js'; export { SudokuZkApp }; diff --git a/examples/tictactoe/ts/src/index.ts b/examples/tictactoe/ts/src/index.ts index 721ca4d9..b7245c64 100644 --- a/examples/tictactoe/ts/src/index.ts +++ b/examples/tictactoe/ts/src/index.ts @@ -1,3 +1,3 @@ -import { TicTacToe, Board } from './tictactoe'; +import { TicTacToe, Board } from './tictactoe.js'; export { TicTacToe, Board }; diff --git a/templates/project-ts/src/index.ts b/templates/project-ts/src/index.ts index 961aac7f..56c8c7e5 100644 --- a/templates/project-ts/src/index.ts +++ b/templates/project-ts/src/index.ts @@ -1,3 +1,3 @@ -import { Add } from './Add'; +import { Add } from './Add.js'; -export { Add }; \ No newline at end of file +export { Add };