carbon-design-system / carbon-icons

SVG icon library for the Carbon Design System
https://www.carbondesignsystem.com/guidelines/iconography/library
Apache License 2.0
86 stars 53 forks source link

Latest version of carbon-icons contains es6 code #60

Closed Licen-it closed 6 years ago

Licen-it commented 6 years ago

I have a project that has a dependency on carbon-icons version 6.3.0.

There is a file called carbon-icons.js in the dist folder that contains ES6 code and is currently breaking the unit tests of my project.

PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
  SyntaxError: Unexpected token '>'
  at tests/ui/test_index.js:49717 <- webpack:///~/carbon-icons/dist/carbon-icons.js:2649:0

This seems to be caused by the following arrow function (code from node_module folder)

function camelCaseFromHyphnated(s) {
  return s.replace(/-+([A-z])/g, (match, token) => token.toUpperCase());
}