zeabur 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.html ADDED
@@ -0,0 +1,13 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>Vite + TS</title>
8
+ </head>
9
+ <body>
10
+ <div id="app"></div>
11
+ <script type="module" src="/src/main.ts"></script>
12
+ </body>
13
+ </html>
package/package.json ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "zeabur",
3
+ "private": false,
4
+ "version": "0.0.0",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "author": "MichaelYuhe",
8
+ "scripts": {
9
+ "dev": "vite",
10
+ "build": "tsc && vite build",
11
+ "preview": "vite preview"
12
+ },
13
+ "devDependencies": {
14
+ "typescript": "^5.2.2",
15
+ "vite": "^5.0.8"
16
+ }
17
+ }
package/src/index.ts ADDED
@@ -0,0 +1,3 @@
1
+ export function deploy() {
2
+ return 'deploy'
3
+ }
@@ -0,0 +1 @@
1
+ /// <reference types="vite/client" />
package/tsconfig.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "useDefineForClassFields": true,
5
+ "module": "ESNext",
6
+ "lib": ["ES2020", "DOM", "DOM.Iterable"],
7
+ "skipLibCheck": true,
8
+
9
+ /* Bundler mode */
10
+ "moduleResolution": "bundler",
11
+ "allowImportingTsExtensions": true,
12
+ "resolveJsonModule": true,
13
+ "isolatedModules": true,
14
+ "noEmit": true,
15
+
16
+ /* Linting */
17
+ "strict": true,
18
+ "noUnusedLocals": true,
19
+ "noUnusedParameters": true,
20
+ "noFallthroughCasesInSwitch": true
21
+ },
22
+ "include": ["src"]
23
+ }
package/vite.config.ts ADDED
@@ -0,0 +1,21 @@
1
+ import { defineConfig } from 'vite'
2
+
3
+ export default defineConfig({
4
+ build: {
5
+ lib: {
6
+ entry: 'src/index.ts',
7
+ name: 'MyNpmPackage',
8
+ fileName: (format) => `zeabur.${format}.js`
9
+ },
10
+ rollupOptions: {
11
+ // 确保外部化处理那些你不想打包进库的依赖
12
+ external: ['vue'],
13
+ output: {
14
+ // 在 UMD 构建模式下为这些外部化的依赖提供一个全局变量
15
+ globals: {
16
+ vue: 'Vue',
17
+ },
18
+ },
19
+ },
20
+ },
21
+ })