mihatori/codeignitervite
Composer 安装命令:
composer require mihatori/codeignitervite
包简介
Integrate viteJs in codeiginter4 framework
关键字:
README 文档
README
Codeigniter + viteJs
Vitejs Integration For Codeigniter4
Codeigniter vite is a package that aims to integrate vitejs with codeigniter4 in a simple way.
Features:
- ⏱️ Almost zero configuration
- 🧩 Easy to install and remove
- 🔨 Easy to customize
- ✌️ Support most used frameworks:
react,vue, andsvlete. (check v2 for SvelteKit support) - 🔥 Enjoy hot module replacement (HMR)
Installation:
composer require mihatori/codeignitervite
then from your project root, run:
php spark vite:init --framework <framework>
replace <framework> with vue, react, svelte, or none
or you can just run:
php spark vite:init
our buddy spark will handle the rest for you 🙃
Getting Started:
- Install your node dependencies:
npm install - Start vite server:
npm run dev - Start CI server:
php spark serveor access it through your virtual host. - That's all =)
NOTE:
npm run devis not where you should work, it main purpose is to serve assets, such as scripts or stylesheets. once you build your files, it becomes useless but as long as it running, the package will use it instead of the bundled files. So make sure to access your project from ci server or a vitual host.
Build your files:
to bundle your files, run:
npm run build
this command will generate the bundled assets in your public directory. but as we said before, as long as vite server is running, the package will use it instead of bundled files, so make sure to stop it when you're done developing.
Uninitialize:
composer remove mihatori/codeignitervite command will remove the package, but the generated files will remain there (package.json, vite.config.js ...etc).
so to avoid that, make sure to run the following command first:
php spark vite:remove
This command will do the following:
- delete
package.json,packages.lock.jsonandvite.config.js. - delete
resourcesfolder. - And finally restore your
.envfile.
🔥 Need a quick start?
Check out our starter apps for svelte and vue.
Contributing
All contributions are welcome, it doesn't matter whether you can code, write documentation, or help find bugs. feel free to use issues or pull requests.
Support
Unfortunately, I don't drink coffee 💔, but you can star it instead 🙃
License
MIT License © 2022 Mihatori Kei
mihatori/codeignitervite 适用场景与选型建议
mihatori/codeignitervite 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 4.14k 次下载、GitHub Stars 达 95, 最近一次更新时间为 2022 年 07 月 09 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「codeigniter」 「codeigniter4」 「codeigniter-viteJs」 「codeigniter-vueJs」 「codeigniter-reactJs」 「codeigniter-svelteJs」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 mihatori/codeignitervite 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mihatori/codeignitervite 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 mihatori/codeignitervite 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
The CodeIgniter Redis package
JSON Web Token for codeigniter4 authentication.
ORM Database mapping for Codeigniter 4
An Example of CodeIgniter 4 Page module
统计信息
- 总下载量: 4.14k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 97
- 点击次数: 27
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-07-09