Coder Social home page Coder Social logo

Comments (14)

lipis avatar lipis commented on July 17, 2024

Never used it before so what do I have to do on my side?

Any chance that you can simply use Bower for your front end stuff?!

from flag-icons.

rvanlaak avatar rvanlaak commented on July 17, 2024

I've been looking into the 'components' repository over here at Github, which all are available via Packagist.

But, as can be seen in the FontAwesome repo, they still have to update manually. The easiest way is to add a composer.json to your own project and add it to Packagist.org.

Nice article about this can be found here:
http://tech.arendjantetteroo.nl/blog/2013/11/06/switching-from-bower-to-composer-with-components/

from flag-icons.

roest01 avatar roest01 commented on July 17, 2024

+1

from flag-icons.

lipis avatar lipis commented on July 17, 2024

hey.. totally forgot about that.. I will do something about it I the coming days..

from flag-icons.

lipis avatar lipis commented on July 17, 2024

@rvanlaak Do you mind creating a PR with the valid composer.json for this app and then I will add it to Packagist..

from flag-icons.

rvanlaak avatar rvanlaak commented on July 17, 2024

Well, the thing is that adding a composer.json does not directly make the package usable by Symfony. All code will be added to the /vendor folder, where it should be in the /web folder.

A possible solution would be to let composer install assets via an extra plugin. Can you take a look at the following two options?

from flag-icons.

ickbinhier avatar ickbinhier commented on July 17, 2024

or via https://github.com/RobLoach/component-installer

"extra": {
    "component": {
        "name": "flag-icon-css",
        "files": [
            "js/datei1.js",
            "css/datei2.css",
            "oder_das_verzeichnis_mit_allem_inhalt/**"
        ]
    }
}

from flag-icons.

lipis avatar lipis commented on July 17, 2024

So here you are!! https://packagist.org/packages/components/flag-icon-css

from flag-icons.

lipis avatar lipis commented on July 17, 2024

Let me know if it actually worked on your sides :)

from flag-icons.

rvanlaak avatar rvanlaak commented on July 17, 2024

Nice! Will try in the near future

from flag-icons.

roest01 avatar roest01 commented on July 17, 2024

Works like a charm - thank you :)

from flag-icons.

lipis avatar lipis commented on July 17, 2024

nice.. I thought about it later.. but instead of component/.. I might
rename it to lipis/.. or something, but either case it works :)

from flag-icons.

ickbinhier avatar ickbinhier commented on July 17, 2024

you can it rename to 'lipis/'

from flag-icons.

roest01 avatar roest01 commented on July 17, 2024

I would prefer to let it on '/component'
Structure in Symfony2 for libs is

/vendor/
/vendor/js
/vendor/css/
/vendor/packageName/....

bower seems to use the /component/ folder as default - so there of course there are some bower packages in packagist (like your's) and if you use one of it - you will have the component folder next to the vendor folder.

/vendor/
/vendor/css/
/component/flag-icon-css/  

Finaly the nicest solution for me is to have everything in /vendor/ but this seems not to be useful because of different package manager defaults.
The best compromise is to have a vendor for libs and bundles and components for frontent stuff installed with bower.
the badest solution (for me) is, to have a third folder next to them - vendor, component and libs ...

So I suggest to keep the 'component/' folder setting and orientate at the bower defaults.

from flag-icons.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.