ibm-js / deliteful-tutorial

The example application that is explained in the deliteful tutorial.

Home Page:http://ibm-js.github.io/deliteful-tutorial/runnable/part8-2/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

reducing the duplication of resources

lbod opened this issue · comments

commented

I'm wondering if there's a way to reduce the massive amount of duplicated files in the runnable folder of the gh-pages branch?
I mean, each 'part' of the runnable code has a bower_components dir and these should be exactly the same for each 'part' as long as the same versions were used for the tutorial (which I'd expect to be the case).

Couldn't there be a shared parent folder for bower_components that the runnable code shares?
I'm sure there's a reason they need to be duplicated but I don't see the reason why at the moment

Makes sense. Sounds like it's just a case of changing requirejs' baseUrl to be one level higher. You could also use a build, either custom made or from https://github.com/ibm-js/deliteful-build.

@clmath is looking into this for the deliteful tutorial. I suspect same solution should be applied to both.

commented

@cjolif @clmath just to confirm before I start working on the runnable code, are you saying that bower_components will be in the parent folder? Maybe makes no difference as they're different repos but it'd be good to keep the same structure.

The problem with moving the bower_components directory is that the runnable app will be (slightly) different than the app described in the tutorial.

And after testing it appears that unless if you checkout gh-pages those data won't be downloaded so it is not causing a perf issue to the user of the tutorial.
And since github is not limiting the size of the repo I think the duplication is not that bad.