slara / generator-reveal

Yeoman generator for Reveal.js
MIT License
429 stars 52 forks source link

Added possibility to select revealjs theme #58

Closed tristola closed 9 years ago

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.01%) when pulling 0196f724cb745bd2cca4bd9c2eac712cb89ae83a on tristola:master into 0b63e2fa5a2102ba4df4fd5c5b2d871e76651039 on slara:master.

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.01%) when pulling 0196f724cb745bd2cca4bd9c2eac712cb89ae83a on tristola:master into 0b63e2fa5a2102ba4df4fd5c5b2d871e76651039 on slara:master.

janraasch commented 9 years ago

Neat idea. We just have to make sure not to confuse people and ourselves with too many options. Esspecially the existing useSass and this one have to be clearly distinct.

  1. My first idea would be to first ask, whether one wants to useSass and only if the answer was no, ask the user which of the existing precompiled .css themes he/she wants to use.
  2. It would be nice to display an options list of available themes, too.
slara commented 9 years ago

:+1:

As @janraasch says, an options list would be nice. Following #42, we could add some kind of theme preview.

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.08%) when pulling f1b52d9c35f273dcc704f8fda94a996e55ad0b67 on tristola:master into 0b63e2fa5a2102ba4df4fd5c5b2d871e76651039 on slara:master.

tristola commented 9 years ago

Changed to 1) only select theme when useSass is false 2) give list of revealjs themes to select from.

janraasch commented 9 years ago

Thanks for the quick update, @tristola. One last thing: app/revealThemes.js does not need to be JavaScript. You could simply use a app/theme_choices.json file with content like

[ 
  {"name": "beige", "value": "beige" }, 
  {"name": "blood", "value": "blood" },
  {"etc": "etc....."}
]

You can then use that in RevealGenerator#constructor as

themes = JSON.parse @readFileAsString path.join __dirname, './theme_choices.json'
janraasch commented 9 years ago

Also, could you write a testcase for a choice different from the default default? Just so we have that covered as well.

tristola commented 9 years ago

Added test and moved themes list to theme_choices.json

janraasch commented 9 years ago

Thanks, @tristola. @slara, could you prepare a release with this?

slara commented 9 years ago

v0.3.10 is out and is really an awesome release! Thanks everyone!

janraasch commented 9 years ago

:+1: