Giter Site home page Giter Site logo

Comments (19)

4www avatar 4www commented on May 28, 2024

that would be exquisite!

from packery.

desandro avatar desandro commented on May 28, 2024

Use bower list --sources to easily list all the source files in proper order, required to use Packery. Bower handles the dependencies, but it's up to you on how you want to use them (i.e. concat and minify them together).

Please follow up if you're not sure how to use Bower for Packery.

from packery.

davecranwell avatar davecranwell commented on May 28, 2024

I'm afraid I'm still having trouble understanding what I'm meant to do with Bower.

bower install packery results in a folder "app" with subdir "components" (not "bower_components" as some have mentioned in other threads), into which there are 10 different dependencies installed.

Am I meant to reference every one of those js files in my HTML before the packery script? That's pretty yukky if so.

I understand that the recommended solution is probably to use requirejs, but it's still unclear exactly which of these 10 dependencies I need. If you're not familiar with AMD development, the dependency on requirejs itself is an almost vertical learning curve for those that just want to evaluate packery and then perhaps go no further with it.

from packery.

desandro avatar desandro commented on May 28, 2024

@davecranwell Bower documentation is under going. I wish I had place to point you to to resolve your questions, but right now, we (the Bower team) don't have one yet.

In the mean time, you are better off using a packaged source file.

Am I meant to reference every one of those js files in my HTML before the packery script?

Yes. but you can concatenate and minify these files using other services. I use Grunt.

from packery.

rowanu avatar rowanu commented on May 28, 2024

Is there any plan to include the Gruntfile that you work with (to concat and minify the files) in the repo?

from packery.

rowanu avatar rowanu commented on May 28, 2024

Also related - what are your (@desandro) thoughts on including the packery.pkgd.js and packery.pkgd.min.js files in the root directory of the repo? I can see you've done this for desandro/isotope already.

from packery.

desandro avatar desandro commented on May 28, 2024

Is there any plan to include the Gruntfile that you work with (to concat and minify the files) in the repo?

Not currently. I did put together https://github.com/desandro/organize-bower-sources to facilitate this. I should probably document how to use it.

Also related - what are your (@desandro) thoughts on including the packery.pkgd.js and packery.pkgd.min.js files in the root directory of the repo?

These are built files and therefore not good for source control. Isotope currently has this, but it will be removed in v2.

from packery.

perry avatar perry commented on May 28, 2024

Has there been any update on this?

I am using bower for a project and I am having trouble loading all of the dependencies for both packery and draggabilly. How are you building the packaged script? Could you share the Gruntfile? Thanks.

from packery.

desandro avatar desandro commented on May 28, 2024

How are you building the packaged script? Could you share the Gruntfile?

There's several parts at work here. I'll try to break it down.

organize-bower-sources

organize-bower-sources is a node script that takes the big JSON from bower list --json and make a hash out of it for each file type, ordered by dependency first.

{
  '.js': [
    'bower_components/get-style-property/get-style-property.js',
    'bower_components/get-size/get-size.js',
    ...
  ],
  '.css': [
    'bower_components/normalize.css/normalize.css'
  ]
}

With that, you can integrate into your Grunt tasks for concatenation and minification. Which I do in the int-bower task.


I really should make a grunt task that's less specialized, so you can hook up Bower sources into Grunt tasks.

from packery.

perry avatar perry commented on May 28, 2024

Thanks @desandro.

from packery.

nijikokun avatar nijikokun commented on May 28, 2024

This is very messy. You should provide packaged versions.

from packery.

svnlto avatar svnlto commented on May 28, 2024

This is very messy. You should provide packaged versions.

this.

from packery.

marczking avatar marczking commented on May 28, 2024

I include the packery file myself and not via bower. I set up bower and wanted to include packery via bower because I thought it would make things easier... But with packery this is not the case.

I'll use bower anyways atm and see how I get along.

from packery.

desandro avatar desandro commented on May 28, 2024

I've reconsidered 🌅 With the next release, I'll be offering packery.pkgd.js and packery.pkgd.min.js with Bower. Thank you for your patience!

from packery.

perry avatar perry commented on May 28, 2024

👍

from packery.

kosir avatar kosir commented on May 28, 2024

That's great! +1

from packery.

desandro avatar desandro commented on May 28, 2024

It's up and available as of v1.2.3 https://github.com/metafizzy/packery/tree/master/dist

from packery.

perry avatar perry commented on May 28, 2024

✨ ✨ - thanks!

from packery.

marczking avatar marczking commented on May 28, 2024

very cool! Thank you

from packery.

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.