From e176096d5c978f35e0f2828f592febd173c613e3 Mon Sep 17 00:00:00 2001 From: "analogdev.eth" Date: Mon, 29 Aug 2022 10:04:47 -0700 Subject: [PATCH] Re-structure folder for package publish (#561) --- .gitignore | 2 ++ .npmignore | 1 + index.ts | 5 ----- package.json | 15 +++++++++++++++ src/index.ts | 5 +++++ {lists => src}/joe.tokenlist-v2.json | 0 {types => src}/schema.tokenlist-v2.json | 0 types/index.ts => src/types.ts | 0 tsconfig.json | 13 +++++++++++++ yarn.lock | 8 ++++++++ 10 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 .npmignore delete mode 100644 index.ts create mode 100644 package.json create mode 100644 src/index.ts rename {lists => src}/joe.tokenlist-v2.json (100%) rename {types => src}/schema.tokenlist-v2.json (100%) rename types/index.ts => src/types.ts (100%) create mode 100644 tsconfig.json create mode 100644 yarn.lock diff --git a/.gitignore b/.gitignore index e43b0f98..3bdd52eb 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ +node_modules/ +dist/ .DS_Store diff --git a/.npmignore b/.npmignore new file mode 100644 index 00000000..f8663c5d --- /dev/null +++ b/.npmignore @@ -0,0 +1 @@ +logos/ \ No newline at end of file diff --git a/index.ts b/index.ts deleted file mode 100644 index 5f6bfcc9..00000000 --- a/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import tokenlist from "./lists/joe.tokenlist-v2.json"; -import schema from "./types/schema.tokenlist-v2.json"; - -export * from "./types"; -export { schema, tokenlist }; diff --git a/package.json b/package.json new file mode 100644 index 00000000..b1fa3b98 --- /dev/null +++ b/package.json @@ -0,0 +1,15 @@ +{ + "name": "joe-tokenlists", + "version": "1.0.0", + "main": "dist/index.js", + "repository": "https://github.com/traderjoe-xyz/joe-tokenlists.git", + "author": "traderjoexyz", + "scripts": { + "start": "npx tsc --watch", + "build": "npx tsc --build" + }, + "license": "MIT", + "devDependencies": { + "typescript": "^4.8.2" + } +} diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 00000000..065a0a90 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,5 @@ +import tokenlist from "./joe.tokenlist-v2.json"; +import schema from "./schema.tokenlist-v2.json"; + +export * from "./types"; +export { schema, tokenlist }; diff --git a/lists/joe.tokenlist-v2.json b/src/joe.tokenlist-v2.json similarity index 100% rename from lists/joe.tokenlist-v2.json rename to src/joe.tokenlist-v2.json diff --git a/types/schema.tokenlist-v2.json b/src/schema.tokenlist-v2.json similarity index 100% rename from types/schema.tokenlist-v2.json rename to src/schema.tokenlist-v2.json diff --git a/types/index.ts b/src/types.ts similarity index 100% rename from types/index.ts rename to src/types.ts diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..c08b829e --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "target": "es2016", + "module": "commonjs", + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true, + "resolveJsonModule": true, + "rootDir": "./src", + "outDir": "dist" + } +} diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 00000000..57177910 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,8 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +typescript@^4.8.2: + version "4.8.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.2.tgz#e3b33d5ccfb5914e4eeab6699cf208adee3fd790" + integrity sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==