Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

generator-reveal

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generator-reveal - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

slide/templates/slide.html

4

app/templates/Gruntfile.js

@@ -24,3 +24,5 @@ // Generated on <%= (new Date).toISOString().split('T')[0] %> using <%= pkg.name %> <%= pkg.version %>

'index.html',
'slides/*.md'
'slides/*.md',
'slides/*.html',
'slides/list.json'
],

@@ -27,0 +29,0 @@ tasks: ['build']

{
"name": "generator-reveal",
"version": "0.0.3",
"version": "0.0.4",
"description": "A Reveal.js generator for Yeoman",

@@ -5,0 +5,0 @@ "keywords": [

# Generator-reveal
A Reveal.js generator for Yeoman.
A Yeoman generator for Reveal.js.

@@ -35,3 +35,3 @@ ## Usage

### Slide
Generates a Slide Markdown file.
Generates a Slide file.

@@ -43,7 +43,9 @@ Example:

Produces `slides/slide-title.md`:
```markdown
## Slide Title
Produces `slides/slide-title.html`:
This is a new slide
```html
<h2>Slide Title</h2>
<p>This is a new slide</p>
```

@@ -57,3 +59,16 @@

#### Options
##### Markdown
Invoked with `--markdown`
Produces `slides/slide-title.md`
```markdown
## Slide Title
This is a new slide
```
## License
[MIT License](http://en.wikipedia.org/wiki/MIT_License)

@@ -7,2 +7,3 @@ 'use strict';

var SlideGenerator = module.exports = function SlideGenerator(args, options, config) {

@@ -14,2 +15,13 @@ // By calling `NamedBase` here, we get the argument to the subgenerator call

console.log('You called the slide subgenerator with the argument ' + this.name + '.');
if (this.options.markdown) {
this.useMarkdown = true;
this.filename = this._.slugify(this.name) + '.md';
console.log('Using Markdown!', this.filename);
} else {
this.useMarkdown = false;
this.filename = this._.slugify(this.name) + '.html';
console.log('Using HTML!', this.filename);
};
};

@@ -20,10 +32,13 @@

SlideGenerator.prototype.files = function files() {
var filename = this._.slugify(this.name) + '.md';
var fullfilename = 'slides/' + filename;
this.template('slide.md', fullfilename);
var appPath = process.cwd();
var fullfilename = path.join(appPath, '/slides/' + this.filename);
if (this.useMarkdown) {
this.template('slide.md', fullfilename);
} else {
this.template('slide.html', fullfilename);
}
var fullPath = path.join(appPath, '/slides/list.json');
var list = require(fullPath);
list.push(filename);
fs.writeFileSync(fullPath, JSON.stringify(list))
list.push(this.filename);
fs.writeFileSync(fullPath, JSON.stringify(list, null, 4))
};
## <%= name %>
This is a new slide
This is a new Markdown slide

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc