feat: test publish and unpublish

This commit is contained in:
熊潇 2024-08-14 16:28:37 +08:00
commit f4a50031f6
10 changed files with 110 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
node_modules

0
.npmrc Normal file
View File

1
dist/index.d.ts vendored Normal file
View File

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

4
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;

22
package-lock.json generated Normal file
View File

@ -0,0 +1,22 @@
{
"name": "test-publish",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "test-publish",
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"lodash": "^4.17.21"
}
},
"node_modules/lodash": {
"version": "4.17.21",
"resolved": "https://npm.xiongxiao.me/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"license": "MIT"
}
}
}

23
package.json Normal file
View File

@ -0,0 +1,23 @@
{
"name": "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://npm.xiongxiao.me/"
},
"files": [
"dist"
],
"keywords": [],
"author": "abearxiong",
"license": "ISC",
"packageManager": "pnpm@7.21.0+sha256.55c2246a81d433295fb0c701a349b3254de95348976f02e5acef031fc1045111",
"dependencies": {
"lodash": "^4.17.21"
}
}

13
pnpm-lock.yaml generated Normal file
View File

@ -0,0 +1,13 @@
lockfileVersion: 5.4
specifiers:
lodash: ^4.17.21
dependencies:
lodash: 4.17.21
packages:
/lodash/4.17.21:
resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==}
dev: false

4
readme.md Normal file
View File

@ -0,0 +1,4 @@
```
npm adduser --registry https://npm.xiongxiao.me/
npm publish --registry https://npm.xiongxiao.me/
```

1
src/index.ts Normal file
View File

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

41
tsconfig.json Normal file
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",
],
}