From df4a6dd0ebad0b9db16347d9a44fe95965af60bd Mon Sep 17 00:00:00 2001 From: Taylor Dawson Date: Fri, 11 Jun 2021 00:42:56 -0700 Subject: [PATCH] 0.2.2: [feat] Configure for TS (#1) * Adds declaration files * Adds built dist folder --- .gitignore | 3 ++- package.json | 10 ++++++---- tsconfig.json | 4 ++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index ba2a8a7..8ad86f4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ chains.json -node_modules \ No newline at end of file +node_modules +dist \ No newline at end of file diff --git a/package.json b/package.json index 812d866..89d9f72 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,17 @@ { "name": "eth-chains", - "version": "0.2.1", + "version": "0.2.2", "description": "Helper module for getting Ethereum chains info.", - "main": "index.ts", "author": "Taylor Dawson", + "main": "dist/index.js", + "types": "dist/index.d.ts", "license": "WTFPL", - "private": false, "scripts": { - "build": "ts-node src/build.ts", + "build": "tsc", + "generate": "ts-node src/build.ts", "format": "prettier --write src/" }, + "prepublish": "tsc", "dependencies": { "got": "^11.8.2" }, diff --git a/tsconfig.json b/tsconfig.json index 31e17ea..6942ba1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,11 +10,11 @@ // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ + "declaration": true, /* Generates corresponding '.d.ts' file. */ // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ // "sourceMap": true, /* Generates corresponding '.map' file. */ // "outFile": "./", /* Concatenate and emit output to single file. */ - "outDir": "./bin", /* Redirect output structure to the directory. */ + "outDir": "./dist", /* Redirect output structure to the directory. */ "rootDir": ".", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ // "composite": true, /* Enable project compilation */ // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */