generator-reveal
Advanced tools
Comparing version 0.0.2 to 0.0.3
{ | ||
"name": "generator-reveal", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "A Reveal.js generator for Yeoman", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -49,3 +49,3 @@ # Generator-reveal | ||
After you fill your slide with content, you need to add the slide filename to your `slides/list.json` file, e.g. | ||
And the slide filename will be added to your `slides/list.json` file. | ||
@@ -52,0 +52,0 @@ ```json |
'use strict'; | ||
var util = require('util'); | ||
var yeoman = require('yeoman-generator'); | ||
var fs = require('fs'); | ||
var path = require('path'); | ||
@@ -16,4 +18,10 @@ var SlideGenerator = module.exports = function SlideGenerator(args, options, config) { | ||
SlideGenerator.prototype.files = function files() { | ||
var filename = 'slides/' + this._.slugify(this.name) + '.md'; | ||
this.template('slide.md', filename); | ||
var filename = this._.slugify(this.name) + '.md'; | ||
var fullfilename = 'slides/' + filename; | ||
this.template('slide.md', fullfilename); | ||
var appPath = process.cwd(); | ||
var fullPath = path.join(appPath, '/slides/list.json'); | ||
var list = require(fullPath); | ||
list.push(filename); | ||
fs.writeFileSync(fullPath, JSON.stringify(list)) | ||
}; |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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
13508
190
2