estools / escodegen

ECMAScript code generator
BSD 2-Clause "Simplified" License
2.64k stars 334 forks source link

browser file in NPM #431

Closed jcubic closed 1 year ago

jcubic commented 3 years ago

It's impossible to use library from CDN service like https://cdn.jsdelivr.net/npm/escodegen/ because browser file is missing in NPM. NPM is not only for node.

photopea commented 1 year ago

Me too, I would like to find a Javascript library of Escodegen which can be used in a web browser.

It would be nice if your Demo supported "await": https://estools.github.io/escodegen/demo/index.html

@jcubic did you find a browser version of the latest Escodegen anywhere?

jcubic commented 1 year ago

@photopea I've created one using browserify and I host it on my "private CDN" using jsDelivr.

https://cdn.jsdelivr.net/gh/jcubic/static/js/escodegen.min.js

In one of my projects, I use this combo: esprima, escodegen, and estraverse to modify the source code.

https://cdn.jsdelivr.net/combine/gh/jcubic/static/js/esprima.min.js,gh/jcubic/static/js/estraverse.min.js,gh/jcubic/static/js/escodegen.min.js

jcubic commented 1 year ago

I think that I can close it no one cares, including me.

photopea commented 1 year ago

Thanks a lot!