Polymer / tools

Polymer Tools Monorepo
BSD 3-Clause "New" or "Revised" License
430 stars 200 forks source link

Build error on Scheme.org metadata #2267

Open ozasadnyy opened 8 years ago

ozasadnyy commented 8 years ago

Description

Build error on Scheme.org metadata. Example of data:

<script type="application/ld+json">
    {
      "@context": "http://schema.org",
      "@type": "Event",
      "name": "GDG DevFest Ukraine 2016",
      "description": "The biggest Google tech conference in Ukraine carefully crafted for you by GDG community! All about Android, Web and Cloud from the world experts",
      "startDate": "2016-09-09T09:00:00+03:00",
      "endDate": "2016-09-10T19:00:00+03:00",
      "url": "https://devfest.gdg.org.ua/",
      "location": {
        "@type" : "Place",
        "name" : "Pivdennyi Expo Center",
        "address": "36 Shchyretska St, Lviv, Ukraine"
      }
    }
  </script>

Versions & Environment

No error is throw

Actual Results

info:    Building application...
warn:    Unable to optimize .js file /Users/ozasadnyy/development/web/hoverboard/index.html_script_1.js 
{ err: 
   { message: 'SyntaxError: Unexpected token: punc (:)',
     filename: 0,
     line: 3,
     col: 16,
     pos: 23,
     stack: 'Error\n    at new JS_Parse_Error (eval at <anonymous> (/usr/local/lib/node_modules/polymer-cli/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:1545:18)\n    at js_error (eval at <anonymous> (/usr/local/lib/node_modules/polymer-cli/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:1553:11)\n    at croak (eval at <anonymous> (/usr/local/lib/node_modules/polymer-cli/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2092:9)\n    at token_error (eval at <anonymous> (/usr/local/lib/node_modules/polymer-cli/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2100:9)\n    at unexpected (eval at <anonymous> (/usr/local/lib/node_modules/polymer-cli/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2106:9)\n    at semicolon (eval at <anonymous> (/usr/local/lib/node_modules/polymer-cli/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2126:56)\n    at simple_statement (eval at <anonymous> (/usr/local/lib/node_modules/polymer-cli/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2317:73)\n    at eval (eval at <anonymous> (/usr/local/lib/node_modules/polymer-cli/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2167:47)\n    at eval (eval at <anonymous> (/usr/local/lib/node_modules/polymer-cli/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2139:24)\n    at block_ (eval at <anonymous> (/usr/local/lib/node_modules/polymer-cli/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2432:20)' } }
info:    Generating build/unbundled...
info:    Generating build/bundled...
info:    Build complete!
justinfagnani commented 8 years ago

Sounds like we're feeding this to uglify.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.