ref: a68873a108d20a6a49a1b6caf374bfb2cf6a94fe fanboi2/assets/app/javascripts/models/topic.ts -rw-r--r-- 2.0 KiB
Coding style cleanups and setup pre-commit hooks (#42)

Cleanup components and README.

* Update README for current development process.
* Enable strictNullChecks in TypeScript and update accordingly.
* Use new naming convention for element variables in TypeScript.
Component cleanups.

* Cleanup className manipulation in components.
* Consolidate loadingState tracking to its own class.
* Throttle resize event to reduce resource usage.
Allow passing HTTP request body in request.
Handle error object in TypeScript model.

If the returned response is an `error` object, the model will now
throw `ResourceError`. The model also now assert types before attempt
to serialize the data.
Add base class and cleanup imports in TypeScripts.
Move from whatwg-fetch to XMLHttpRequest.

Since whatwg-fetch currently doesn't support cancellation and
we need to be able to cancel the request. This commit replace
whatwg-fetch and any code that relies on it to use XHR with
cancellation token.
Use Typings instead of TSD.

TSD is now deprecated. See also GitHub issue:
Semantic cleanups for TypeScript files.
Convert assets to use ECMAScript 5.1 with TypeScript.

As using ECMAScript 6 with TypeScript currently feel a little bit
premature (especially on tooling front.) This change also make
the compiled assets much smaller (by half) since babel-polyfill
is no longer required.
Styling cleanups for TypeScript components.

Use two empty lines between import and classes. Rename class name
for view for consistency with future views.
Initial implementation for board selector.

Board list in board selector are now created via data retrieved
from API instead of bundling inside HTML page. Since board selector
are not always needed.
Project directory restructure.

Move resources out of fanboi2 package into its own "assets" directory
in order to make fanboi2 package consist mostly of Python-related

Sample configuration are also moved to examples/ directory with
a README accordingly.
Use npm to manage vendor assets and add tsd.

Vendor assets are now managed by npm and bundled using browserify
instead of concating files inside vendor/ directory. This change
should allow for much cleaner and easier package management.

TypeScript definitions are now loaded using tsd instead of placing
a file inside vendor/ except for whatwg-fetch which need a little
modification to support ES2015 Promise.
Initial JavaScript models wrapping the API.

These models will be used for retrieving data for rendering with
JavaScript components.