dynamic file mapping to avoid themes hardcoded in gruntfile

This commit is contained in:
Hakim El Hattab 2015-01-28 08:52:15 +01:00
parent df38524874
commit 3b45b618b8
2 changed files with 11 additions and 17 deletions

View File

@ -36,19 +36,15 @@ module.exports = function(grunt) {
} }
}, },
themes: { themes: {
files: { files: [
'css/theme/black.css': 'css/theme/source/black.scss', {
'css/theme/white.css': 'css/theme/source/white.scss', expand: true,
'css/theme/league.css': 'css/theme/source/league.scss', cwd: 'css/theme/source',
'css/theme/beige.css': 'css/theme/source/beige.scss', src: ['*.scss'],
'css/theme/night.css': 'css/theme/source/night.scss', dest: 'css/theme',
'css/theme/serif.css': 'css/theme/source/serif.scss', ext: '.css'
'css/theme/simple.css': 'css/theme/source/simple.scss',
'css/theme/sky.css': 'css/theme/source/sky.scss',
'css/theme/moon.css': 'css/theme/source/moon.scss',
'css/theme/solarized.css': 'css/theme/source/solarized.scss',
'css/theme/blood.css': 'css/theme/source/blood.scss'
} }
]
} }
}, },

View File

@ -17,7 +17,5 @@ Declares a set of custom variables that the template file (step 4) expects. Can
3. **Override** 3. **Override**
This is where you override the default theme. Either by specifying variables (see [settings.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/settings.scss) for reference) or by adding any selectors and styles you please. This is where you override the default theme. Either by specifying variables (see [settings.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/settings.scss) for reference) or by adding any selectors and styles you please.
4. **Include [/css/theme/template/theme.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/theme.scss)** 4. **Run `css-grunt themes`**
The template theme file which will generate final CSS output based on the currently defined variables. This will compile your theme CSS. It's now ready to use.
When you are done, run `css-grunt themes` to compile the Sass file to CSS and you are ready to use your new theme.