init base module
This commit is contained in:
		
							
								
								
									
										6
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,6 @@
 | 
			
		||||
node_modules
 | 
			
		||||
.env*
 | 
			
		||||
!.env.example
 | 
			
		||||
dist
 | 
			
		||||
 | 
			
		||||
.DS_Store
 | 
			
		||||
							
								
								
									
										2
									
								
								.npmrc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								.npmrc
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,2 @@
 | 
			
		||||
//npm.xiongxiao.me/:_authToken=${ME_NPM_TOKEN}
 | 
			
		||||
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
 | 
			
		||||
							
								
								
									
										26
									
								
								package.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								package.json
									
									
									
									
									
										Normal 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
									
								
							
							
						
						
									
										1233
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										1
									
								
								src/app.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								src/app.ts
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
export const a = { a: 1 };
 | 
			
		||||
							
								
								
									
										4
									
								
								src/index.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								src/index.ts
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
import { a } from '@/app.ts';
 | 
			
		||||
 | 
			
		||||
console.log('hello world');
 | 
			
		||||
console.log(a);
 | 
			
		||||
							
								
								
									
										28
									
								
								tsconfig.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								tsconfig.json
									
									
									
									
									
										Normal 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
									
								
							
							
						
						
									
										17
									
								
								tsup.config.ts
									
									
									
									
									
										Normal 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',
 | 
			
		||||
  },
 | 
			
		||||
  
 | 
			
		||||
});
 | 
			
		||||
		Reference in New Issue
	
	Block a user