Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Readme doesn't include "es" format #71

Closed
GreenImp opened this issue Apr 18, 2021 · 9 comments · Fixed by #85
Closed

Readme doesn't include "es" format #71

GreenImp opened this issue Apr 18, 2021 · 9 comments · Fixed by #85
Assignees

Comments

@GreenImp
Copy link

The description of the format option, in the readme file is:

--format — format of the generated parser: amd, commonjs, globals, umd (default: commonjs)

But Peggy includes an es option as well.

It's worth noting that the CLI documentation does have the es type listed:

Format of the generated parser: amd, commonjs, globals, umd, es (default: commonjs).

But, the dependencies section for the JS API says:

valid only when format is set to "amd", "commonjs", or "umd"

Where it should include es" in the list.

I could try and get a PR in to fix these things, but I'm not sure when I'll get the time to do so.

@hildjj hildjj self-assigned this Apr 18, 2021
hildjj added a commit to hildjj/peggy that referenced this issue Apr 18, 2021
hildjj added a commit to hildjj/peggy that referenced this issue Apr 18, 2021
@hildjj
Copy link
Contributor

hildjj commented Apr 18, 2021

Waiting on monorepo branch

@hildjj hildjj mentioned this issue Apr 19, 2021
@StoneCypher
Copy link
Contributor

Requesting the use of the token es2015 to be in keeping with ts, rollup, webpack, rome, etc

Hildjj suggested maintaining es as a synonym, seems fine

@hildjj
Copy link
Contributor

hildjj commented Apr 19, 2021

Rollup seems to use es? https://rollupjs.org/guide/en/#outputformat

@hildjj
Copy link
Contributor

hildjj commented Apr 19, 2021

Webpack seems to use module: https://webpack.js.org/configuration/output/#librarytarget-module

@hildjj
Copy link
Contributor

hildjj commented Apr 19, 2021

I can't figure out what rome is using; they're not doing bundling yet, right?

@StoneCypher
Copy link
Contributor

... huh. i wonder if es2015 is a synonym in rollup now

i guess i'm just wrong about webpack

it's es2015 in typescript because there are subtle differences already for es2018, because it can collide conceptually with the old es4x module notation, and because there's good reason to believe either es9 or es10 will include types, which will change the export spec. i believe typescript is making the right choice.

rome i don't use. it describes itself as a bundler? Rome is a linter, compiler, bundler, and more for JavaScript, TypeScript, JSON, HTML, Markdown, and CSS.\nRome is designed to replace Babel, ESLint, webpack, Prettier, Jest, and others. the reason I expected them to use es2015 is they're written in Typescript and claim complete Typescript compatability, but I was just wrong about rollup, and I can't find it either, so now I'm receding from thinking I know the answer

@StoneCypher
Copy link
Contributor

anyway, if rollup, webpack, and typescript disagree, then i think you can pretty much do what you want

please don't call it prolog

@hildjj
Copy link
Contributor

hildjj commented Apr 19, 2021

How about we just accept our status quo for now, document it, and clean it up later if it becomes a problem. We can always add an alias later.

@StoneCypher
Copy link
Contributor

seems fine. i was just appealing for community norms, and it seems there isn't one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants