mirror of
https://github.com/hanzoai/insights-js.git
synced 2026-11-03 00:53:53 +00:00
Bulk rename across 989 files: - Package names: posthog-js → @hanzo/insights, posthog-node → @hanzo/insights-node, etc. - Repository URLs: posthog/posthog-js → hanzoai/insights-js - Brand names: PostHog → Insights - File renames: 259 reference JSON files, source files, workflow files - Directory rename: eslint-plugin-posthog-js → eslint-plugin-insights Remaining: 8 refs to @posthog/rrweb-* (real npm deps, need fork+publish)
52 lines
1.3 KiB
Bash
Executable File
52 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
# Colors for output
|
|
GREEN='\033[0;32m'
|
|
BLUE='\033[0;34m'
|
|
YELLOW='\033[1;33m'
|
|
NC='\033[0m' # No Color
|
|
|
|
# Get the directory where this script is located
|
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
PLAYGROUND_DIR="$( cd "$SCRIPT_DIR/.." && pwd )"
|
|
REPO_ROOT="$( cd "$PLAYGROUND_DIR/../.." && pwd )"
|
|
|
|
echo -e "${BLUE}🚀 Insights JS Remix Playground Local Development Setup${NC}"
|
|
echo ""
|
|
|
|
# Step 1: Build packages
|
|
echo -e "${GREEN}1. Building packages...${NC}"
|
|
cd "$REPO_ROOT"
|
|
pnpm build
|
|
|
|
# Step 2: Package into tarballs
|
|
echo ""
|
|
echo -e "${GREEN}2. Creating tarballs...${NC}"
|
|
pnpm package
|
|
|
|
# Step 3: Ensure .pnpmfile.cjs symlink exists
|
|
echo ""
|
|
echo -e "${GREEN}3. Setting up .pnpmfile.cjs symlink...${NC}"
|
|
cd "$PLAYGROUND_DIR"
|
|
if [ ! -e .pnpmfile.cjs ]; then
|
|
ln -s ../.pnpmfile.cjs .pnpmfile.cjs
|
|
echo "Created symlink to .pnpmfile.cjs"
|
|
fi
|
|
|
|
# Step 4: Install dependencies in playground
|
|
echo ""
|
|
echo -e "${GREEN}4. Installing playground dependencies...${NC}"
|
|
rm -rf node_modules pnpm-lock.yaml
|
|
pnpm install
|
|
|
|
# Step 5: Run dev server
|
|
echo ""
|
|
echo -e "${GREEN}5. Starting dev server...${NC}"
|
|
echo -e "${YELLOW}Tip: Open localhost:5173?__insights_debug=true to see debug logs${NC}"
|
|
echo ""
|
|
|
|
# Pass through all environment variables and run dev
|
|
pnpm dev
|