- Add detailed README.md with project overview, architecture, and usage examples - Add comprehensive JSDoc documentation to all system files (Controls, Loop, Renderer, Resizer) - Add detailed documentation to component files (Terrain, Landmarks, WorldComponent) - Create CONTRIBUTING.md with development guidelines and coding standards - Create CHANGELOG.md with version history and development timeline - Create SECURITY.md with security policies and vulnerability reporting - Create API.md with comprehensive API documentation and usage examples - Update package.json with better metadata, scripts, and project information - Enhance TypeScript configuration with path aliases and strict settings - Improve Vite configuration with build optimizations and development settings - Update .gitignore with comprehensive patterns for development tools - Add file headers with author information and creation dates from git history This commit transforms the project from a basic template to a well-documented, production-ready World Component library with comprehensive documentation following best practices for open-source projects. Author: Matthew Raymer Security: All dependencies updated, comprehensive security guidelines added Performance: Build optimizations, code splitting, and memory management documented
62 lines
1.3 KiB
TypeScript
62 lines
1.3 KiB
TypeScript
/**
|
|
* Vite Configuration
|
|
*
|
|
* Build tool configuration for the World Component project.
|
|
* Provides development server, build optimization, and path aliases.
|
|
*
|
|
* @file vite.config.ts
|
|
* @author Matthew Raymer
|
|
* @created 2023-06-28
|
|
* @version 1.0.0
|
|
*/
|
|
|
|
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import { resolve } from 'path'
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [vue()],
|
|
|
|
// Path aliases for cleaner imports
|
|
resolve: {
|
|
alias: {
|
|
'@': resolve(__dirname, 'src'),
|
|
'@/components': resolve(__dirname, 'src/components'),
|
|
'@/systems': resolve(__dirname, 'src/systems'),
|
|
'@/types': resolve(__dirname, 'src/types'),
|
|
'@/assets': resolve(__dirname, 'src/assets')
|
|
}
|
|
},
|
|
|
|
// Build configuration
|
|
build: {
|
|
target: 'es2020',
|
|
outDir: 'dist',
|
|
assetsDir: 'assets',
|
|
sourcemap: true,
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
'three': ['three'],
|
|
'vue': ['vue'],
|
|
'vendor': ['axios', 'ramda']
|
|
}
|
|
}
|
|
}
|
|
},
|
|
|
|
// Development server configuration
|
|
server: {
|
|
port: 3000,
|
|
open: true,
|
|
host: true
|
|
},
|
|
|
|
// Preview server configuration
|
|
preview: {
|
|
port: 4173,
|
|
open: true
|
|
}
|
|
})
|