From a63a758cc5bb99f1e52b7669635bf825f9c0080b Mon Sep 17 00:00:00 2001 From: Carlos Gutierrez Date: Fri, 16 Jan 2026 09:13:14 -0500 Subject: [PATCH] feat: initial release of Strata framework v0.1.0 - 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 --- ARCHITECTURE.md | 2 +- CHANGELOG.md | 18 ++--- CONTRIBUTING.md | 2 +- Makefile | 48 ++++++------- README.md | 30 ++++---- cli/create-strata/index.js | 48 ++++++------- cli/create-strata/package.json | 7 +- compiler/cmd/strata/build.go | 4 +- compiler/cmd/strata/dev.go | 4 +- compiler/cmd/strata/main.go | 2 +- compiler/go.mod | 2 +- compiler/internal/compiler/static.go | 4 +- compiler/internal/parser/strata.go | 2 +- compiler/internal/server/dev.go | 6 +- examples/basic-app/package.json | 10 ++- scripts/env.sh | 12 ++-- scripts/get-strata.sh | 14 ++-- scripts/install.sh | 104 +++++++++++++-------------- scripts/setup.sh | 2 +- 19 files changed, 160 insertions(+), 161 deletions(-) diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 9932a47..55c0ebf 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -585,7 +585,7 @@ VIOLATION = BUILD ERROR ``` ┌─────────────────────────────────────────────────────────────────────┐ -│ strata dev │ +│ strata-compile dev │ ├─────────────────────────────────────────────────────────────────────┤ │ │ │ ┌───────────────┐ │ diff --git a/CHANGELOG.md b/CHANGELOG.md index 097971c..a15cb7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,16 +58,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `.scss` - Component/page styles #### CLI Tools -- `strata dev` - Development server with Hot Module Replacement (HMR) -- `strata build` - Production build -- `strata preview` - Preview production build +- `strata-compile dev` - Development server with Hot Module Replacement (HMR) +- `strata-compile build` - Production build +- `strata-compile preview` - Preview production build - Generator commands: - - `strata g component ` - - `strata g page ` - - `strata g service ` - - `strata g api ` - - `strata g util ` - - `strata g store ` + - `strata-compile gcomponent ` + - `strata-compile gpage ` + - `strata-compile gservice ` + - `strata-compile gapi ` + - `strata-compile gutil ` + - `strata-compile gstore ` #### Project Scaffolding - `create-strata` CLI tool diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 919ba11..f57b21d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -90,7 +90,7 @@ A one-line description of the bug. - **Strata version**: 0.1.0 ### Steps to Reproduce -1. Create a new project with `npx create-strata my-app` +1. Create a new project with `npx create-strata-compile my-app` 2. Add a for loop in `index.strata` 3. Run `npm run dev` 4. Observe the error diff --git a/Makefile b/Makefile index bebe24c..4733636 100644 --- a/Makefile +++ b/Makefile @@ -11,15 +11,15 @@ build: @echo "Building Strata compiler..." @mkdir -p bin - @cd compiler && go mod tidy && go build -ldflags="-s -w" -o ../bin/strata ./cmd/strata - @echo "Done! Binary at ./bin/strata" + @cd compiler && go mod tidy && go build -ldflags="-s -w" -o ../bin/strata-compile ./cmd/strata + @echo "Done! Binary at ./bin/strata-compile" # Build with race detector (for development) build-debug: @echo "Building Strata compiler (debug)..." @mkdir -p bin - @cd compiler && go build -race -o ../bin/strata-debug ./cmd/strata - @echo "Done! Binary at ./bin/strata-debug" + @cd compiler && go build -race -o ../bin/strata-compile-debug ./cmd/strata + @echo "Done! Binary at ./bin/strata-compile-debug" # ============================================================================ # INSTALLATION @@ -46,27 +46,27 @@ setup: build @npm install --silent @echo "" @echo "Strata setup complete!" - @echo " Binary: ./bin/strata" + @echo " Binary: ./bin/strata-compile" @echo "" @echo "Run 'make install' for full installation with shell config." # Link binary to /usr/local/bin (quick global access) link: build - @echo "Linking strata to /usr/local/bin..." + @echo "Linking strata-compile to /usr/local/bin..." @if [ -w /usr/local/bin ]; then \ - ln -sf "$(PWD)/bin/strata" /usr/local/bin/strata; \ + ln -sf "$(PWD)/bin/strata-compile" /usr/local/bin/strata-compile; \ else \ - sudo ln -sf "$(PWD)/bin/strata" /usr/local/bin/strata; \ + sudo ln -sf "$(PWD)/bin/strata-compile" /usr/local/bin/strata-compile; \ fi - @echo "Done! 'strata' command is now available globally." + @echo "Done! 'strata-compile' command is now available globally." # Unlink from /usr/local/bin unlink: - @echo "Unlinking strata from /usr/local/bin..." + @echo "Unlinking strata-compile from /usr/local/bin..." @if [ -w /usr/local/bin ]; then \ - rm -f /usr/local/bin/strata; \ + rm -f /usr/local/bin/strata-compile; \ else \ - sudo rm -f /usr/local/bin/strata; \ + sudo rm -f /usr/local/bin/strata-compile; \ fi @echo "Done!" @@ -110,19 +110,19 @@ doctor-fix: # Run dev server on example app dev: build - @cd examples/basic-app && ../../bin/strata dev + @cd examples/basic-app && ../../bin/strata-compile dev # Run dev server with browser open dev-open: build - @cd examples/basic-app && ../../bin/strata dev --open + @cd examples/basic-app && ../../bin/strata-compile dev --open # Build example app for production example-build: build - @cd examples/basic-app && ../../bin/strata build + @cd examples/basic-app && ../../bin/strata-compile build # Preview example app production build example-preview: build - @cd examples/basic-app && ../../bin/strata preview + @cd examples/basic-app && ../../bin/strata-compile preview # Watch and rebuild compiler on changes watch: @@ -171,7 +171,7 @@ gen-component: build echo "Usage: make gen-component NAME=MyComponent"; \ exit 1; \ fi - @cd examples/basic-app && ../../bin/strata generate component $(NAME) + @cd examples/basic-app && ../../bin/strata-compile generate component $(NAME) # Generate page (usage: make gen-page NAME=about) gen-page: build @@ -179,7 +179,7 @@ gen-page: build echo "Usage: make gen-page NAME=about"; \ exit 1; \ fi - @cd examples/basic-app && ../../bin/strata generate page $(NAME) + @cd examples/basic-app && ../../bin/strata-compile generate page $(NAME) # Generate store (usage: make gen-store NAME=cart) gen-store: build @@ -187,7 +187,7 @@ gen-store: build echo "Usage: make gen-store NAME=cart"; \ exit 1; \ fi - @cd examples/basic-app && ../../bin/strata generate store $(NAME) + @cd examples/basic-app && ../../bin/strata-compile generate store $(NAME) # Shorthand aliases c: gen-component @@ -223,11 +223,11 @@ clean-all: clean release: @echo "Building release binaries..." @mkdir -p dist/release - @cd compiler && GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -o ../dist/release/strata-darwin-amd64 ./cmd/strata - @cd compiler && GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w" -o ../dist/release/strata-darwin-arm64 ./cmd/strata - @cd compiler && GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o ../dist/release/strata-linux-amd64 ./cmd/strata - @cd compiler && GOOS=linux GOARCH=arm64 go build -ldflags="-s -w" -o ../dist/release/strata-linux-arm64 ./cmd/strata - @cd compiler && GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o ../dist/release/strata-windows-amd64.exe ./cmd/strata + @cd compiler && GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -o ../dist/release/strata-compile-darwin-amd64 ./cmd/strata + @cd compiler && GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w" -o ../dist/release/strata-compile-darwin-arm64 ./cmd/strata + @cd compiler && GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o ../dist/release/strata-compile-linux-amd64 ./cmd/strata + @cd compiler && GOOS=linux GOARCH=arm64 go build -ldflags="-s -w" -o ../dist/release/strata-compile-linux-arm64 ./cmd/strata + @cd compiler && GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o ../dist/release/strata-compile-windows-amd64.exe ./cmd/strata @echo "Release binaries built in dist/release/" # ============================================================================ diff --git a/README.md b/README.md index ab59504..80cee31 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,7 @@ This installs: ```bash # Create a new Strata project -npx create-strata my-app +npx create-strata-compile my-app # Navigate to project cd my-app @@ -156,13 +156,13 @@ Output is in the `dist/` folder - pure static HTML ready for any hosting. ```bash # Development server with HMR -strata dev [--port 3000] [--open] +strata-compile dev [--port 3000] [--open] # Production build -strata build [--output dist] +strata-compile build [--output dist] # Preview production build -strata preview [--port 4000] +strata-compile preview [--port 4000] ``` ### Generator Commands @@ -171,7 +171,7 @@ Generate new files with the correct structure: ```bash # Generate a component -strata g component Button +strata-compile gcomponent Button # Creates: src/components/Button/ # ├── Button.strata # ├── Button.compiler.sts @@ -179,7 +179,7 @@ strata g component Button # └── Button.scss # Generate a page -strata g page about +strata-compile gpage about # Creates: src/pages/about/ # ├── about.strata # ├── about.compiler.sts @@ -187,30 +187,30 @@ strata g page about # └── about.scss # Generate a service -strata g service auth +strata-compile gservice auth # Creates: src/services/auth.service.sts # Generate an API contract -strata g api users +strata-compile gapi users # Creates: src/api/users.api.sts # Generate a utility -strata g util format +strata-compile gutil format # Creates: src/utils/format.sts # Generate a store -strata g store cart +strata-compile gstore cart # Creates: src/stores/cart.store.sts ``` ### Shorthand Commands ```bash -strata g c Button # component -strata g p about # page -strata g s auth # service -strata g a users # api -strata g u format # util +strata-compile gc Button # component +strata-compile gp about # page +strata-compile gs auth # service +strata-compile ga users # api +strata-compile gu format # util ``` --- diff --git a/cli/create-strata/index.js b/cli/create-strata/index.js index d86968f..50d45d6 100644 --- a/cli/create-strata/index.js +++ b/cli/create-strata/index.js @@ -11,26 +11,26 @@ const template = templateArg ? templateArg.split('=')[1] : 'pokemon'; if (!projectName || projectName === '--help' || projectName === '-h') { console.log(` - create-strata - Create a new Strata project + create-strata-compile - Create a new Strata project Usage: - npx create-strata [options] + npx create-strata-compile [options] Options: --template= Use a specific template (default: pokemon) Available: pokemon, minimal Examples: - npx create-strata my-app - npx create-strata my-app --template=minimal + npx create-strata-compile my-app + npx create-strata-compile my-app --template=minimal CLI Generator Commands (after project creation): - strata g component Create component with all files - strata g page Create page with all files - strata g service Create service file - strata g api Create API contract file - strata g util Create utility file - strata g store Create store definition + strata-compile g component Create component with all files + strata-compile g page Create page with all files + strata-compile g service Create service file + strata-compile g api Create API contract file + strata-compile g util Create utility file + strata-compile g store Create store definition File Structure: .strata → Template (HTML structure only) @@ -93,9 +93,9 @@ const packageJson = { version: '0.1.0', private: true, scripts: { - dev: '~/.strata/bin/strata dev', - build: '~/.strata/bin/strata build', - preview: '~/.strata/bin/strata preview', + dev: '~/.strata/bin/strata-compile dev', + build: '~/.strata/bin/strata-compile build', + preview: '~/.strata/bin/strata-compile preview', }, devDependencies: { typescript: '^5.3.0', @@ -1041,12 +1041,12 @@ src/ ### Generate Components \`\`\`bash -strata g component UserCard # Create component -strata g page users # Create page -strata g service user # Create service -strata g api user # Create API contract -strata g util format # Create utility -strata g store user # Create store +strata-compile g component UserCard # Create component +strata-compile g page users # Create page +strata-compile g service user # Create service +strata-compile g api user # Create API contract +strata-compile g util format # Create utility +strata-compile g store user # Create store \`\`\` ## Template Syntax @@ -1114,11 +1114,11 @@ console.log(` npm run dev CLI generator commands: - strata g component - Create component - strata g page - Create page - strata g service - Create service - strata g api - Create API contract - strata g util - Create utility + strata-compile g component - Create component + strata-compile g page - Create page + strata-compile g service - Create service + strata-compile g api - Create API contract + strata-compile g util - Create utility Happy coding with Strata! `); diff --git a/cli/create-strata/package.json b/cli/create-strata/package.json index 3141d13..796b6bb 100644 --- a/cli/create-strata/package.json +++ b/cli/create-strata/package.json @@ -1,9 +1,9 @@ { - "name": "create-strata", + "name": "create-strata-compile", "version": "0.1.0", "description": "Create a new Strata project", "bin": { - "create-strata": "./index.js" + "create-strata-compile": "./index.js" }, "files": [ "index.js", @@ -14,10 +14,11 @@ }, "keywords": [ "strata", + "strata-compile", "create", "scaffold", "cli" ], - "author": "Strata Team", + "author": "Carlos Gutierrez (CarGDev)", "license": "MIT" } diff --git a/compiler/cmd/strata/build.go b/compiler/cmd/strata/build.go index 5e529dc..9863e98 100644 --- a/compiler/cmd/strata/build.go +++ b/compiler/cmd/strata/build.go @@ -6,7 +6,7 @@ import ( "os" "path/filepath" - "github.com/CarGDev/strata/internal/generator" + "github.com/CarGDev/strata-compile/internal/generator" ) func runBuild(analyze bool, watch bool) { @@ -89,7 +89,7 @@ func startPreviewServer(port int) { distDir := filepath.Join(cwd, "dist") if _, err := os.Stat(distDir); os.IsNotExist(err) { - log.Fatal("No build found. Run 'strata build' first.") + log.Fatal("No build found. Run 'strata-compile build' first.") } fmt.Printf("\n Preview server running at http://localhost:%d\n", port) diff --git a/compiler/cmd/strata/dev.go b/compiler/cmd/strata/dev.go index 9d09f54..00a84b5 100644 --- a/compiler/cmd/strata/dev.go +++ b/compiler/cmd/strata/dev.go @@ -8,8 +8,8 @@ import ( "path/filepath" "runtime" - "github.com/CarGDev/strata/internal/server" - "github.com/CarGDev/strata/internal/watcher" + "github.com/CarGDev/strata-compile/internal/server" + "github.com/CarGDev/strata-compile/internal/watcher" ) func startDevServer(port int, open bool) { diff --git a/compiler/cmd/strata/main.go b/compiler/cmd/strata/main.go index ae2c971..9d3a260 100644 --- a/compiler/cmd/strata/main.go +++ b/compiler/cmd/strata/main.go @@ -11,7 +11,7 @@ var version = "0.1.0" func main() { rootCmd := &cobra.Command{ - Use: "strata", + Use: "strata-compile", Short: "Strata - Static Template Rendering Architecture", Version: version, } diff --git a/compiler/go.mod b/compiler/go.mod index 2df4ebe..4895e25 100644 --- a/compiler/go.mod +++ b/compiler/go.mod @@ -1,4 +1,4 @@ -module github.com/CarGDev/strata +module github.com/CarGDev/strata-compile go 1.22 diff --git a/compiler/internal/compiler/static.go b/compiler/internal/compiler/static.go index 12b3fee..53eb673 100644 --- a/compiler/internal/compiler/static.go +++ b/compiler/internal/compiler/static.go @@ -11,8 +11,8 @@ import ( "strings" "time" - "github.com/CarGDev/strata/internal/ast" - "github.com/CarGDev/strata/internal/parser" + "github.com/CarGDev/strata-compile/internal/ast" + "github.com/CarGDev/strata-compile/internal/parser" ) // StaticCompiler compiles .strata files to pure HTML at build time diff --git a/compiler/internal/parser/strata.go b/compiler/internal/parser/strata.go index 3f014b4..053f867 100644 --- a/compiler/internal/parser/strata.go +++ b/compiler/internal/parser/strata.go @@ -4,7 +4,7 @@ import ( "regexp" "strings" - "github.com/CarGDev/strata/internal/ast" + "github.com/CarGDev/strata-compile/internal/ast" ) // StrataParser parses .strata files diff --git a/compiler/internal/server/dev.go b/compiler/internal/server/dev.go index efdc7a7..2d41d3f 100644 --- a/compiler/internal/server/dev.go +++ b/compiler/internal/server/dev.go @@ -11,9 +11,9 @@ import ( "sync" "time" - "github.com/CarGDev/strata/internal/ast" - "github.com/CarGDev/strata/internal/compiler" - "github.com/CarGDev/strata/internal/parser" + "github.com/CarGDev/strata-compile/internal/ast" + "github.com/CarGDev/strata-compile/internal/compiler" + "github.com/CarGDev/strata-compile/internal/parser" "github.com/gorilla/websocket" ) diff --git a/examples/basic-app/package.json b/examples/basic-app/package.json index 9af978e..331372e 100644 --- a/examples/basic-app/package.json +++ b/examples/basic-app/package.json @@ -3,13 +3,11 @@ "version": "0.1.0", "private": true, "scripts": { - "dev": "strata dev", - "build": "strata build", - "preview": "strata preview" - }, - "dependencies": { - "strata": "^0.1.0" + "dev": "strata-compile dev", + "build": "strata-compile build", + "preview": "strata-compile preview" }, + "dependencies": {}, "devDependencies": { "typescript": "^5.3.0" } diff --git a/scripts/env.sh b/scripts/env.sh index 6bf85d3..301a957 100755 --- a/scripts/env.sh +++ b/scripts/env.sh @@ -28,11 +28,11 @@ export STRATA_REPO="$REPO_DIR" export PATH="$REPO_DIR/bin:$PATH" # Set aliases -alias st='strata' -alias stdev='strata dev' -alias stbuild='strata build' -alias stgen='strata generate' -alias stnew='npx create-strata' +alias st='strata-compile' +alias stdev='strata-compile dev' +alias stbuild='strata-compile build' +alias stgen='strata-compile generate' +alias stnew='npx create-strata-compile' # Development aliases alias stmake='make -C "$STRATA_REPO"' @@ -47,7 +47,7 @@ strebuild() { # Function to run example app stexample() { - cd "$STRATA_REPO/examples/basic-app" && strata dev + cd "$STRATA_REPO/examples/basic-app" && strata-compile dev } echo "" diff --git a/scripts/get-strata.sh b/scripts/get-strata.sh index c6a480d..e7c6a2c 100755 --- a/scripts/get-strata.sh +++ b/scripts/get-strata.sh @@ -220,11 +220,11 @@ export STRATA_HOME="$HOME/.strata" export PATH="$STRATA_HOME/bin:$PATH" # Strata aliases -alias st='strata' -alias stdev='strata dev' -alias stbuild='strata build' -alias stgen='strata generate' -alias stnew='npx create-strata' +alias st='strata-compile' +alias stdev='strata-compile dev' +alias stbuild='strata-compile build' +alias stgen='strata-compile generate' +alias stnew='npx create-strata-compile' SHELL_CONFIG echo -e "${GREEN}✓${NC} Added to $shell_config" fi @@ -249,9 +249,9 @@ CONFIG echo -e " ${CYAN}source $shell_config${NC}" echo "" echo " Then create your first project:" - echo -e " ${CYAN}npx create-strata my-app${NC}" + echo -e " ${CYAN}npx create-strata-compile my-app${NC}" echo -e " ${CYAN}cd my-app${NC}" - echo -e " ${CYAN}strata dev${NC}" + echo -e " ${CYAN}strata-compile dev${NC}" echo "" echo " Documentation: https://stratajs.dev/docs" echo "" diff --git a/scripts/install.sh b/scripts/install.sh index df12c90..83808de 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -224,16 +224,16 @@ build_compiler() { # Build the compiler echo " Compiling..." - go build -ldflags="-s -w" -o "$REPO_DIR/bin/strata" ./cmd/strata + go build -ldflags="-s -w" -o "$REPO_DIR/bin/strata-compile" ./cmd/strata # Copy to strata home - cp "$REPO_DIR/bin/strata" "$STRATA_BIN/strata" - chmod +x "$STRATA_BIN/strata" + cp "$REPO_DIR/bin/strata-compile" "$STRATA_BIN/strata-compile" + chmod +x "$STRATA_BIN/strata-compile" - # Copy create-strata CLI - if [ -f "$REPO_DIR/bin/create-strata" ]; then - cp "$REPO_DIR/bin/create-strata" "$STRATA_BIN/create-strata" - chmod +x "$STRATA_BIN/create-strata" + # Copy create-strata-compile CLI + if [ -f "$REPO_DIR/bin/create-strata-compile" ]; then + cp "$REPO_DIR/bin/create-strata-compile" "$STRATA_BIN/create-strata-compile" + chmod +x "$STRATA_BIN/create-strata-compile" fi cd "$REPO_DIR" @@ -257,12 +257,12 @@ install_global() { print_step "Installing globally to $LOCAL_BIN..." if [ -w "$LOCAL_BIN" ]; then - ln -sf "$STRATA_BIN/strata" "$LOCAL_BIN/strata" - print_success "Linked strata to $LOCAL_BIN/strata" + ln -sf "$STRATA_BIN/strata-compile" "$LOCAL_BIN/strata-compile" + print_success "Linked strata-compile to $LOCAL_BIN/strata-compile" else echo " Requires sudo to write to $LOCAL_BIN" - sudo ln -sf "$STRATA_BIN/strata" "$LOCAL_BIN/strata" - print_success "Linked strata to $LOCAL_BIN/strata (with sudo)" + sudo ln -sf "$STRATA_BIN/strata-compile" "$LOCAL_BIN/strata-compile" + print_success "Linked strata-compile to $LOCAL_BIN/strata-compile (with sudo)" fi fi } @@ -326,11 +326,11 @@ export STRATA_HOME="$HOME/.strata" export PATH="$STRATA_HOME/bin:$PATH" # Strata aliases -alias st='strata' -alias stdev='strata dev' -alias stbuild='strata build' -alias stgen='strata generate' -alias stnew='create-strata' +alias st='strata-compile' +alias stdev='strata-compile dev' +alias stbuild='strata-compile build' +alias stgen='strata-compile generate' +alias stnew='create-strata-compile' # Strata completions SHELL_CONFIG @@ -389,7 +389,7 @@ _strata_completions() { local generate_types="component page store layout middleware" case "$prev" in - strata|st) + strata-compile|st) COMPREPLY=( $(compgen -W "$commands" -- "$cur") ) return 0 ;; @@ -423,13 +423,13 @@ _strata_completions() { fi } -complete -F _strata_completions strata +complete -F _strata_completions strata-compile complete -F _strata_completions st BASH_COMP # Generate zsh completion cat > "$STRATA_COMPLETIONS/_strata" << 'ZSH_COMP' -#compdef strata st +#compdef strata-compile st # Strata zsh completion @@ -461,7 +461,7 @@ _strata() { case "$state" in command) - _describe -t commands 'strata commands' commands + _describe -t commands 'strata-compile commands' commands ;; args) case "$words[2]" in @@ -506,33 +506,33 @@ ZSH_COMP # Strata fish completion # Main commands -complete -c strata -f -n "__fish_use_subcommand" -a "dev" -d "Start development server" -complete -c strata -f -n "__fish_use_subcommand" -a "build" -d "Build for production" -complete -c strata -f -n "__fish_use_subcommand" -a "preview" -d "Preview production build" -complete -c strata -f -n "__fish_use_subcommand" -a "generate" -d "Generate component/page/store" -complete -c strata -f -n "__fish_use_subcommand" -a "init" -d "Initialize new project" -complete -c strata -f -n "__fish_use_subcommand" -a "help" -d "Show help" -complete -c strata -f -n "__fish_use_subcommand" -a "version" -d "Show version" +complete -c strata-compile -f -n "__fish_use_subcommand" -a "dev" -d "Start development server" +complete -c strata-compile -f -n "__fish_use_subcommand" -a "build" -d "Build for production" +complete -c strata-compile -f -n "__fish_use_subcommand" -a "preview" -d "Preview production build" +complete -c strata-compile -f -n "__fish_use_subcommand" -a "generate" -d "Generate component/page/store" +complete -c strata-compile -f -n "__fish_use_subcommand" -a "init" -d "Initialize new project" +complete -c strata-compile -f -n "__fish_use_subcommand" -a "help" -d "Show help" +complete -c strata-compile -f -n "__fish_use_subcommand" -a "version" -d "Show version" # Generate subcommands -complete -c strata -f -n "__fish_seen_subcommand_from generate" -a "component" -d "Generate component" -complete -c strata -f -n "__fish_seen_subcommand_from generate" -a "page" -d "Generate page" -complete -c strata -f -n "__fish_seen_subcommand_from generate" -a "store" -d "Generate store" -complete -c strata -f -n "__fish_seen_subcommand_from generate" -a "layout" -d "Generate layout" +complete -c strata-compile -f -n "__fish_seen_subcommand_from generate" -a "component" -d "Generate component" +complete -c strata-compile -f -n "__fish_seen_subcommand_from generate" -a "page" -d "Generate page" +complete -c strata-compile -f -n "__fish_seen_subcommand_from generate" -a "store" -d "Generate store" +complete -c strata-compile -f -n "__fish_seen_subcommand_from generate" -a "layout" -d "Generate layout" # Dev options -complete -c strata -f -n "__fish_seen_subcommand_from dev" -l port -d "Port number" -complete -c strata -f -n "__fish_seen_subcommand_from dev" -l open -d "Open browser" -complete -c strata -f -n "__fish_seen_subcommand_from dev" -l host -d "Host to bind" +complete -c strata-compile -f -n "__fish_seen_subcommand_from dev" -l port -d "Port number" +complete -c strata-compile -f -n "__fish_seen_subcommand_from dev" -l open -d "Open browser" +complete -c strata-compile -f -n "__fish_seen_subcommand_from dev" -l host -d "Host to bind" # Build options -complete -c strata -f -n "__fish_seen_subcommand_from build" -l analyze -d "Analyze bundle" -complete -c strata -f -n "__fish_seen_subcommand_from build" -l watch -d "Watch mode" -complete -c strata -f -n "__fish_seen_subcommand_from build" -l minify -d "Minify output" -complete -c strata -f -n "__fish_seen_subcommand_from build" -l sourcemap -d "Generate sourcemaps" +complete -c strata-compile -f -n "__fish_seen_subcommand_from build" -l analyze -d "Analyze bundle" +complete -c strata-compile -f -n "__fish_seen_subcommand_from build" -l watch -d "Watch mode" +complete -c strata-compile -f -n "__fish_seen_subcommand_from build" -l minify -d "Minify output" +complete -c strata-compile -f -n "__fish_seen_subcommand_from build" -l sourcemap -d "Generate sourcemaps" # Alias -complete -c st -w strata +complete -c st -w strata-compile FISH_COMP print_success "Shell completions installed" @@ -575,32 +575,32 @@ print_final() { echo -e " ${CYAN}source $(get_shell_config $(detect_shell))${NC}" echo "" echo " 2. Create a new project:" - echo -e " ${CYAN}npx create-strata my-app${NC}" + echo -e " ${CYAN}npx create-strata-compile my-app${NC}" echo -e " ${CYAN}cd my-app${NC}" echo -e " ${CYAN}npm install${NC}" - echo -e " ${CYAN}strata dev${NC}" + echo -e " ${CYAN}strata-compile dev${NC}" echo "" echo " Or try the example app:" echo -e " ${CYAN}cd $REPO_DIR/examples/basic-app${NC}" - echo -e " ${CYAN}strata dev${NC}" + echo -e " ${CYAN}strata-compile dev${NC}" echo "" echo -e " ${BOLD}Available Commands:${NC}" echo "" - echo " strata dev Start dev server with hot reload" - echo " strata build Build for production" - echo " strata preview Preview production build" - echo " strata generate Generate component/page/store" + echo " strata-compile dev Start dev server with hot reload" + echo " strata-compile build Build for production" + echo " strata-compile preview Preview production build" + echo " strata-compile generate Generate component/page/store" echo "" echo -e " ${BOLD}Aliases:${NC}" echo "" - echo " st → strata" - echo " stdev → strata dev" - echo " stbuild → strata build" - echo " stgen → strata generate" - echo " stnew → npx create-strata" + echo " st → strata-compile" + echo " stdev → strata-compile dev" + echo " stbuild → strata-compile build" + echo " stgen → strata-compile generate" + echo " stnew → npx create-strata-compile" echo "" echo -e " ${BOLD}Documentation:${NC} https://stratajs.dev/docs" - echo -e " ${BOLD}GitHub:${NC} https://github.com/strata/strata" + echo -e " ${BOLD}GitHub:${NC} https://github.com/CarGDev/strata-compile" echo "" } diff --git a/scripts/setup.sh b/scripts/setup.sh index 59b60e9..7719804 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -57,7 +57,7 @@ echo " ✓ Setup complete!" echo "" echo " Quick start:" echo " cd examples/basic-app" -echo " ../../bin/strata dev" +echo " ../../bin/strata-compile dev" echo "" echo " Or use make:" echo " make dev"