From 5d7ddb9421335470b995ae1ceac419433612483b Mon Sep 17 00:00:00 2001 From: abearxiong Date: Thu, 15 Aug 2024 15:03:11 +0800 Subject: [PATCH] test: test publiash npm --- test-npm-publish/dist/index.d.ts | 1 + test-npm-publish/dist/index.js | 4 ++++ test-npm-publish/package.json | 26 ++++++++++++++++++++ test-npm-publish/readme.md | 1 + test-npm-publish/src/index.ts | 1 + test-npm-publish/tsconfig.json | 41 ++++++++++++++++++++++++++++++++ 6 files changed, 74 insertions(+) create mode 100644 test-npm-publish/dist/index.d.ts create mode 100644 test-npm-publish/dist/index.js create mode 100644 test-npm-publish/package.json create mode 100644 test-npm-publish/readme.md create mode 100644 test-npm-publish/src/index.ts create mode 100644 test-npm-publish/tsconfig.json diff --git a/test-npm-publish/dist/index.d.ts b/test-npm-publish/dist/index.d.ts new file mode 100644 index 0000000..52c4639 --- /dev/null +++ b/test-npm-publish/dist/index.d.ts @@ -0,0 +1 @@ +export declare const a = 1; diff --git a/test-npm-publish/dist/index.js b/test-npm-publish/dist/index.js new file mode 100644 index 0000000..b42b786 --- /dev/null +++ b/test-npm-publish/dist/index.js @@ -0,0 +1,4 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 1; diff --git a/test-npm-publish/package.json b/test-npm-publish/package.json new file mode 100644 index 0000000..eaf5a8f --- /dev/null +++ b/test-npm-publish/package.json @@ -0,0 +1,26 @@ +{ + "name": "@abear/test-publish", + "version": "1.0.0", + "description": "", + "private": false, + "main": "dist/index.js", + "typings": "dist/index.d.ts", + "scripts": { + "build": "tsc", + "prepublish": "npm run build", + "spublish": "npm publish --registry https://registry.npmjs.org/" + }, + "files": [ + "dist" + ], + "keywords": [], + "author": "abearxiong", + "license": "ISC", + "packageManager": "pnpm@7.21.0+sha256.55c2246a81d433295fb0c701a349b3254de95348976f02e5acef031fc1045111", + "dependencies": { + "lodash": "^4.17.21" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/test-npm-publish/readme.md b/test-npm-publish/readme.md new file mode 100644 index 0000000..ebc082b --- /dev/null +++ b/test-npm-publish/readme.md @@ -0,0 +1 @@ +test publish to registry.npmjs.org \ No newline at end of file diff --git a/test-npm-publish/src/index.ts b/test-npm-publish/src/index.ts new file mode 100644 index 0000000..cc798ff --- /dev/null +++ b/test-npm-publish/src/index.ts @@ -0,0 +1 @@ +export const a = 1; diff --git a/test-npm-publish/tsconfig.json b/test-npm-publish/tsconfig.json new file mode 100644 index 0000000..cff196e --- /dev/null +++ b/test-npm-publish/tsconfig.json @@ -0,0 +1,41 @@ +{ + "compilerOptions": { + "module": "NodeNext", + "target": "esnext", + "noImplicitAny": false, + "outDir": "./dist", + "sourceMap": false, + "allowJs": true, + "newLine": "LF", + "baseUrl": "./", + "typeRoots": [ + "node_modules/@types", + "src/@types" + ], + "declaration": true, + "noEmit": false, + // "allowImportingTsExtensions": true, + "moduleResolution": "NodeNext", + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "esModuleInterop": true, + "paths": { + "@/*": [ + "src/*" + ], + "*": [ + "types/*" + ] + } + }, + "include": [ + "typings.d.ts", + "src/**/*.ts" + ], + "exclude": [ + "node_modules", + "dist", + "src/**/*.test.ts", + "webpack.config.cjs", + ], +} \ No newline at end of file