From 119e9d6429220fe13ce99fe140fd94dac24044d4 Mon Sep 17 00:00:00 2001 From: yoshinorin Date: Sun, 6 Mar 2022 21:14:07 +0900 Subject: [PATCH 1/2] chore: update package.json for publish typescript --- package.json | 9 ++++----- tsconfig.json | 1 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 3466932..af4212d 100644 --- a/package.json +++ b/package.json @@ -2,18 +2,17 @@ "name": "hexo-fs", "version": "3.1.0", "description": "File system module for Hexo.", - "main": "lib/fs.js", + "main": "./dist/fs.js", "scripts": { + "prepublish ": "npm run clean && npm run build", "build": "tsc -b", + "clean": "tsc -b --clean", "eslint": "eslint .", "test": "mocha test/index.js --require ts-node/register", "test-cov": "nyc --reporter=lcovonly npm run test" }, - "directories": { - "lib": "./lib" - }, "files": [ - "lib/fs.js" + "dist/**" ], "repository": "hexojs/hexo-fs", "homepage": "https://hexo.io/", diff --git a/tsconfig.json b/tsconfig.json index 768b0f9..bfb25bd 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,6 +4,7 @@ "target": "es6", "sourceMap": true, "outDir": "dist", + "declaration": true, "esModuleInterop": true, "types": [ "node" From 0341a02d80f2b3e9e8c76a2f3957c570259b4068 Mon Sep 17 00:00:00 2001 From: yoshinorin Date: Fri, 11 Mar 2022 20:41:03 +0900 Subject: [PATCH 2/2] chroe: add types in the package.json --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index af4212d..4415fac 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "files": [ "dist/**" ], + "types": "./dist/fs.d.ts", "repository": "hexojs/hexo-fs", "homepage": "https://hexo.io/", "keywords": [