Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "task", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"main": "src/index.js", | ||
@@ -5,0 +5,0 @@ "bin": { |
@@ -61,3 +61,3 @@ const { isAbsolute, join } = require('path') | ||
(cmd, { env, url }) => cmd + ` -e ${env}=${url[name]}`, | ||
'now --forward-npm') | ||
'now --forward-npm -e PORT=80') | ||
for (let i in env) { | ||
@@ -67,2 +67,3 @@ cmd += ` -e ${i}=${env[i]}` | ||
const child = exec(cmd, { cwd: service.cwd }) | ||
child.stderr.on('data', err => { console.log('ERR:', err) }) | ||
child.stdout.on('data', function grabUrl (data) { | ||
@@ -111,10 +112,6 @@ const [ url ] = /https?:\/\/.+\.[a-z]{1,20}/.exec(data) | ||
exports.types = { | ||
// 'build-services': (task, hub, cwd) => new Promise((resolve, reject) => { | ||
// const { targets, package: pkg } = options(task, cwd) | ||
// }), | ||
'deploy-services': (task, hub, cwd) => new Promise((resolve, reject) => { | ||
const { targets, package: pkg } = options(task, cwd) | ||
const store = {} | ||
console.log('.....deploy-services') | ||
collect(pkg, store, cwd).then(() => { | ||
@@ -132,2 +129,3 @@ const services = Object.keys(store) | ||
} | ||
console.log('.....done deploy-services', targets) | ||
resolve({ | ||
@@ -134,0 +132,0 @@ result: targets, |
@@ -7,3 +7,4 @@ const h = require('hub.js') | ||
hub.connected.once(true).then(() => { | ||
console.log('✨ connected to ploy-task-hub ✨') | ||
console.log('✨ connected to ploy-task-hub! ✨') | ||
// console.log('WAAAH', /Chrome/.test(navigator.userAgent)) | ||
}) | ||
@@ -24,3 +25,7 @@ | ||
} else if (s.compute() > start) { | ||
reload() | ||
// if (!/Chrome/.test(navigator.userAgent)) { | ||
reload() | ||
// } else { | ||
// setTimeout(reload, 1000) | ||
// } | ||
} | ||
@@ -27,0 +32,0 @@ }) |
150690
1427