generator-reveal
Advanced tools
Comparing version 0.0.9 to 0.0.10
@@ -6,3 +6,2 @@ 'use strict'; | ||
var RevealGenerator = module.exports = function RevealGenerator(args, options, config) { | ||
@@ -39,6 +38,7 @@ yeoman.generators.Base.apply(this, arguments); | ||
name: 'presentationTitle', | ||
message: "What are you going to talk about?" | ||
},{ | ||
message: 'What are you going to talk about?' | ||
}, | ||
{ | ||
name: 'packageVersion', | ||
message: "What version should we put in the package.json file?", | ||
message: 'What version should we put in the package.json file?', | ||
default: '0.0.0' | ||
@@ -49,3 +49,3 @@ }]; | ||
this.presentationTitle = props.presentationTitle; | ||
this.packageVersion = props.packageVersion | ||
this.packageVersion = props.packageVersion; | ||
cb(); | ||
@@ -52,0 +52,0 @@ }.bind(this)); |
{ | ||
"name": "<%= _.slugify(presentationTitle) %>", | ||
"version": "0.0.1", | ||
"version": "<%= packageVersion %>", | ||
"dependencies": { | ||
"reveal.js": "~2.4", | ||
"reveal.js": "git@github.com:hakimel/reveal.js.git#master", | ||
"handlebars": "~1.0.0", | ||
@@ -7,0 +7,0 @@ "jquery": "~1.10" |
@@ -1,22 +0,21 @@ | ||
var append_slides = function (data) { | ||
'use strict'; | ||
var appendSlides = function (data) { | ||
var slides = data; | ||
var md_template = $('#slide-template-markdown').html(); | ||
var html_template = $('#slide-template').html(); | ||
var vertical_template = $('#vertical-template').html(); | ||
var md_templ = Handlebars.compile(md_template); | ||
var html_templ = Handlebars.compile(html_template); | ||
var vertical_templ = Handlebars.compile(vertical_template); | ||
var mdtemplate = $('#slide-template-markdown').html(); | ||
var htmltemplate = $('#slide-template').html(); | ||
var verticaltemplate = $('#vertical-template').html(); | ||
var mdtempl = Handlebars.compile(mdtemplate); | ||
var htmltempl = Handlebars.compile(htmltemplate); | ||
var verticaltempl = Handlebars.compile(verticaltemplate); | ||
slides.forEach(function (slide, index) { | ||
var templ; | ||
if (Object.prototype.toString.call(slide) === '[object Array]') { | ||
var verticalindex = 'vertical-' + index; | ||
$('.slides').append(verticaltempl({'ident': verticalindex})); | ||
if (Object.prototype.toString.call(slide) === '[object Array]') { | ||
var vertical_ident = 'vertical-' + index; | ||
console.log(vertical_ident); | ||
$('.slides').append(vertical_templ({'ident': vertical_ident})) | ||
slide.forEach(function (slide) { | ||
if (slide.indexOf('.html') !== -1) { | ||
var templ = html_templ; | ||
templ = htmltempl; | ||
} else if (slide.indexOf('.md') !== -1) { | ||
var templ = md_templ; | ||
templ = mdtempl; | ||
} | ||
@@ -28,5 +27,5 @@ $('.vertical-' + index).append(templ({'file': slide})); | ||
if (slide.indexOf('.html') !== -1) { | ||
var templ = html_templ; | ||
templ = htmltempl; | ||
} else if (slide.indexOf('.md') !== -1) { | ||
var templ = md_templ; | ||
templ = mdtempl; | ||
} | ||
@@ -33,0 +32,0 @@ $('.slides').append(templ({'file': slide})); |
{ | ||
"name": "generator-reveal", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"description": "A Reveal.js generator for Yeoman", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -23,4 +23,3 @@ 'use strict'; | ||
console.log('Using HTML!', this.filename); | ||
}; | ||
} | ||
}; | ||
@@ -41,3 +40,3 @@ | ||
list.push(this.filename); | ||
fs.writeFileSync(fullPath, JSON.stringify(list, null, 4)) | ||
fs.writeFileSync(fullPath, JSON.stringify(list, null, 4)); | ||
}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19050
285