const license = require('../_shared/license/mit.js');
const gitignore = require('./gitignore.js');
const readme = require('./readme.md.js');
const packageJson = require('./package.json.js');

module.exports = {
  requiredProps: ['name', 'email'],
  run: props => ({
    files: [{
      filename: 'package.json',
      template: packageJson(props)
    }, {
      filename: '.gitignore',
      template: gitignore(props)
    }, {
      filename: 'README.md',
      template: readme(props)
    }, {
      filename: 'LICENSE',
      template: license(props)
    }]
  })
};

@@ -1,12 +1,54 @@
+const %7Bspawn%7D = require('child_process');%0A
 const licens
@@ -230,61 +230,1071 @@
 ');%0A
-%0Amodule.exports = %7B%0A  requiredProps: %5B'name', 'email'
+const travisYml = require('./travis.yml.js');%0Aconst testJs = require('./test.js');%0Aconst indexJs = require('./index.js');%0A%0Aconst requiredNodePackages = %5B'mocha', 'chai', 'nyc'%5D;%0A%0Amodule.exports = %7B%0A  postTakeoff: (props, %7Bemit, succeed%7D) =%3E %7B%0A    emit('Install packages');%0A%0A    const ls = spawn('yarn', %5B'add'%5D.concat(requiredNodePackages));%0A%0A    ls.stdout.on('data', data =%3E %7B%0A      emit(data.toString().trim().split('%5Cn').pop());%0A    %7D);%0A%0A    ls.on('exit', succeed);%0A  %7D,%0A  requiredProps: %5B%7B%0A    type: 'input',%0A    name: 'packagename',%0A    message: 'How do you want to call your node-module?',%0A    default: process.cwd().split('/').pop()%0A  %7D, %7B%0A    type: 'input',%0A    name: 'username',%0A    message: 'Whats your name?',%0A    default: process.env.USER%0A  %7D, %7B%0A    type: 'input',%0A    name: 'user_email',%0A    message: 'Whats your email?'%0A  %7D, %7B%0A    type: 'list',%0A    name: 'license',%0A    message: 'What license do you want?',%0A    choices: %5B%7B%0A      name: 'MIT',%0A      value: 'mit'%0A    %7D, %7B%0A      name: 'Apache License 2.0',%0A      value: 'apache-license-2.0'%0A    %7D%5D%0A  %7D
 %5D,%0A 
@@ -1595,24 +1595,226 @@
 ense(props)%0A
+    %7D, %7B%0A      filename: 'index.js',%0A      template: indexJs(props)%0A    %7D, %7B%0A      filename: '.travis.yml',%0A      template: travisYml()%0A    %7D, %7B%0A      filename: 'test.js',%0A      template: testJs(props)%0A
     %7D%5D%0A  %7D)%0A
@@ -1811,13 +1811,13 @@
   %7D%5D%0A  %7D
-)
 %0A
+)
 %7D;%0A

update node-module station