Open disnet opened 10 years ago
Any update on this?
I have the same problem using the escodegen.browser.js, but the NODEJS version (installed July 2018) worked fine on the exact same input file. My guess is that my escodegen.browser.js copy is an old copy, before the support for TemplateLiteral was put in.
Looking at the GitHub -> escodegen / test / compare-harmony directory, there looks like lots of tests for Literals. Other tests have been updated within the last few months, so this repository still looks active.
The instructions for creating the escodegen.browser.js failed for me, on a new/clean install.
** Error: Cannot find module "tools/entry-point.js"
unix> find . -name "entry-point.js" -print
yielded no results.
I had to find a copy of escodegen.browser.js floating around somewhere to use (obviously an old version). If anyone has a recent escodegen.browser.js I would appreciate a copy (.min version okay too).
I had to manually create the tools/entry-point.js file (found on this GitHub repository) in my directory. Now it works fine.
If I was a developer and did a full GIT download of this project, this file would have been there. It is not there when just doing a NPM install/init/build.
The harmony branch of esprima supports ES6 template strings but when I pass it to escodegen I get: