LeaVerou / inspire.js

Lean, hackable, extensible slide deck framework. Previously known as CSSS.
https://inspirejs.org
MIT License
1.73k stars 254 forks source link

Dependency on PrefixFree #21

Closed Munter closed 2 years ago

Munter commented 12 years ago

This commit added a regression since you are referencing prefixfree outside of the scope of the project, which assumes that users of CSSS will have prefixfree installed at the exact same location as you have locally.

Prefixfree should be should be added as a submodule to fix this.

Munter commented 12 years ago

I forgot to add that the regression I spotted was the missing transitions when changing items and slides

LeaVerou commented 12 years ago

Hi Munter,

Yes, I was thinking about this myself. I read about how to add submodules, but I'm still kinda scared to try it out. Do you have any example of a repo that uses submodules, so that I can check out how it works when cloning, pulling etc?

Thanks!

Munter commented 12 years ago

I actually pull in CSSS as a submodule in One-color.js at /slides/3rdparty/

We use it at lot at work for external dependencies and for our own libs that have been open sourced and moved to github.

The basic concept resembles that os a symlink, but hardcoded to a specific commit on the submodule. So when using submodules you need to manually update your reference to a new version when you update prefixfree. This adds an extra working step, but also helps you remember to test that there are no regressions.

Workflow for committing a submodule version update:

cd submodule/path/
git pull (or checkout specific version)
cd root/of/CSSS
git commit .gitmodules

You usually need to remember the users of the library that they need to pull in submodules as well:

cd CSSS
git submodule update --init

If you ever spot a regression in CSSS caused by something in prefixfree you can fix the bug right there inside your submodule checkout, which I find useful for direct testing without making roundtrips through github to test.

LeaVerou commented 12 years ago

Thanks for the explanation!

So it has to be a folder inside each repo, it can't be outside like now, right? Is there a way to make it work with the current reference?

Munter commented 12 years ago

The repo can't track anything outside itself, so no-go on that. I don't see a way it can work in a way where you can refer to prefixfree outside the CSSS folder and still expect it to work when people clone jsut CSSS.

A simple solution could of course be to check in a copy of prefixfree.min.js inside CSSS and update that when needed. That of course gives you less possibilities to debug.

Munter commented 12 years ago

That close button certainly is 'close' to the comment button :)

LeaVerou commented 12 years ago

The problem is that I also upload everything to my website, and need it to work both locally, and remotely, and on gh-pages. So, that would be a problem. Now I neatly have a different folder for everything, and it even works on gh-pages, when the other repo has a page too.

I'll think about what I can do. Although I don't think it's that hard to clone the other repo as well. But it could become a hassle once I introduce more dependencies. :(

LeaVerou commented 12 years ago

Ha, I know why you clicked the close button. If you post a comment with 6 lines and then click "Comment" and keep your mouse pointer in the same position, after it's posted, your mouse is exactly over "Close issue"!

adamfr33man commented 12 years ago

How about putting something in the readme telling people to put the PrefixFree folder below CSSS to get things working ? Not an ideal solution but may save some people a little time in the meanwhile.

ichderfisch commented 12 years ago

I really like shavenyaknz idea. Otherwise it might be great to simply add the latest version of prefix-free to CSSS to make morking from the beginning.

jorgecasar commented 12 years ago

I request #22 to make prefixfree as submodule and solve it

LeaVerou commented 2 years ago

Inspire no longer references anything outside this repo, nor does it reference PrefixFree at all, so I'm gonna go ahead and close this.