Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

Add ts-node dependency #55

Closed
wants to merge 7 commits into from
Closed

Add ts-node dependency #55

wants to merge 7 commits into from

Conversation

pavlogs
Copy link
Contributor

@pavlogs pavlogs commented May 24, 2021

No description provided.

Copy link
Member

@meriadec meriadec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

several feedbacks
also mode was changed to 755 (before: 644) on ./src/scan.ts, but it's not used anywhere (it's launched with node in package.json) => I guess this can be reverted

@@ -1,3 +1,4 @@
.env
.idea
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prefer using a global gitignore for user-specific stuff (.idea has nothing to do with xpub-scan files)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a good point. I will set up it locally

@@ -6,6 +6,7 @@
"xpub-scan": "./lib/scan.js"
},
"scripts": {
"scan": "node --require ts-node/register ./src/scan",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about directly

"scan": "ts-node ./src/scan",

@@ -11,6 +9,8 @@ import { DerivationMode } from "../configuration/currencies";
import { getStats, getTransactions } from "./processTransactions";
import { TODO_TypeThis } from "../types";

const sb = require("satoshi-bitcoin");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

intended to not use the JS import syntax?

import bchaddr from "bchaddrjs";

import { DerivationMode } from "../configuration/currencies";
import { configuration } from "../configuration/settings";

const bch = require("bitcoincashjs");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment

@@ -12,6 +11,8 @@ import { Address } from "../models/address";
import { TODO_TypeThis } from "../types";
import { currencies } from "../configuration/currencies";

const sb = require("satoshi-bitcoin");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

import { Comparison } from "../models/comparison";

const sb = require("satoshi-bitcoin");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

@@ -1,4 +1,4 @@
import coininfo from "coininfo";
const coininfo = require("coininfo");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

import { Operation } from "../models/operation";
import { configuration } from "../configuration/settings";

const sb = require("satoshi-bitcoin");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same


declare module "coininfo";

declare module "bitcoincashjs";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why deleting this?

@meriadec
Copy link
Member

just checked and in fact, the only thing you have to do is to use --files flag with ts-node (reference here)

so:

ts-node --files ./src/scan.ts

@meriadec meriadec closed this May 25, 2021
@pavlogs
Copy link
Contributor Author

pavlogs commented May 25, 2021

ts-node --files ./src/scan.ts

Ok. I'll try it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants