test: test publiash npm

This commit is contained in:
熊潇 2024-08-15 15:03:11 +08:00
parent f4a50031f6
commit 5d7ddb9421
6 changed files with 74 additions and 0 deletions

1
test-npm-publish/dist/index.d.ts vendored Normal file
View File

@ -0,0 +1 @@
export declare const a = 1;

4
test-npm-publish/dist/index.js vendored Normal file
View File

@ -0,0 +1,4 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.a = void 0;
exports.a = 1;

View File

@ -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"
}
}

View File

@ -0,0 +1 @@
test publish to registry.npmjs.org

View File

@ -0,0 +1 @@
export const a = 1;

View File

@ -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",
],
}