Materialize: Repository Size is too large for use with Bower

Created on 29 Apr 2017  Â·  21Comments  Â·  Source: Dogfalo/materialize

Description

When I download materialize using bower, it takes alot of time to download on a broadband connection [usually 1mbps]. I know its a network speed thing but downloading 20mb file everytime is insane. Please update repository so that bower usable.

Repro Steps

Just run bower install materializein ur cmd

Discussion thirdparty

Most helpful comment

Should not be a good idea create o new organization on Github and split the site itself and the framework?

Things would be more clear with that, and no unnecessary files on each repo ...

All 21 comments

@Dogfalo @acburst can't we delete the bin directory as these files should be created with each compilation?

Imho it makes more sense to move the zip task to a release task.

@tomscholz @fega your opinions on this?

Actually I think a better way would using a Bower Ignore List
Have a reference to - http://stackoverflow.com/questions/18245394/ignore-in-bowers-bower-json
Because in the bower installation, we would only require the dist folder so it makes everything else "not important". I did not wanted to use the word "useless" as it is important for some people.

I don't agree. It also makes sense to include / import Sass files and other source files, overwrite variables and use these with a bundler like webpack. It is normal that you always have also the source files. Take a look at the bower packages for Bootstrap, jQuery, Roboto and so on.

@DanielRuf the problem with the repo is all of those web page stuff. including images...

the website should in another repo!

@SamWillson I agree with @DanielRuf the source files should in the download

@fega right, a separate repository for the docs makes sense, but just if this is possible.

But why not deliver the docs with the package so developers have the docs of the installed version?

Anyway, dependencies are just installed once and just a few files imported.

I'm not really sure why the bower size is 20mb, since the materialize folder after bower install materialize completes is 4.27mb

I'm not really sure why the bower size is 20mb, since the materialize folder after bower install materialize completes is 4.27mb

$ bower install Dogfalo/materialize --force --verbose
bower resolve       https://github.com/Dogfalo/materialize.git#*
bower download      https://github.com/Dogfalo/materialize/archive/v0.98.2.tar.gz
bower progress      materialize#* received 4.3MB of 20.4MB downloaded, 21%
...
bower progress      materialize#* received 20.2MB of 20.4MB downloaded, 99%
bower extract       materialize#* archive.tar.gz

It is mainly the images folder.

user env ~/Desktop/materialize-0.98.2.tar/materialize-0.98.2/materialize-0.98.2
$ du -sh * | sort -h
...
97K     tests
112K    extras
128K    test
140K    css
271K    sass
410K    js
644K    jade
772K    fonts
1,1M    res
1,5M    dist
2,2M    bin
3,3M    templates
13M     images

After the unpacking process, the ignored files are removed.

  "ignore": [
    "jade/",
    ".gitignore",
    "CNAME",
    "css/",
    "bower.json",
    "README.md",
    "images/",
    "js/jquery.timeago.js",
    "js/init.js",
    "js/prism.js",
    "res/",
    "sass/style.scss",
    "sass/ghpages-materialize.scss",
    "**/*.html",
    "**/*.zip",
    "**/*.txt",
    "sitemap.xml",
    "package.json",
    "Gruntfile.js"
  ],

So ignoring does not change the size of the archive in any way. Please keep in mind that the download is stored in the cache of Bower and so the next time you install this version again, it uses your cache.

I don't see images when I bower install

On Sun, Apr 30, 2017 at 12:57 PM, Daniel Ruf notifications@github.com
wrote:

It is mainly the images folder.

$ du -sh * | sort -h
...
97K tests
112K extras
128K test
140K css
271K sass
410K js
644K jade
772K fonts
1,1M res
1,5M dist
2,2M bin
3,3M templates
13M images

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Dogfalo/materialize/issues/4623#issuecomment-298253220,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACpax-Jx9bwDsGSq_6d8jfyfiPrwzPjDks5r1OergaJpZM4NMIB8
.

--
Doggy sends his greetings from Mars.

The du command was on the manually downloaded tarball. Not the final bower_components/matrialize directory.
Bower deletes the files and directories fro the ignore key.

Running PNGGauntlet just saves ~2 MB (png files).

Download https://github.com/Dogfalo/materialize/archive/v0.98.2.tar.gz and extract it ;-)

A diff with the final files and directories in the bower_coponents/materialize directory makes clear that the ignored files are not there after the cleanup process of Bower.

Anyway, imho 20 MB is nothing compared to other archives and Bower / npm directories with hundreds of MB dependencies. You always use just a fraction of this. I know, this takes a while and the first install of big projects with an empty cache can take some minutes, this is not unusual.

@DanielRuf But we always could do better 🥇

Should not be a good idea create o new organization on Github and split the site itself and the framework?

Things would be more clear with that, and no unnecessary files on each repo ...

When we put the whole documentation in a new folder we could just put that folder to the bower ignore file...

When we put the whole documentation in a new folder we could just put that folder to the bower ignore file...

Well but this would not decrease the size of the tarball which is downloaded and which is so big ;-) Only solution would be to use another branch for the site or https://github.com/Dogfalo/materialize/issues/4623#issuecomment-300791268 to decrease the size of the tarball (master branch, the one which you download at the top right with the clone / download button).

At least the release / archive is too big https://github.com/Dogfalo/materialize/issues/4623#issuecomment-298254441

https://github.com/Dogfalo/materialize/releases

How does bootstrap do it? How do they keep their bower package so small then? They have the docs in same repo...

It is the exact same size like the v3-dev / master branch. Bower downloads, extracts it and then it is cleaned up (the ignored stuff deleted).

They do not host such big images in their repository like we do ;-)

$ bower install bootstrap --force --verbose
...
bower progress      bootstrap#* received 1.9MB of 4.0MB downloaded, 48%
bower progress      bootstrap#^3.3.7 received 1.9MB of 4.0MB downloaded, 48%
...
bower progress      bootstrap#^3.3.7 received 3.9MB of 4.0MB downloaded, 97%
bower extract       bootstrap#^3.3.7 archive.tar.gz

I think since Bower is now deprecated, we can close this issue. What do you think?

Also it would not make any difference for the most alternatives as they still download the full archive first, extract it, clean it up and then you have the final (smaller) size. The first download (the archive) is still big and bigger in some other projects and it is locally cached after this.

Yes I do not think this is a huge issue. We will work on reducing the size with future updates anyways

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ericlormul picture ericlormul  Â·  3Comments

PhillippOhlandt picture PhillippOhlandt  Â·  3Comments

locomain picture locomain  Â·  3Comments

artur99 picture artur99  Â·  3Comments

lpgeiger picture lpgeiger  Â·  3Comments