Code Monkey home page Code Monkey logo

Comments (6)

amorey avatar amorey commented on May 22, 2024

Bower is usually used for accessing the source code (e.g. sass) so you can build your own custom distribution:
https://www.muicss.com/docs/v1/css-js/customization

Can you show me an example of where it's useful to access the dist folder from Bower?

from mui.

GeoffreyFrogeye avatar GeoffreyFrogeye commented on May 22, 2024

It may be useful when developing a small project that doesn't have a build system, so you can use the bower component right after issuing bower install, and you don't have to figure out how to build the component, nor you have to rebuild it each time you run bower install (not that it's difficult, especially with mui). Most components do that (e.g. jquery, bootstrap, d3).

from mui.

amorey avatar amorey commented on May 22, 2024

Is it easier to use the .css files from bower as opposed to hot linking from the CDN? Here's boilerplate which includes links to the CDN:
https://www.muicss.com/docs/v1/css-js/boilerplate-html

It seems like the bootstrap-sass-official bower package only includes the source files:
https://github.com/twbs/bootstrap-sass/blob/master/bower.json

I'm curious to hear more about how you're using bower and why it's more useful to access pre-built distribution files from bower over the CDN or the download package.

from mui.

GeoffreyFrogeye avatar GeoffreyFrogeye commented on May 22, 2024

I personally prefer to serve the files locally rather than from a CDN, for security and reliability reasons. It's not that I don't trust the CDN, but for developing an application that manipulates sensible data (such as passwords) or can be ran on an infrastructure that may have a proxy which could block the CDN for whatever reason, proceeding this way is better.

Bootstrap-sass doesn't seem to have pre-built files on its git server, however, mui does, which is a good point, because the only obstacle blocking the pre-built files to be included in bower is this little line in bower.json.

Using pre-built files with bower is really useful when you can't/won't use a CDN (e.g. reasons mentioned above), and you can't/won't configure a build system (e.g. for small projects, or when you don't have time to do so). You just have to point yours link and script tags to the correct file in bower_components folder (or whatever name you gave it), and you're good to go. What's more useful, you just can run bower update and all your dependencies are up to date. However, currently with mui I need to use a git submodule, and update it separately, which is less practical than bower.

Let me insist on the fact that's it's only one line to remove, which will benefit some users and won't disturb others (apart from some extra files downloaded, I don't think it's a problem).
It's a matter of opinion, really, so I won't blame anybody if it's not done so 😄.

from mui.

amorey avatar amorey commented on May 22, 2024

Added 'dist' directory to bower.json in v0.1.15 via 45dfd7d

You can also download the pre-built package as a zip file from the MUI website:
https://www.muicss.com

from mui.

GeoffreyFrogeye avatar GeoffreyFrogeye commented on May 22, 2024

Thanks :-)

from mui.

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.