myth/kindling 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

myth/kindling

Composer 安装命令:

composer require myth/kindling

包简介

A first-class Vite asset pipeline for CodeIgniter 4, with optional Tailwind CSS, Alpine.js, and HTMX support.

README 文档

README

Tests PHP Version License: MIT

A Vite asset pipeline for CodeIgniter 4 — HMR in development, fingerprinted chunk-aware output in production, and zero manual wiring thanks to CI4's auto-discovery.

Full documentation →

What you get

  • One Spark commandkindling:install scaffolds your entire asset setup
  • HMR in development — edit a JS or CSS file and the browser updates instantly, no reload
  • Fingerprinted builds in production — Vite hashes every output file; kindling reads the manifest so your views always reference the right URLs
  • Shared chunk deduplication — if two entry points share a module, the preload tag is emitted once per request
  • Optional integrationsTailwind CSS v4, Alpine.js, and HTMX v2 all opt-in at install time
  • CSP nonce support — pass a nonce to vite_tags() and it's threaded through every emitted <script> tag

Requirements

  • PHP 8.2+
  • CodeIgniter 4.7+
  • Node.js 18+

Installation

composer require myth/kindling

CI4 discovers the package automatically via Composer — no manual registration needed.

Quick start

Scaffold your asset setup with a single command:

php spark kindling:install

The command asks which entry points you want and whether to include Tailwind, Alpine, or HTMX. Pass flags to skip the prompts:

php spark kindling:install --entry=app --tailwind --alpine --no-htmx

Then install npm dependencies and start the dev server:

npm install
npm run dev

Add vite_tags() to your CI4 layout:

<head>
    <?= vite_tags('app') ?>
</head>

That's it. See the Getting Started guide for the full walkthrough.

Optional integrations

Tailwind CSS

Pass --tailwind at install time to include Tailwind CSS v4 via the official Vite plugin. kindling generates a Tailwind-aware vite.config.js and a CSS entry stub with the import already included.

php spark kindling:install --tailwind

Tailwind CSS docs →

Alpine.js

Pass --alpine to include Alpine.js. kindling adds it to package.json and writes the initialization code into your JS entry file.

php spark kindling:install --alpine

Alpine.js docs →

HTMX

Pass --htmx to include HTMX v2. Works great alongside michalsn/codeigniter-htmx for CI4-aware HTMX helpers.

php spark kindling:install --htmx

HTMX docs →

Documentation

Full documentation is at lonnieezell.github.io/kindling.

Contributing

Pull requests are welcome. The project uses Docker for a consistent dev environment.

composer docker:test        # run PHPUnit
composer docker:cs-fix      # fix coding style
composer docker:analyze     # PHPStan + Rector
composer docker:ci          # run all checks
composer docker:shell       # bash inside the container

License

MIT — see LICENSE.

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-05-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固