 fs = require 'fs'
 path = require 'path'
 yeoman = require 'yeoman-generator'
-semver = require 'semver'
 
 module.exports = class SlideGenerator extends yeoman.generators.NamedBase
     constructor: ->

            default: false

    files: ->
        appPath = process.cwd()
        fullPath = path.join appPath, '/slides/list.json'
        list = require fullPath

        if @options.markdown
            @filename = "#{@_.slugify(@name)}.md"

            @log.info "Appending slides/#{@filename} to slides/list.json."
            list.push @filename

        # TODO
        # replace with @fs.writeJSON as soon as @fs supports it
        # then we can remove the `fs` dependency.
        fs.writeFileSync fullPath, JSON.stringify list, null, 4
