From 48fc7fed6a5e81ab4f3f70a131bbda89ae44b7d4 Mon Sep 17 00:00:00 2001 From: Pavel Murygin Date: Mon, 21 Feb 2022 17:00:08 +0300 Subject: [PATCH] Fix gitignore, add build scripts --- .../price-oracle/client-peer/package.json | 1 + fluence-js-examples/hello-world/.gitignore | 27 +++++++++++++++++++ fluence-js-examples/hello-world/package.json | 1 + fluence-js-examples/node-example/.gitignore | 27 +++++++++++++++++++ fluence-js-examples/node-example/package.json | 1 + .../node-example/tsconfig.json | 26 +++++++++++++++--- 6 files changed, 79 insertions(+), 4 deletions(-) diff --git a/aqua-examples/price-oracle/client-peer/package.json b/aqua-examples/price-oracle/client-peer/package.json index fa91171..0bff859 100644 --- a/aqua-examples/price-oracle/client-peer/package.json +++ b/aqua-examples/price-oracle/client-peer/package.json @@ -21,6 +21,7 @@ "prestart": "npm run compile-aqua", "start": "node -r ts-node/register src/index.ts", "test": "jest", + "build": "tsc", "compile-aqua": "aqua --import . -i ../aqua/ -o ./src/_aqua", "watch-aqua": "chokidar \"**/*.aqua\" -c \"npm run compile-aqua\"" }, diff --git a/fluence-js-examples/hello-world/.gitignore b/fluence-js-examples/hello-world/.gitignore index 94cf57a..6bc34cf 100644 --- a/fluence-js-examples/hello-world/.gitignore +++ b/fluence-js-examples/hello-world/.gitignore @@ -1,3 +1,30 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# production +/build + +/dist + +# misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* + + # fluence src/_aqua/* diff --git a/fluence-js-examples/hello-world/package.json b/fluence-js-examples/hello-world/package.json index 9fabe14..7402076 100644 --- a/fluence-js-examples/hello-world/package.json +++ b/fluence-js-examples/hello-world/package.json @@ -6,6 +6,7 @@ "scripts": { "prestart": "npm run compile-aqua", "start": "node -r ts-node/register src/index.ts", + "build": "tsc", "test": "jest", "compile-aqua": "aqua --import . -i ./aqua/ -o ./src/_aqua", "watch-aqua": "chokidar \"**/*.aqua\" -c \"npm run compile-aqua\"" diff --git a/fluence-js-examples/node-example/.gitignore b/fluence-js-examples/node-example/.gitignore index 94cf57a..6bc34cf 100644 --- a/fluence-js-examples/node-example/.gitignore +++ b/fluence-js-examples/node-example/.gitignore @@ -1,3 +1,30 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# production +/build + +/dist + +# misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* + + # fluence src/_aqua/* diff --git a/fluence-js-examples/node-example/package.json b/fluence-js-examples/node-example/package.json index 51bf575..1dc03b6 100644 --- a/fluence-js-examples/node-example/package.json +++ b/fluence-js-examples/node-example/package.json @@ -7,6 +7,7 @@ "prestart": "npm run compile-aqua", "start": "node -r ts-node/register src/index.ts", "test": "jest", + "build": "tsc", "compile-aqua": "aqua --import . -i ./aqua/ -o ./src/_aqua", "watch-aqua": "chokidar \"**/*.aqua\" -c \"npm run compile-aqua\"" }, diff --git a/fluence-js-examples/node-example/tsconfig.json b/fluence-js-examples/node-example/tsconfig.json index 046c550..6f29036 100644 --- a/fluence-js-examples/node-example/tsconfig.json +++ b/fluence-js-examples/node-example/tsconfig.json @@ -1,7 +1,25 @@ { "compilerOptions": { - "target": "ES2015", - "module": "CommonJS", - "skipLibCheck": true - } + "lib": [ + "es2015", + "dom" + ], + "outDir": "./dist/", + "target": "es5", + "module": "commonjs", + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "declaration": true, + "declarationMap": false, + "sourceMap": true, + }, + "exclude": [ + "node_modules", + "dist" + ], + "include": [ + "src" + ], } \ No newline at end of file