Description
Ensure CI verifies that components/ remains independently importable - it must not import anything from the parent lvt module. This is created in Issue 4.1 but should be enhanced here.
Depends on: #4.1
Tasks
Acceptance Criteria
- CI prevents lvt imports in components
- Separate test module can import and use components
- Clear documentation for external users
- Badge in README showing independence status
Files to Modify
# .github/workflows/ci.yml (add job)
components-independence:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check for lvt imports
run: |
cd components
if grep -r '"github.com/livetemplate/lvt"' --include="*.go" .; then
echo "ERROR: components must not import lvt"
exit 1
fi
- name: Build standalone
run: cd components && go build ./...
- name: Test standalone
run: cd components && go test ./...
- name: Test external import
run: |
mkdir -p /tmp/test-import
cd /tmp/test-import
go mod init test-import
echo 'package main
import "github.com/livetemplate/lvt/components/modal"
func main() { _ = modal.New("test") }' > main.go
go mod tidy
go build .
Description
Ensure CI verifies that
components/remains independently importable - it must not import anything from the parent lvt module. This is created in Issue 4.1 but should be enhanced here.Depends on: #4.1
Tasks
Acceptance Criteria
Files to Modify