workflow?

37 views
Skip to first unread message

D.C. Ernst

unread,
Feb 11, 2012, 11:15:50 AM2/11/12
to dec...@googlegroups.com
I have a few questions related to workflow.
  1. What is the best way to keep track of the updates and changes to deck.js?  Should I use git and pull from GitHub or just download the .zip file?  I've been doing the latter, but I'm thinking it would be better to do the former.  Any input?
  2. Related to the first question, I have been tinkering with a custom theme, and I'm wondering what the best way to get the updated versions of deck.js while preserving my template.
  3. There are a lot of files and folders.  I'm guessing that I don't need all of them.  What's a minimum set of files that I need to use deck.js?
Disclaimer: I consider myself to be tech savvy, but there are quite few technical details that I don't understand.  I can pick things up quickly, but I definitely don't know how all the pieces fit together.

Thanks.

Dana

Caleb Troughton

unread,
Feb 14, 2012, 12:09:41 AM2/14/12
to deck.js
On Feb 12, 12:15 am, "D.C. Ernst" <ernst.tr...@gmail.com> wrote:
> I have a few questions related to workflow.
>
>    1. What is the best way to keep track of the updates and changes to
>    deck.js?  Should I use git and pull from GitHub or just download the .zip
>    file?  I've been doing the latter, but I'm thinking it would be better to
>    do the former.  Any input?

What you're doing right now, downloading the package zip, certainly
works and I fault nobody for choosing this option. The download link
always points to the HEAD of the repositories "stable" branch. More
often than not it is the same as master, but I stage changes on master
for either ticket openers to confirm that their issue is resolved, or
to give it time while I play around with changes myself. In any case,
what's on stable is always what matches the public documentation.

That said, I happen to think that just about everyone could benefit
from getting comfortable with git, and once you do you will find
pulling from git to be more natural and time-saving. I suggest making
that move.

>    2. Related to the first question, I have been tinkering with a custom
>    theme, and I'm wondering what the best way to get the updated versions of
>    deck.js while preserving my template.

No matter how you keep deck.js updated, it's usually good practice to
keep vendor libraries in a separate location from your own code. For
the sake of this discussion, let's say your stuff is located in /
project-folder/lib/ and deck.js is located in /project-folder/vendor/
deck.js/.

Again, you could download deck.js each time and put it there, or you
could use git to manage the deck.js folder. But if you're using git
to manage the whole project-folder, the ideal would be to add deck.js
as a git submodule. A Google search for git submodules might be your
best bet on learning how to manage submodules. The Git Book entry
(http://book.git-scm.com/5_submodules.html) might be a little daunting
as the examples are contrived and aren't great for beginners. Chris
Jean's post (http://chrisjean.com/2009/04/20/git-submodules-adding-
using-removing-and-updating/) is much better.

>    3. There are a lot of files and folders.  I'm guessing that I don't need
>    all of them.  What's a minimum set of files that I need to use deck.js?

Here are the bare, bare minimum set of files needed:

- jQuery (jquery.1.7.min.js in the repo at this time)
- Modernizr (modernizr.custom.js)
- An html file to hold your slides
- /core/deck.core.css
- /core/deck.core.js

A lot of people use the index.html file in /introduction/ for the html
files, and just modify it to fit their presentation. There is also a
real stripped down skeleton with comments located at /core/
deck.core.html.

Only including the files mentioned above gets you a fairly gray,
unstyled deck with no transitions, and keyboard navigation of the
deck. From that base you can add the any extensions, style theme, and
transition theme as you see fit.

>
> Disclaimer: I consider myself to be tech savvy, but there are quite few
> technical details that I don't understand.  I can pick things up quickly,
> but I definitely don't know how all the pieces fit together.

It isn't high on my list of things to do, but I do plan on adding
READMEs to each directory that explain what the files in that
directory do and how they play with the package as a whole. And
probably some moving of files around in that process.

>
> Thanks.
>
> Dana

Dana Ernst

unread,
Feb 14, 2012, 11:30:58 AM2/14/12
to dec...@googlegroups.com
On Feb 14, 2012, at 12:09 AM, Caleb Troughton wrote:

> That said, I happen to think that just about everyone could benefit
> from getting comfortable with git, and once you do you will find
> pulling from git to be more natural and time-saving. I suggest making
> that move.

I've fiddled with git at the command line a bit, but for now, I'll likely use GitHub for Mac (a git GUI) for pulling from GitHub.

>> 2. Related to the first question, I have been tinkering with a custom
>> theme, and I'm wondering what the best way to get the updated versions of
>> deck.js while preserving my template.
>
> No matter how you keep deck.js updated, it's usually good practice to
> keep vendor libraries in a separate location from your own code. For
> the sake of this discussion, let's say your stuff is located in /
> project-folder/lib/ and deck.js is located in /project-folder/vendor/
> deck.js/.
>
> Again, you could download deck.js each time and put it there, or you
> could use git to manage the deck.js folder. But if you're using git
> to manage the whole project-folder, the ideal would be to add deck.js
> as a git submodule. A Google search for git submodules might be your
> best bet on learning how to manage submodules. The Git Book entry
> (http://book.git-scm.com/5_submodules.html) might be a little daunting
> as the examples are contrived and aren't great for beginners. Chris
> Jean's post (http://chrisjean.com/2009/04/20/git-submodules-adding-
> using-removing-and-updating/) is much better.

At some point I'll have to figure out how to do this, but at the moment I don't have the bandwidth to learn what I need to.

>> 3. There are a lot of files and folders. I'm guessing that I don't need
>> all of them. What's a minimum set of files that I need to use deck.js?
>
> Here are the bare, bare minimum set of files needed:
>
> - jQuery (jquery.1.7.min.js in the repo at this time)
> - Modernizr (modernizr.custom.js)
> - An html file to hold your slides
> - /core/deck.core.css
> - /core/deck.core.js

From my experiments, it looks like if I keep the "extensions" and "themes" folders, as well as the jQuery files, everything works. In particular, it looks like I can skip uploading "test" and "core" to my webpage. Is that correct?

Thanks for all the help. It is very much appreciated. I'm enjoying writing slides for some of my talks with deck.js.

Dana

Caleb Troughton

unread,
Feb 14, 2012, 11:58:16 AM2/14/12
to deck.js
You don't need the test directory. It only contains unit tests for
development purposes. Likewise you can do without the
README, .gitignore, and the license files.

There's no way you can drop the core directory. Nothing will work
without deck.core.js.

Dana Ernst

unread,
Feb 14, 2012, 1:23:12 PM2/14/12
to dec...@googlegroups.com
On Feb 14, 2012, at 11:58 AM, Caleb Troughton wrote:

There's no way you can drop the core directory.  Nothing will work
without deck.core.js.

Hmmm.  Why does this deck work?  I deleted the "core" folder and everything seems to work.


Dana

Caleb Troughton

unread,
Feb 14, 2012, 10:59:54 PM2/14/12
to deck.js
I imagine your browser is caching the files locally even though they
are gone. Try clearing your cache and you should see what I see:
http://screencast.com/t/ebr8usHpv0Zl
> http://oz.plymouth.edu/~dcernst/Talks/DeckJS/PSUTalk2011/PSUTalk2011....
>
> Dana

Dana Ernst

unread,
Feb 15, 2012, 8:33:46 AM2/15/12
to dec...@googlegroups.com
On Feb 14, 2012, at 10:59 PM, Caleb Troughton wrote:

> I imagine your browser is caching the files locally even though they
> are gone. Try clearing your cache and you should see what I see:
> http://screencast.com/t/ebr8usHpv0Zl

Doh! Thanks.

Dana

Reply all
Reply to author
Forward
0 new messages