init
This commit is contained in:
		
							
								
								
									
										25
									
								
								bun.config.mjs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								bun.config.mjs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,25 @@
 | 
			
		||||
// @ts-check
 | 
			
		||||
// https://bun.sh/docs/bundler
 | 
			
		||||
// @ts-ignore
 | 
			
		||||
import { resolvePath } from '@kevisual/use-config/env';
 | 
			
		||||
import pkg from './package.json';
 | 
			
		||||
import { execSync } from 'node:child_process';
 | 
			
		||||
 | 
			
		||||
// bun run src/index.ts --
 | 
			
		||||
await Bun.build({
 | 
			
		||||
  target: 'node',
 | 
			
		||||
  format: 'esm',
 | 
			
		||||
  entrypoints: [resolvePath('./src/provider/index.ts')],
 | 
			
		||||
  outdir: resolvePath('./dist'),
 | 
			
		||||
  naming: {
 | 
			
		||||
    entry: 'ai-provider.js',
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  define: {
 | 
			
		||||
    ENVISION_VERSION: JSON.stringify(pkg.version),
 | 
			
		||||
  },
 | 
			
		||||
  env: 'ENVISION_*',
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
const cmd = 'dts -i src/provider/index.ts -o ai-provider.d.ts';
 | 
			
		||||
execSync(cmd, { stdio: 'inherit' });
 | 
			
		||||
		Reference in New Issue
	
	Block a user