Skip to content

h-3d/xenx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xenx

A basic project scaffolder made using Bun and boune.

Features

  • Initialize projects from customizable templates
  • Interactive template selection with configurable defaults
  • Built-in local http server using the serve npm package
  • Optional git initialization
  • Template management through a simple JSON configuration
  • Lightning-fast execution powered by Bun

Prerequisites

Installation

The instructions below are for unix based systems (Linux, macOS, BSD) but can be adapted for other operating systems.

Navigate to the home directory

cd ~

Clone the git repository

git clone https://github.com/h-3d/xenx.git

Navigate to the cloned directory

cd xenx

Install dependencies

bun install

Add the xenx alias to your shell configuration file (~/.bashrc, ~/.zshrc, etc)

echo "alias xenx='bun run ~/xenx/index.js'" >> ~/.bashrc # For Bash
echo "alias xenx='bun run ~/xenx/index.js'" >> ~/.zshrc # For Zsh

Source your shell configuration file to apply the changes

source ~/.bashrc # For Bash
source ~/.zshrc # For Zsh

Quick Start

Initialize a new project

xenx init my-project

Navigate to the project directory

cd my-project

Start the http server

xenx serve

Template Configuration

By default, templates are stored in ~/xenx/templates/. Each template has its own subdirectory, for example:

templates
├── picocss
├── tailwind
├── threejs
├── vanilla
└── templates.json

You can customize the location of the templates folder by modifying the templatesDirectory variable in index.js:

const templatesDirectory = path.join(os.homedir(), "xenx", "templates");

The templates.json file controls which templates appear in the interactive prompt and which one is selected by default. This file is located in the templates directory and has two main fields:

  • templates: An array of template objects that define what appears in the prompt.
  • default: The directory name of the template that is selected by default.

Each template object has two main fields:

  • label: The text that appears in the interactive prompt.
  • value: The directory name of the template.
{
  "templates": [
    {
      "label": "Vanilla",
      "value": "vanilla"
    },
    {
      "label": "Tailwind CSS",
      "value": "tailwind"
    },
    {
      "label": "Pico CSS",
      "value": "picocss"
    },
    {
      "label": "Three.js",
      "value": "threejs"
    }
  ],
  "default": "vanilla"
}

About

A basic project scaffolder made using Bun and boune.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors