Closed mlewand closed 8 years ago
Yup, I'm totally on board for this.
I'd like to introduce the Babel compiler to the build process so we can use its module architecture (among other goodies): https://babeljs.io/
It would be sweet to use some ES6 goodies with Babel, so it's great idea. Would you create a separate issue for it? So we won't forget it.
An update.
Selenium conversion work is done. I'm now moving the master branch over to a babel/browserify architecture that will allow us to build customized quail versions with targeted build scripts:
I just committed the babelify branch to master. This moves Quail into a module structure.
I'm beginning work now on a configurable build that will allow an author to define a version of Quail with only the tests that are needed.
I've pulled Quail apart into modules that can be built together using a script.
https://github.com/quailjs/quail/pull/386
We'll continue to refine this, but we should now be able to put together a custom build for CKEditor.
The code must be better split into modules to enhance separation of concerns, testability and maintainability. Additionally, this will make the code easier to understand, more likely to attract new contributors.
Right now we have a lot of stuff packed into main Quail object.
Quail object
quail.isDataTable
,quail.containsReadableText
Instead we'd like to extract these things to a dedicated modules, so that Quail represents only app and works on abstracted components, hiding all the implementation details in proper types.
Utilities
Methods like
isDataTable
should simply go toquail.utils.tables.isDataTable
,containsReadableText
toquail.utils.element.containsReadableText
.Selectors
I'd say that selectors definitely deserve their own namespace, so they would simply be grouped in
quail.selectors
.Low Level Stuff
Low level implementation (fetching jsons, assigning assessments) should be implemented in their relevant types.