vakata/frontend-dependencies

Manage front end depedencies from composer

Installs: 2 905

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:composer-plugin

2.1.0 2024-01-18 10:42 UTC

This package is auto-updated.

Last update: 2024-11-18 12:29:37 UTC


README

A composer plugin to manage frontend dependencies (copied the idea from https://www.npmjs.com/package/frontend-dependencies).

Install

$ composer require vakata/frontend-dependencies

Usage

In your composer.json file include the dependencies you need and where to copy them. Each dependency is either a name and a version, or an array consisting of a version and a glob pattern. You can additionally control whether the dependencies are updated on each install or update (defaults to true) and whether a clean full install is performed every time.

Keep in mind the target folder will be emptied every time dependencies are updated!

"extra": {
    "vakata" : {
        "frontend-dependencies" : {
            "clean" : false,
            "install" : true,
            "update" : true,
            "target" : "public/assets/static/",
            "dependencies" : {
                "dep1" : "~1.0",
                "dep2" : {
                    "version" : "~1.0"
                },
                "dep3" : {
                    "version" : "~1.0",
                    "src" : "dist/*"
                },
                "dep4" : {
                    "version" : "~1.0",
                    "src" : "dist/dep4.js"
                },
                "dep5" : {
                    "version" : "~1.0",
                    "src" : "{dist/dep5.js,images}"
                }
            }
        }
    }
}

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email github@vakata.com instead of using the issue tracker.

Credits

  • [vakata][link-author]
  • [All Contributors][link-contributors]

License

The MIT License (MIT). Please see License File for more information.