Add Go CLI with container expansion parser and development server
- Implement Go-based CLI for build-time HTML enhancement - Add container expansion: div.insertr auto-expands to viable children - Create servedev command with live development workflow - Add Air configuration for automatic rebuilds and serving - Enable transition from runtime JS to build-time enhancement approach
This commit is contained in:
31
insertr-cli/cmd/root.go
Normal file
31
insertr-cli/cmd/root.go
Normal file
@@ -0,0 +1,31 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var rootCmd = &cobra.Command{
|
||||
Use: "insertr",
|
||||
Short: "Insertr CLI - HTML enhancement for static sites",
|
||||
Long: `Insertr CLI adds editing capabilities to static HTML sites by detecting
|
||||
editable elements and injecting content management functionality.
|
||||
|
||||
The tool parses HTML files, finds elements with the 'insertr' class,
|
||||
and enhances them with editing capabilities while preserving
|
||||
static site performance.`,
|
||||
Version: "0.0.1",
|
||||
}
|
||||
|
||||
func Execute() {
|
||||
if err := rootCmd.Execute(); err != nil {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(parseCmd)
|
||||
}
|
||||
Reference in New Issue
Block a user