init base module

This commit is contained in:
熊潇 2025-03-30 20:35:55 +08:00
commit 05507ec1a8
9 changed files with 1318 additions and 0 deletions

6
.gitignore vendored Normal file
View File

@ -0,0 +1,6 @@
node_modules
.env*
!.env.example
dist
.DS_Store

2
.npmrc Normal file
View File

@ -0,0 +1,2 @@
//npm.xiongxiao.me/:_authToken=${ME_NPM_TOKEN}
//registry.npmjs.org/:_authToken=${NPM_TOKEN}

1
README.md Normal file
View File

@ -0,0 +1 @@
lib tempalte模块

26
package.json Normal file
View File

@ -0,0 +1,26 @@
{
"name": "lib-template",
"version": "0.0.1",
"description": "",
"main": "index.js",
"scripts": {
"build": "tsup",
"watch": "tsup --watch",
"dev": "tsup --watch",
"dev:lib": "pnpm run dev"
},
"keywords": [],
"author": "abearxiong <xiongxiao@xiongxiao.me> (https://www.xiongxiao.me)",
"license": "MIT",
"packageManager": "pnpm@10.6.2",
"type": "module",
"publishConfig": {
"access": "public"
},
"devDependencies": {
"@swc/core": "^1.11.13",
"@types/node": "^22.13.14",
"tsup": "^8.4.0",
"typescript": "^5.8.2"
}
}

1233
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

1
src/app.ts Normal file
View File

@ -0,0 +1 @@
export const a = { a: 1 };

4
src/index.ts Normal file
View File

@ -0,0 +1,4 @@
import { a } from '@/app.ts';
console.log('hello world');
console.log(a);

28
tsconfig.json Normal file
View File

@ -0,0 +1,28 @@
{
"compilerOptions": {
"module": "nodenext",
"target": "esnext",
"noImplicitAny": false,
"outDir": "./dist",
"sourceMap": false,
"allowJs": true,
"newLine": "LF",
"baseUrl": "./",
"typeRoots": [
"node_modules/@types",
],
"declaration": true,
"noEmit": false,
"allowImportingTsExtensions": true,
"emitDeclarationOnly": true,
"moduleResolution": "NodeNext",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"esModuleInterop": true,
"paths": {
"@/*": [
"src/*"
]
}
},
}

17
tsup.config.ts Normal file
View File

@ -0,0 +1,17 @@
import { defineConfig } from 'tsup';
export default defineConfig({
entry: ['src/index.ts'],
splitting: false,
sourcemap: false,
clean: true,
format: 'esm',
dts: true,
outDir: 'dist',
tsconfig: 'tsconfig.json',
define: {
IS_BROWSER: 'false',
},
});