Skip to content

Instantly share code, notes, and snippets.

@kossnocorp
Created September 29, 2015 04:37
Show Gist options
  • Select an option

  • Save kossnocorp/716afae0cb66698aa127 to your computer and use it in GitHub Desktop.

Select an option

Save kossnocorp/716afae0cb66698aa127 to your computer and use it in GitHub Desktop.
Problem with semicolons

Given code:

const bowerJSONPath = path.join(process.cwd(), 'bower.json')
const packageJSONPath = path.join(process.cwd(), 'package.json')

[bowerJSONPath, packageJSONPath].forEach((packagePath) => {/* */})

… generates such output:

'use strict';

var bowerJSONPath = path.join(process.cwd(), 'bower.json');
var packageJSONPath = path.join(process.cwd(), 'package.json')[(bowerJSONPath, packageJSONPath)].forEach(function (packagePath) {/* */});

Problem is here:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment