- Static compiler with STRC pattern (Static Template Resolution with
Compartmentalized Layers)
- Template syntax: { } interpolation, { s-for }, { s-if/s-elif/s-else
}
- File types: .strata, .compiler.sts, .service.sts, .api.sts, .sts,
.scss
- CLI tools: strata-compile dev, strata-compile build, strata-compile
g (generators)
- create-strata-compile scaffolding CLI with Pokemon API example
- Dev server with WebSocket HMR (Hot Module Replacement)
- Documentation: README, ARCHITECTURE, CHANGELOG, CONTRIBUTING,
LICENSE
65 lines
1.5 KiB
Bash
Executable File
65 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
echo ""
|
|
echo " ╔═══════════════════════════════════════╗"
|
|
echo " ║ Strata Framework Setup ║"
|
|
echo " ╚═══════════════════════════════════════╝"
|
|
echo ""
|
|
|
|
# Check for Go
|
|
if ! command -v go &> /dev/null; then
|
|
echo " ❌ Go is not installed."
|
|
echo " Install from: https://go.dev/dl/"
|
|
exit 1
|
|
fi
|
|
echo " ✓ Go $(go version | cut -d' ' -f3)"
|
|
|
|
# Check for Node
|
|
if ! command -v node &> /dev/null; then
|
|
echo " ❌ Node.js is not installed."
|
|
echo " Install from: https://nodejs.org/"
|
|
exit 1
|
|
fi
|
|
echo " ✓ Node $(node -v)"
|
|
|
|
# Check for npm
|
|
if ! command -v npm &> /dev/null; then
|
|
echo " ❌ npm is not installed."
|
|
exit 1
|
|
fi
|
|
echo " ✓ npm $(npm -v)"
|
|
|
|
echo ""
|
|
echo " Installing Go dependencies..."
|
|
cd compiler
|
|
go mod download
|
|
cd ..
|
|
|
|
echo ""
|
|
echo " Building compiler..."
|
|
mkdir -p bin
|
|
cd compiler
|
|
go build -o ../bin/strata ./cmd/strata
|
|
cd ..
|
|
|
|
echo ""
|
|
echo " ✓ Compiler built: ./bin/strata"
|
|
|
|
echo ""
|
|
echo " Installing npm dependencies..."
|
|
npm install --silent
|
|
|
|
echo ""
|
|
echo " ════════════════════════════════════════"
|
|
echo " ✓ Setup complete!"
|
|
echo ""
|
|
echo " Quick start:"
|
|
echo " cd examples/basic-app"
|
|
echo " ../../bin/strata-compile dev"
|
|
echo ""
|
|
echo " Or use make:"
|
|
echo " make dev"
|
|
echo ""
|