jquery-archive / css-chassis

An attempt at creating an open standard for both CSS and JavaScript UI libraries.
https://css-chassis.com
Other
351 stars 67 forks source link

Localize downloads. #117

Closed geekman-rohit closed 8 years ago

geekman-rohit commented 8 years ago

This PR localizes downloads for perf tests. Still working on it.

As of now : the MIME of static files is not rendered properly. Working on that.

arschmitz commented 8 years ago

I think i would prefer to use bower for this.

geekman-rohit commented 8 years ago

We need only css files (which in some cases like BEM is dynamically geneteated), that is why I thought it would be better to just download the single files instead of all the package?

arschmitz commented 8 years ago

That we only need the css makes no difference we would just use bowercopy to get just what we needed to the external folder. Also per our license everything needs to either be in the external folder or or node_modules folder thats not something we created and hold copyright on.

BEM from my understanding is not available at a url either so this still would not help correct?

cvrebert commented 8 years ago

I strongly advise against using Bower. See e.g. https://github.com/yeoman/yeoman/issues/1521 And bowercopy is likely broken for some libraries on account of Bower's main specification change; see http://blog.getbootstrap.com/2015/06/15/bootstrap-3-3-5-released/#wiredep-and-bower

arschmitz commented 8 years ago

@cvrebert bowercopy would not break from that change bowercopy simply copys the files you tell it from the bower components directory to another directory and removes the bower components directory. Im not suggesting this for all our dependencies by any means only for this one specific task. id prefer npm and npmcopy but last i checked some of the libraries we need for this test were not on NPM yet but were on bower. I will have to see if hopefully they have switched since.

Either way though the issues with the main field would not be an issue.

geekman-rohit commented 8 years ago

@arschmitz , I don't really think bower would is a good solution for us, but your argument is right. There could be version conflicts in jquery-ui and jquery-mobile but now that I think mroe about it we only need the css files so we could force latest versions. I'll add a bower.json, and we could use grunt-bower so user need not run bower install himself.

arschmitz commented 8 years ago

@geekman-rohit I don't think versions or version conflicts is going to be an issue here. And we don't want to specify latest either we don't want things to change with out our explicitly changing them.

However please look at bowercopy with this you do not need to bower install and it copys the files to the proper folder removing the bower components folder. we use this on many of our other projects and it was written by a team member. https://github.com/jquery/jquery-mobile/blob/1.5-dev/build/tasks/options/bowercopy.js

I believe it does exactly what we need here.

sfrisk commented 8 years ago

Closing this since we aren't prioritizing perf testing right now, and this is blocked by several factors. We'll focus on perf again once phase one is complete.