app/index.js
function () {

    var done = this.async();

    if(this.createMode) {

      // copy yoga-generator itself
      this.fs.copy(path.join(__dirname, '../'), this.destinationPath(), {
        globOptions: {
          dot: true,
          ignore: [
            '**/.DS_Store',
            '**/.git',
            '**/.git/**/*',
            '**/node_modules',
            '**/node_modules/**/*',
            '**/test/**/*',
            '**/create/**/*'
          ]
        }
      })

      // copy the package.json and README
      this.fs.copyTpl(path.join(__dirname, '../create/{}package.json'), this.destinationPath('package.json'), this.viewData)

      this.fs.copyTpl(path.join(__dirname, '../create/README.md'), this.destinationPath('README.md'), this.viewData)

      done()
    }
    else {
      this.registerTransformStream(striate(this.viewData))

      prefixnote.parseFiles(this.templatePath(), this.viewData)

        // copy each file that is traversed
        .on('data', function (file) {
          var filename = path.basename(file.original)

          // always ignore files like .DS_Store
          if(ignore.indexOf(filename) === -1) {
            var from = file.original
            var to = this.destinationPath(path.relative(this.templatePath(), file.parsed))

            // copy the file with templating
            this.fs.copyTpl(from, to, this.viewData)
          }
        }.bind(this))

        .on('end', done)
        .on('error', done)
    }
  }
function () {

    var done = this.async();

    if(this.createMode) {

      // copy yoga-generator itself
      this.fs.copy(path.join(__dirname, '../'), this.destinationPath(), {
        globOptions: {
          dot: true,
          ignore: [
            '**/.DS_Store',
            '**/.git',
            '**/.git/**/*',
            '**/node_modules',
            '**/node_modules/**/*',
            '**/test/**/*',
            '**/create/**/*'
          ]
        }
      })

      // copy the package.json and README
      this.fs.copyTpl(path.join(__dirname, '../create/{}package.json'), this.destinationPath('package.json'), this.viewData)

      this.fs.copyTpl(path.join(__dirname, '../create/README.md'), this.destinationPath('README.md'), this.viewData)

      done()
    }
    else {
      this.registerTransformStream(striate(this.viewData))

      prefixnote.parseFiles(this.templatePath(), this.viewData)

        // copy each file that is traversed
        .on('data', function (file) {
          var filename = path.basename(file.original)

          // always ignore files like .DS_Store
          if(ignore.indexOf(filename) === -1) {
            var from = file.original
            var to = this.destinationPath(path.relative(this.templatePath(), file.parsed))

            // copy the file with templating
            this.fs.copyTpl(from, to, this.viewData)
          }
        }.bind(this))

        .on('end', done)
        .on('error', done)
    }
  }
function ( ) { var done = this . async ( ) ; if ( this . createMode ) { // copy yoga-generator itself this . fs . copy ( path . join ( __dirname , '../' ) , this . destinationPath ( ) , { globOptions : { dot : true , ignore : [ '**/.DS_Store' , '**/.git' , '**/.git/**/*' , '**/node_modules' , '**/node_modules/**/*' , '**/test/**/*' , '**/create/**/*' ] } } ) // copy the package.json and README this . fs . copyTpl ( path . join ( __dirname , '../create/{}package.json' ) , this . destinationPath ( 'package.json' ) , this . viewData ) this . fs . copyTpl ( path . join ( __dirname , '../create/README.md' ) , this . destinationPath ( 'README.md' ) , this . viewData ) done ( ) } else { this . registerTransformStream ( striate ( this . viewData ) ) prefixnote . parseFiles ( this . templatePath ( ) , this . viewData ) // copy each file that is traversed . on ( 'data' , function ( file ) { var filename = path . basename ( file . original ) // always ignore files like .DS_Store if ( ignore . indexOf ( filename ) === - 1 ) { var from = file . original var to = this . destinationPath ( path . relative ( this . templatePath ( ) , file . parsed ) ) // copy the file with templating this . fs . copyTpl ( from , to , this . viewData ) } } . bind ( this ) ) . on ( 'end' , done ) . on ( 'error' , done ) } }
Copies all files from the template directory to the destination path parsing filenames using prefixnote and running them through striate
Copies all files from the template directory to the destination path parsing filenames using prefixnote and running them through striate