Status: In Development
While the majority of major tasks have been completed, there is still a number of bugs to be fixed
- Dart bindings for the Paperback Source models
- Make
Sourcemethods returnFutureinstead of JS'sPromise, which would allow the keywordawaitto be used. - Allow certain class methods to interop with JavaScript via
allowInteropCaptureThis- Register any source and its methods with
allowInteropCaptureThis
- Register any source and its methods with
- Allow source info to be accessed from JavaScript
- Register any source info with dart:js'
context
- Register any source info with dart:js'
- Dart Toolchain CLI
- Bundle
- Serve
- Homepage generation
- Testing
- Documentation
- Template repository
- Run on iOS' JavaScriptCore
Common models for extensions used by Paperback v0.6 - v0.7, written in Dart.
Write extensions using Dart, a modern language with a strick type system and sound null safety.
The only exception is that the return types of methods annotated with @JS() are not validated
during runtime, so an incorrect type may "leak" into other Dart code and violate type system guarantees.
For any calls into JavaScript code that are not known to be safe in their return values, validate
the results manually with is checks.
Sources were a highly requested feature for Paperback as it allows users to read manga that are otherwise not on Paperback (The default source of the app). The sources are community-driven, and may be updated and changed without requiring an application update. This allows for a rolling development process, implementing changes as they come in, rather than waiting for the application developer to implement new sources and bugfixes.
TODO: Example usage will be provided once the dart cli is implemented.
Instead of using/porting Cheerio to Dart, we use the html package to
parse HTML. The Parser object is provided by the parent class. If you prefer to use Cheerio, you can create the JS bindings yourself following the
js package's README. I did not implement it because of the complexity
of Cheerio's API, it is much easier to use the html package.
To find out more about developing a source, check out the website, use one of the current implementations in the repo as an example, and/or be sure to ask in the Discord!