ecmarkup icon indicating copy to clipboard operation
ecmarkup copied to clipboard

Support automatically generating Unicode property lists

Open bakkot opened this issue 4 years ago • 4 comments

PRs like https://github.com/tc39/ecma262/pull/1939 and https://github.com/tc39/ecma262/pull/1896 could (and should) be done automatically as part of the tooling.

@mathiasbynens maintains a collection of npm modules which could be used for this. Note that these bump Unicode versions in minor releases, so for this use case we'd want to pin a minor version.

bakkot avatar Apr 26 '20 17:04 bakkot

Alternatively we could commit the relevant data files to ecma262 and add an option in ecmarkup to read a data file passed in on the command line. That probably makes more sense, so that we can update the version in the spec without having to mess with ecmarkup.

bakkot avatar Apr 26 '20 17:04 bakkot

i like passing it in; but I’d hope we don’t have to commit data to 262 to do it - couldn’t we pass the path to one of the npm packages you referenced?

ljharb avatar Apr 26 '20 19:04 ljharb

I'm not really a fan of dynamically loading dependencies, but yes, we probably could.

bakkot avatar Apr 26 '20 19:04 bakkot

I agree that not committing data to tc39/ecma262 seems best.

I noticed this was filed as an ecmarkup issue. We could solve it as this level, or we could add a script to the package.json that outputs the *.html files containing the tables (e.g. npm run build-unicode-properties). The latter seems simpler.

Regardless of where we decide to solve this, we could use the following packages in particular to generate the tables:

  • https://github.com/mathiasbynens/unicode-canonical-property-names-ecmascript
  • https://github.com/mathiasbynens/unicode-property-value-aliases-ecmascript
  • https://github.com/mathiasbynens/unicode-property-aliases-ecmascript

mathiasbynens avatar Apr 27 '20 05:04 mathiasbynens