change dist to source

This commit is contained in:
LittleBoy 2025-04-18 11:26:33 +08:00
parent 73441fc007
commit 071f278292
3 changed files with 2 additions and 52 deletions

36
dist/index.cjs vendored
View File

@ -1,36 +0,0 @@
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// libs/index.ts
var index_exports = {};
__export(index_exports, {
formatMoney: () => formatMoney,
helloWorld: () => helloWorld
});
module.exports = __toCommonJS(index_exports);
function helloWorld() {
console.log("Hello World!");
}
function formatMoney(amount) {
return new Intl.NumberFormat("en-US", { style: "decimal", minimumFractionDigits: 2, maximumFractionDigits: 2 }).format(amount);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
formatMoney,
helloWorld
});

13
dist/index.d.cts vendored
View File

@ -1,13 +0,0 @@
declare function helloWorld(): void;
/**
*
* ,
* @param amount -
* @returns 2
* @example
* formatMoney(1234.5) // 返回 "1,234.50"
* formatMoney(1000000) // 返回 "1,000,000.00"
*/
declare function formatMoney(amount: number): string;
export { formatMoney, helloWorld };

View File

@ -4,11 +4,10 @@
"type": "module",
"license": "MIT",
"author": "callmeyan <me@xiaoyan.me>",
"main": "dist/index.cjs",
"types": "dist/index.d.cts",
"main": "libs/index.ts",
"repository": {
"type": "git",
"url": "git://git.wm-app.xyz/packages/npm-package-demo.git"
"url": "git+https://git.wm-app.xyz/packages/npm-package-demo.git"
},
"keywords": [
"packages",