php - Include libraries with Composer, NPM or Bower -
i have been getting composer, npm , bower recently. no there's lot of overlap between capabilities , wondering if approach sane? if not, should do?
i typically start php projects setting composer load php libraries , dependencies. after use npm install gulp , gulp plugins use. , use bower js , css libraries.
most of these can load github, theoretically use composer install js/css or bower load php. i'm pretty set on composer it's autoloading capabilities, suppose question whether should dump bower?
currently when deploy, checkout repo , call npm install installs gulp etc. in package.json use "scripts": {"install": "gulp install"} kicks off install task in gulpfile.js. loads in gulp-composer , gulp-bower plugins kick off composer , bower installs.
they pretty same, difference default package list (npm purely nodejs, composer php, bower purely js/css, etc.) , language they're written in.
however, have 1 limitation: can install packages in 1 location. means can't install some/php-framework in vendor/ , my-css-framework in web/.
the location important: want php code/nodejs libs live outside public root, assets should inside public root.
i think it's practice to, if able too, use each dependency manager language designed (e.g. composer php specific stuff autoloading, while npm nodejs specific stuff).
Comments
Post a Comment