peggy icon indicating copy to clipboard operation
peggy copied to clipboard

Non minified release / build ?

Open devnewton opened this issue 3 years ago • 2 comments

I would like to use a readable / non minified version of Peggy. How can I build it from source ?

npm run-scripts make / build always construct a minified version.

devnewton avatar Jul 25 '22 08:07 devnewton

Do you want to use it on the web, or in node? All of the build steps take lib/**/*.js and transform and minify them, with the entry point being lib/peg.js. The minified files aren't used at all in node. If you're going to do your own build stuff for the web, you should just be able to npm install peggy and treat it like any other dependency, but if that doesn't work, we'll fix it.

Another big thing: you often don't need Peggy as a runtime dependency. Unless you need to compile dynamic grammar files on the fly (like the online editor), it's usually MUCH better to pre-compile your grammar using the Peggy CLI as a devDependency.

hildjj avatar Jul 25 '22 15:07 hildjj

You can npm install peggy then just take the min file from node_modules/peggy/browser/peggy.min.js, or just point the script tag to there.

AlexGellert avatar Aug 15 '22 18:08 AlexGellert

Closing because no response to questions. Please reopen if you want more information.

hildjj avatar Mar 01 '23 15:03 hildjj