0.1.2 โ€ข Published 11 months ago

create-liteflow-app v0.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

Create LiteFlow App

A CLI tool for creating modern web applications with LiteFlow framework.

Quick Start

npx create-liteflow-app my-app
cd my-app
npm install
npm run dev

Features

  • ๐Ÿš€ Quick project setup
  • โšก๏ธ Built with Vite for fast development
  • ๐ŸŽฏ TypeScript by default
  • ๐Ÿ›ฃ๏ธ Type-safe routing
  • ๐ŸŽจ Tailwind CSS for styling
  • ๐Ÿ“ฆ Zero configuration
  • ๐Ÿงช Testing setup with Vitest
  • ๐Ÿ“ฑ Mobile-first responsive design

Usage

Creating a New Project

npx create-liteflow-app my-app

Options:

  • --template - Template to use (default: "default")
  • --typescript - Use TypeScript (default: true)
  • --package-manager - Package manager to use (npm, yarn, pnpm)

Project Structure

my-app/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ pages/          # Route components
โ”‚   โ”œโ”€โ”€ components/     # Reusable components
โ”‚   โ”œโ”€โ”€ hooks/          # Custom hooks
โ”‚   โ”œโ”€โ”€ utils/          # Utility functions
โ”‚   โ”œโ”€โ”€ App.tsx         # Root component
โ”‚   โ””โ”€โ”€ main.tsx        # Entry point
โ”œโ”€โ”€ public/             # Static assets
โ””โ”€โ”€ package.json        # Dependencies and scripts

Available Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run preview - Preview production build
  • npm test - Run tests
  • npm run lint - Run linter

Templates

Default Template

The default template includes:

  • React with TypeScript
  • Vite for development and building
  • React Router for routing
  • Tailwind CSS for styling
  • Vitest for testing
  • ESLint and Prettier for code quality

Custom Templates

You can create custom templates by following this structure:

template/
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ ...
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ tsconfig.json
โ””โ”€โ”€ vite.config.ts

CLI Commands

Generate Components

npx create-liteflow-app generate component MyComponent

This will create:

  • src/components/MyComponent.tsx
  • src/components/MyComponent.test.tsx (optional)

Generate Pages

npx create-liteflow-app generate page About

This will create:

  • src/pages/About.tsx
  • src/pages/About.test.tsx (optional)

Configuration

TypeScript

The template includes a pre-configured tsconfig.json. You can extend it:

{
  "extends": "./tsconfig.json",
  "compilerOptions": {
    // Your custom options
  }
}

Vite

Customize your Vite configuration in vite.config.ts:

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";

export default defineConfig({
  // Your custom config
});

Tailwind CSS

Customize your Tailwind configuration in tailwind.config.js:

module.exports = {
  theme: {
    extend: {
      // Your custom theme
    },
  },
  // Your custom config
};

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Publishing

To publish a new version:

  1. Update version in package.json
  2. Create and push a new tag:
git tag v0.1.1
git push origin v0.1.1

The GitHub Action will automatically publish the package to npm.

License

MIT ยฉ Rahees Ahmed

0.1.2

11 months ago

0.1.1

11 months ago

0.1.0

11 months ago

0.2.15

11 months ago

0.2.14

11 months ago

0.2.13

11 months ago

0.2.12

11 months ago

0.2.11

11 months ago

0.2.10

11 months ago

0.2.9

11 months ago

0.2.8

11 months ago

0.2.7

11 months ago

0.2.6

11 months ago

0.2.5

11 months ago

0.2.4

11 months ago

0.2.2

11 months ago

0.2.0

11 months ago

0.1.5

11 months ago

0.1.4

11 months ago