docs: customize
parent
272678529f
commit
d52f779b9b
@ -0,0 +1,46 @@
|
||||
# Source files
|
||||
src/
|
||||
!dist/
|
||||
|
||||
# Development files
|
||||
.git/
|
||||
.github/
|
||||
.vscode/
|
||||
node_modules/
|
||||
|
||||
# Config files
|
||||
vite.config.ts
|
||||
vite.config.lib.ts
|
||||
tsconfig.json
|
||||
tsconfig.node.json
|
||||
.gitignore
|
||||
|
||||
# Example and demo files
|
||||
src/examples/
|
||||
src/App.tsx
|
||||
src/App.module.scss
|
||||
src/main.tsx
|
||||
src/index.css
|
||||
public/
|
||||
index.html
|
||||
|
||||
# Documentation
|
||||
README.md
|
||||
*.log
|
||||
|
||||
# Build files
|
||||
.DS_Store
|
||||
*.local
|
||||
|
||||
# Docker files
|
||||
Dockerfile
|
||||
docker-compose.yml
|
||||
.dockerignore
|
||||
.env*
|
||||
|
||||
# CI/CD files
|
||||
.drone.yml
|
||||
.deploy.yml
|
||||
|
||||
# Keep the npm README
|
||||
!README-npm.md
|
||||
@ -0,0 +1,23 @@
|
||||
// Components
|
||||
export { Year } from './components/calendar/Year';
|
||||
export { Month } from './components/calendar/Month';
|
||||
export { Week } from './components/calendar/Week';
|
||||
export { DateRange } from './components/calendar/DateRange';
|
||||
export { Day } from './components/calendar/Day';
|
||||
|
||||
// Types
|
||||
export type {
|
||||
DateRange as DateRangeType,
|
||||
HeaderStyle,
|
||||
MonthCutoffType,
|
||||
DirectionType,
|
||||
DayVariation,
|
||||
DaySize,
|
||||
YearProps,
|
||||
MonthProps,
|
||||
WeekProps,
|
||||
DayProps
|
||||
} from './types/calendar';
|
||||
|
||||
// Utilities (if needed by consumers)
|
||||
export { getDateVariations } from './utils/dateUtils';
|
||||
@ -0,0 +1,33 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
build: {
|
||||
lib: {
|
||||
entry: fileURLToPath(new URL('./src/index.ts', import.meta.url)),
|
||||
name: 'ReactCalendario',
|
||||
formats: ['es', 'umd'],
|
||||
fileName: (format) => `index.${format}.js`
|
||||
},
|
||||
rollupOptions: {
|
||||
external: ['react', 'react-dom', 'react/jsx-runtime'],
|
||||
output: {
|
||||
globals: {
|
||||
react: 'React',
|
||||
'react-dom': 'ReactDOM',
|
||||
'react/jsx-runtime': 'react/jsx-runtime'
|
||||
}
|
||||
}
|
||||
},
|
||||
outDir: 'dist',
|
||||
sourcemap: true,
|
||||
emptyOutDir: true
|
||||
},
|
||||
css: {
|
||||
modules: {
|
||||
generateScopedName: 'rc_[local]_[hash:base64:5]'
|
||||
}
|
||||
}
|
||||
});
|
||||
Loading…
Reference in New Issue