const execa = require('execa');
const Listr = require('listr');

const tasks = new Listr([
  {
    title: '🗑  Purge old assets',
    task: () => execa.shell("./tasks/subtasks/cleanAssets.sh")
  },
  {
    title: '🕓  Watching...',
    task: () => {
      return new Listr([
        {
          title: '🚧  Compiling new CSS changes',
          task: () => execa.shell("./tasks/subtasks/stylesWatch.sh")
        },
        {
          title: '🚧  Compiling new JS changes',
          task: () => execa.shell("./tasks/subtasks/scriptsWatch.sh")
        },
        {
          title: '🏞  Compiling sprite changes',
          task: () => execa.shell("node ./tasks/subtasks/watchSprite.js")
        },
        {
          title: '🖥  Running Browsersync at http://localhost:3000',
          task: () => execa("./tasks/subtasks/browsersync.sh")
        }
      ], { concurrent: true });
    }
  }
]);

tasks.run().then(msg => {
  console.log(msg);
}).catch(err => {
  console.error(err.message);
});

@@ -56,16 +56,42 @@
 listr');
+%0Aconst os = require('os');
 %0A%0Aconst 
@@ -740,17 +740,17 @@
  title: 
-'
+%60
 %F0%9F%96%A5  Runni
@@ -788,17 +788,35 @@
 ost:3000
-'
+ and $%7BexternalIp%7D%60
 ,%0A      
@@ -1023,12 +1023,398 @@
 ssage);%0A
-
 %7D);%0A
+%0A/**%0A * Get IP address for external Browsersync address%0A */%0Alet interfaces = os.networkInterfaces();%0Alet ipAddresses = %5B%5D;%0Afor (let k in interfaces) %7B%0A  for (let k2 in interfaces%5Bk%5D) %7B%0A    let address = interfaces%5Bk%5D%5Bk2%5D;%0A    if (address.family === 'IPv4' && !address.internal) %7B%0A      ipAddresses.push(address.address);%0A    %7D%0A  %7D%0A%7D%0A%0Aconst externalIp = %60http://$%7BipAddresses%5B0%5D%7D:3000%60;%0A

Add external browsersync address