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

Support es6 syntax features part 1 #229

Conversation

BasBastian
Copy link

@BasBastian BasBastian commented Mar 6, 2022

The next part of changes

Please check #228 first and then advise. Contains the same set of (possibly) breaking changes


  • based on: feature/transpile-babel-to-umd
  • modules remodelled in order to improve readability
  • ES6 classes used for TTML doc elements (node-types directory)
  • removed "vars", replaced with "const" and "let"
  • moved "./names.js" to "./doc-parser/namespaces.js"
  • fixed JSDoc comments (they were not JSDoc, because of spaces and asterisks missing)
  • reordered variable declarations wherever linter pointed out the issue

BasBastian added 2 commits March 6, 2022 12:50
This is an effort towards making this a Typescript library
* added Babel.js in the process (merged with browserify)
* preserved the compilation process
* replaced legacy JSHint with JSLint
* ensured that tests passes in QUnit
* extracted error reporting functions into a separate error.js file
* converted files into ESModules (the compilation target is still UMD though)
* preserved the way that sax is included in "imsc.all.*" build and excluded from "imsc.*" builds

--

Todos:
* extract IMSC objects classes into separate file
* move to the Typescript compiler (google-closure-compiler can still be used for minification)
* extract proper TS interfaces
* export types and extract to *.d.ts definition file
* fix potentially buggy code (replacing string with object in array, etc.)
* use ValueObject pattern (immutable IMSC classes with parameter injection via constructor, instead of "initFromNode")
* cloning process improvement
* based on: feature/transpile-babel-to-umd
* modules remodelled in order to improve readability
* ES6 classes used for TTML doc elements (node-types directory)
* removed "vars", replaced with "const" and "let"
* moved "./names.js" to "./doc-parser/namespaces.js"
* fixed JSDoc comments (they were not JSDoc, because of spaces and asterisks missing)
* reordered variable declarations wherever linter pointed out the issue
@BasBastian
Copy link
Author

BasBastian commented Mar 6, 2022

Might solve #214 and #215

Please check this @palemieux @nigelmegitt

@BasBastian BasBastian changed the title Feature/support es6 syntax features part 1 Support es6 syntax features part 1 Mar 7, 2022
@palemieux
Copy link
Contributor

Replaced by #255

@palemieux palemieux closed this May 1, 2024
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 this pull request may close these issues.

None yet

2 participants