mirror of
https://github.com/luxfi/consensus.git
synced 2026-09-24 00:26:58 +00:00
BREAKING CHANGE: Package paths have been reorganized for clarity ## Major Changes ### Package Structure - Collapsed engine/core → engine (removed unnecessary nesting) - Moved core/types → types (top-level types package) - Added root facade for single-import experience - Removed redundant factory.go ### SDK Improvements All SDKs now provide single-import interfaces: - Go: import "github.com/luxfi/consensus" - Python: import lux_consensus as consensus - Rust: use lux_consensus::* ### Documentation - Added comprehensive introduction and architecture docs - Created AI/ML integration guide for researchers - Added research section with papers and experiments - Improved sidebar organization and discoverability ### Benefits - Shallow, obvious import paths - One responsibility per package - DRY, composable, orthogonal design - Idiomatic patterns for each language - Consistent API across all SDKs This refactor provides a clean, intuitive developer experience where one import is enough and things work one way only.
44 lines
952 B
Bash
Executable File
44 lines
952 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
echo "🏗️ Building Lux Consensus Documentation..."
|
|
|
|
# Colors for output
|
|
GREEN='\033[0;32m'
|
|
BLUE='\033[0;34m'
|
|
NC='\033[0m' # No Color
|
|
|
|
# Navigate to docs directory
|
|
cd "$(dirname "$0")/../docs"
|
|
|
|
echo -e "${BLUE}📦 Installing dependencies...${NC}"
|
|
if command -v pnpm &> /dev/null; then
|
|
pnpm install
|
|
else
|
|
npm install
|
|
fi
|
|
|
|
echo -e "${BLUE}🔨 Building site...${NC}"
|
|
if command -v pnpm &> /dev/null; then
|
|
pnpm build
|
|
else
|
|
npm run build
|
|
fi
|
|
|
|
echo -e "${BLUE}📤 Exporting static site...${NC}"
|
|
if command -v pnpm &> /dev/null; then
|
|
pnpm export
|
|
else
|
|
npm run export
|
|
fi
|
|
|
|
echo -e "${GREEN}✅ Documentation built successfully!${NC}"
|
|
echo -e "${GREEN}📁 Output directory: docs/out${NC}"
|
|
|
|
# Optional: Start preview server
|
|
read -p "Start preview server? (y/n) " -n 1 -r
|
|
echo
|
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
|
echo -e "${BLUE}🌐 Starting preview server on http://localhost:3001${NC}"
|
|
npx serve out -p 3001
|
|
fi |