承接 arefshojaei/anchor 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

arefshojaei/anchor

Composer 安装命令:

composer create-project arefshojaei/anchor

包简介

PHP local CDN manager

README 文档

README

PHP Version License GitHub

A lightweight and powerful Local CDN Manager built with PHP. Anchor allows you to download, manage, and serve frontend libraries locally with a simple CLI interface.

Perfect for developers who want a private CDN server without relying on external providers.

Cover

✨ Features

  • 📦 Package Management - Store and manage frontend libraries locally
  • 🚀 One Click Installation - Download multiple CDN packages using a single command
  • 🖥️ Built-in HTTP Server - Serve your local CDN directly from CLI
  • 📝 Package List Support - Manage packages using a simple text configuration file
  • Fast & Lightweight - Pure PHP implementation with minimal dependencies
  • 🛠️ CLI Interface - Simple and developer-friendly commands
  • 🔧 Custom Host & Port - Configure your local server easily

📥 Installation

Requirements

  • PHP 7.0 or higher
  • Composer (recommended)
  • Bash environment (optional for bulk downloads)

Using Composer

composer create-project arefshojaei/anchor my-cdn

Move into the project directory:

cd my-cdn

Clone Repository

git clone https://github.com/ArefShojaei/Anchor.git

Then:

cd Anchor
composer install

📋 CDN Package List

Anchor supports bulk package installation using a package list.

Location:

public/packages.txt

File format:

# [Category]
[package] [version] [url]

Example:

# CSS Frameworks
bootstrap 5.3.8 https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css

# JavaScript Libraries
jquery 3.7.1 https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.min.js

🚀 One Click Package Download

If your environment supports Bash, run:

bash scripts/downloader.sh

This script reads packages.txt and downloads all defined packages automatically.

🛠 CLI Commands

Add a new CDN package

Pattern:

php bin/cli cdn add [package] [version] [url]

Example:

php bin/cli cdn add bootstrap 5.3.8 https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css

Start Local CDN Server

Basic:

php bin/cli serve

Custom port:

php bin/cli serve --port:3000

Custom host:

php bin/cli serve --host:0.0.0.0

Custom host and port:

php bin/cli serve --host:0.0.0.0 --port:3000

After running the server, open your browser:

http://[host]:[port]

Your local packages and files inside the public/ directory will be available through this address.

📂 Project Structure

Anchor/
│
├── bin/
│   └── cli                 # CLI application
│
├── public/
│   ├── packages.txt        # CDN package definitions
│   └── packages/           # Downloaded libraries
│
├── scripts/
│   └── downloader.sh       # Bulk package downloader
│
├── src/                    # Core application source
│
├── composer.json
└── README.md

💡 Example Workflow

1. Add a package

php bin/cli cdn add alpinejs 3.14.0 https://cdn.jsdelivr.net/npm/alpinejs@3.14.0/dist/cdn.min.js

2. Start the server

php bin/cli serve --port:8080

3. Use your local CDN

<script src="http://localhost:8080/packages/alpinejs/3.14.0/cdn.min.js"></script>

🔥 Why Anchor?

Using a local CDN gives you:

  • Faster development environment
  • Offline availability
  • Full control over package versions
  • No dependency on third-party CDN availability
  • Better privacy for internal applications

🤝 Contributing

Contributions are welcome!

  1. Fork the repository
  2. Create a new branch
git checkout -b feature/amazing-feature
  1. Commit your changes
git commit -m "Add amazing feature"
  1. Push your branch
git push origin feature/amazing-feature
  1. Open a Pull Request

👨‍💻 Author

Aref Shojaei

⭐ Show Your Support

If this project helps you, consider giving it a Star on GitHub.

It motivates further development and improvements.

arefshojaei/anchor 适用场景与选型建议

arefshojaei/anchor 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 04 月 10 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「file」 「cdn」 「downloader」 「local」 「explorer」 「offline」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 arefshojaei/anchor 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 arefshojaei/anchor 我们能提供哪些服务?
定制开发 / 二次开发

基于 arefshojaei/anchor 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-10