koala-framework / composer-extra-assets

Composer Plugin for installing Assets using native npm/bower
BSD 2-Clause "Simplified" License
42 stars 11 forks source link

Packing js an css #31

Closed wysman closed 7 years ago

wysman commented 7 years ago

Hi,

This is my first time with npm and bower. I have install composer-extra-assets and some JS library from bower (see composer.json below). I want to pack all js and css installed in the folder vendor/bower_components in two big files apps.js and apps.css. Does composer-extra-assets can do the job ? If not do you have some tips / scripts to do the job ?

Best regards,


composer.json

{
    "minimum-stability": "dev",
    "require": {
        "php": "~5.3",
        "koala-framework/composer-extra-assets": "~1.1"
    },
    "require-dev": {
        "phpunit/phpunit": "~4.6"
    },
    "extra": {
        "require-bower": {
            "html5shiv": "*",
            "jquery": "~3.0",
            "jquery-timeago": "~1.5",
            "jquery-throttle-debounce": "*",
            "bootstrap": "~3.3",
            "bootstrap-toggle": "~2.2"
        }
    }
}
nsams commented 7 years ago

That's not the job of composer-extra-assets. But you can use composer-extra-assets to install webpack (using require-npm) and build you app using that. Or you use browserify.

https://webpack.js.org/guides/get-started/