From 6920799abd752751682fc6fe98d9d46bbeb52a11 Mon Sep 17 00:00:00 2001 From: Lacey Pevey <7490308+pevey@users.noreply.github.com> Date: Sat, 13 May 2023 12:56:43 -0500 Subject: [PATCH] change to typescript build --- package.json | 93 +++++++++++++++++++++------------------------- tsconfig.json | 29 +++++++++++++++ tsconfig.spec.json | 5 +++ 3 files changed, 77 insertions(+), 50 deletions(-) create mode 100644 tsconfig.json create mode 100644 tsconfig.spec.json diff --git a/package.json b/package.json index 94587aa..1b3694e 100644 --- a/package.json +++ b/package.json @@ -1,52 +1,45 @@ { - "name": "medusa-plugin-blog", - "version": "0.1.0", - "description": "Markdown-based blog for Medusa", - "main": "index.js", - "repository": { - "type": "git", - "url": "https://github.com/pevey/medusa-plugin-blog" - }, - "homepage:": "https://pevey.com/medusa-plugin-blog", - "author": "Lacey Pevey", - "license": "MIT", - "devDependencies": { - "@babel/cli": "^7.7.5", - "@babel/core": "^7.7.5", - "@babel/node": "^7.7.4", - "@babel/plugin-proposal-class-properties": "^7.7.4", - "@babel/plugin-transform-instanceof": "^7.8.3", - "@babel/plugin-transform-runtime": "^7.7.6", - "@babel/preset-env": "^7.7.5", - "@babel/register": "^7.7.4", - "@babel/runtime": "^7.9.6", - "awilix": "^8.0.0", - "client-sessions": "^0.8.0", - "cross-env": "^5.2.1", - "jest": "^25.5.2", - "medusa-core-utils": "^1.2.0", - "medusa-test-utils": "^1.1.40" - }, - "scripts": { - "prepare": "cross-env NODE_ENV=production yarn run build", - "test": "jest --passWithNoTests src", - "build": "babel src --out-dir . --ignore '**/__tests__','**/__mocks__'", - "watch": "babel -w src --out-dir . --ignore '**/__tests__','**/__mocks__'" - }, - "peerDependencies": { - "@medusajs/medusa": "^1.8.1", - "medusa-interfaces": "1.3.7" - }, - "dependencies": { - "@babel/plugin-transform-classes": "^7.9.5", - "body-parser": "^1.19.0", - "express": "^4.17.1", - "zod": "^3.21.4" - }, - "gitHead": "3bbd1e8507e00bc471de6ae3c30207999a4a4011", - "keywords": [ - "medusa-plugin", - "medusa", - "blog" - ] + "name": "medusa-plugin-blog", + "version": ".1.0", + "description": "Markdown-based blog for Medusa", + "files": [ + "dist" + ], + "repository": { + "type": "git", + "url": "https://github.com/pevey/medusa-plugin-blog" + }, + "homepage": "https://pevey.com/medusa-plugin-blog", + "author": "Lacey Pevey", + "license": "MIT", + "keywords": [ + "medusa-plugin", + "blog", + "ecommerce", + "headless", + "medusa" + ], + "devDependencies": { + "cross-env": "^5.2.1", + "jest": "^25.5.4", + "medusa-test-utils": "^1.1.40", + "typescript": "^4.9.5" + }, + "scripts": { + "prepare": "cross-env NODE_ENV=production yarn run build", + "test": "jest --passWithNoTests src", + "build": "tsc", + "watch": "tsc --watch" + }, + "peerDependencies": { + "@medusajs/medusa": "^1.10.1", + "@medusajs/utils": "^1.8.4", + "medusa-interfaces": "^1.3.7", + "typeorm": "^0.3.16" + }, + "dependencies": { + "body-parser": "^1.19.0", + "express": "^4.17.2", + "zod": "^3.21.4" + } } diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..153f8aa --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,29 @@ +{ + "compilerOptions": { + "lib": ["es2020"], + "target": "es2020", + "outDir": "./", + "esModuleInterop": true, + "declaration": false, + "module": "commonjs", + "moduleResolution": "node", + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "sourceMap": true, + "noImplicitReturns": false, + "strictNullChecks": false, + "strictFunctionTypes": false, + "noImplicitThis": false, + "allowJs": true, + "skipLibCheck": true, + "downlevelIteration": true + }, + "include": ["src"], + "exclude": [ + "dist", + "src/**/__tests__", + "src/**/__mocks__", + "src/**/__fixtures__", + "node_modules" + ] + } \ No newline at end of file diff --git a/tsconfig.spec.json b/tsconfig.spec.json new file mode 100644 index 0000000..450a5e4 --- /dev/null +++ b/tsconfig.spec.json @@ -0,0 +1,5 @@ +{ + "extends": "./tsconfig.json", + "include": ["src"], + "exclude": ["node_modules"] + } \ No newline at end of file