TypeViews is a very simple application written in TypeScript. It uses my other project "PureViews" as a base to create what is effectively a browser-only version of a React.js-like web components framework (with my fewer features).
There were some shortcuts that were made for time purposes. This was written in a day.
The following classes are used within this project:
-
View (An extendable class for creating "Components")
-
ViewDataSource (Stores data, fires events when values are changed)
-
Eventful (contains all event-related methods)
-
ObjectPathResolver (contains all abstracted key reference utilities)
-
DataSourceLink (used to allow a DataSource within a DataSource)
-
DOMUtilities (A collection of DOM utilities)
Each of these can be found within the app/fx/
directory.
Examples of views can be found inside `app/views/
Your main page is the index.html
file
If you don't already have it, you'll need to install typescript
using npm
.
npm install -g typescript
Navigate to the app/
directory in your terminal and execute the following:
tsc -w
This will build the application and watch for any changes.
There's a mini web server that comes with the source which can be used for testing the application.
If tsc
is watching for changes, open a second terminal so you don't interrupt tsc
.
Execute the following for the first run ever:
npm install
node server.js
For subsequent server starts, you can juse execute node server.js
in the root directory