composer-asset-plugin

NPM/Bower Dependency Manager for Composer
授权协议 MIT License
开发语言 JavaScript
所属分类 Web应用开发、 常用JavaScript包
软件类型 开源软件
地区 不详
投 递 者 钱远
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

NPM/Bower Dependency Manager for Composer

The Composer Asset Plugin allows you to manage project assets (css, js, etc.) in your composer.jsonwithout installing NPM or Bower.

This plugin works by transposing package information from NPM or Bower to a compatible version for Composer.This allows you to manage asset dependencies in a PHP based project very easily.

Important:

The next major version of Composer Asset Plugin is so different, but also incompatible with the current version,that it became a new project named Foxy.

Foxy is the new way to manage the assets of PHP libraries, because it works nativelly with all the features ofNPM or Yarn. However, this plugin will continue to be maintained by the community, without having new features.

You can read the reasons for this new version,or the difference between Foxy and Fxp Composer Asset Plugin,but also how does Foxy work.

Features include:
  • Works with native management system versions of VCS repository of composer
  • Works with public and private VCS repositories
  • Lazy loader of asset package definitions to improve performance
  • Import filter with the dependencies of the root package and the installed packages, for increased dramatically the performance for the update
  • Automatically get and create an Asset VCS repository defined in:
  • Automatically get and create the Asset VCS repositories of dependencies definedin each asset package (dev dependencies included)
  • Mapping conversion of asset package to composer package for:
  • Conversion of Semver version to the composer version
  • Conversion of Semver range version to the composer range version
  • Conversion of dependencies with URL to the composer dependencies with the creation of VCS repositories
  • Conversion of multiple versions of the same dependency to different dependencies of composer
  • Add manually the multiple versions of a same dependency in the project
  • Add a custom config of VCS Repository
  • Override the config of VCS Repository defined by the asset registry directly in config section of root composer
  • VCS drivers for:
  • Local cache system for:
    • package versions
    • package contents
    • repository redirects
  • Custom asset installers configurable in the root file composer.json
  • For Bower, all files defined in the section ignore will not be installed
  • Disable or replace the deleting of the ignore files for Bower
  • Enable manually the deleting of the ignore files for NPM
  • Use the Ignore Files Manager in the Composer scripts
  • Configure the plugin per project, globally or with the environment variables
  • Compatible with all commands, including:
    • depends
    • diagnose
    • licenses
    • remove
    • require
    • search (bower only)
    • show
    • status
Why this plugin?

There already are several possibilities for managing assets in a PHP project:

  1. Install Node.js and use NPM or Bower command line in addition to Composer command line
  2. Do #1, but add Composer scripts to automate the process
  3. Include assets directly in the project (not recommended)
  4. Create a repository with all assets and include the composer.json file (and use Packagist or an VCS Repository)
  5. Add a package repository in composer.json with a direct download link
  6. Create a Satis or Packagist server
  7. Other?

It goes without saying that each javascript, CSS, etc. library should be developed with the usual tools for thatlanguage, which front-end developers know well. However, in the case of a complete project in PHP, it shouldn'tbe necessary to use several tools (PHP, Nodejs, Composer, NPM, Bower, Grunt, etc.) to simply installthese assets in your project.

This plugin has been created to address these issues. Additionally, most developers will not add a composer.jsonfile to their projects just to support php based projects, especially when npm and/or bower already exist and arewidely used.

Documentation

The bulk of the documentation is located in Resources/doc/index.md:

Read the Documentation

Read the FAQs

Read the Release Notes

Installation

All the installation instructions are located in documentation.

License

This composer plugin is under the MIT license. See the complete license in:

LICENSE

About

Fxp Composer Asset Plugin is a François Pluchino initiative.See also the list of contributors.

Reporting an issue or a feature request

Issues and feature requests are tracked in the Github issue tracker.

 相关资料
  • composer 安装 fxp/composer-asset-plugin:~1.3.0 报错,具体错误内容如下: 百度了各种结果,都不是我这种问题,特请大佬帮忙看看,该如何解决,谢谢。

  • Asset Pipeline 本文介绍 Asset Pipeline。 读完本文,你将学到: Asset Pipeline 是什么以及其作用; 如何合理组织程序的静态资源; Asset Pipeline 的优势; 如何向 Asset Pipeline 中添加预处理器; 如何在 gem 中打包静态资源; 1 Asset Pipeline 是什么? Asset Pipeline 提供了一个框架,用于连

  • Asset Packagist Composer + Bower + NPM = friends forever! This package is the core part of https://asset-packagist.org/ project. Asset Packagist allows installation of Bower and NPM packages as native

  • AspNet.Mvc.AssetVersioning Adds a UrlHelper.VersionedContent URL extension helper to append SHA256 hash to content URLs in ASP.NET MVC 5. Install Install-Package AspNet.Mvc.AssetVersioning Usage In Vi

  • Ember Asset Loader Provides experimental support for the Asset Manifest RFC and Asset Loader Service RFC. Usage Ember Asset Loader does three primary things: Provides a base class to easily generate a

  • pwa-asset-generator ✨ Automates PWA asset generation and image declaration. Automatically generates icon and splash screen images, favicons and mstile images. Updates manifest.json and index.html file