import { exec } from 'shelljs'

import server from '../../server'

export let port = 3000
export const deploy = (args) => {
  if (parseInt(args.p)) port = parseInt(args.p)
  server()
}

@@ -23,16 +23,48 @@
 shelljs'
+%0Aimport inquirer from 'inquirer'
 %0A%0Aimport
@@ -90,16 +90,87 @@
 /server'
+%0Aimport %7B readJSON %7D from '../../helpers'%0Aimport %7B init %7D from './init'
 %0A%0Aexport
@@ -220,16 +220,59 @@
 s) =%3E %7B%0A
+  try %7B%0A    readJSON('./.generic.json')%0A%0A  
   if (pa
@@ -311,16 +311,18 @@
 args.p)%0A
+  
   server
@@ -324,10 +324,269 @@
 erver()%0A
+  %7D catch (e) %7B%0A    inquirer.prompt(%5B%7Btype: 'confirm', name: 'initialize', message: %60Looks like you haven't yet initialized this project. Would you like to?%60%7D%5D)%0A      .then((%7Binitialize%7D) =%3E %7B%0A        if (initialize) %7B%0A          init()%0A        %7D%0A      %7D)%0A  %7D%0A
 %7D%0A

check for generic.json on deploy