Skip to content

Commit

Permalink
fix(www): move docs-source to www/docs
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyrota committed Oct 1, 2020
1 parent 33489a8 commit 292b671
Show file tree
Hide file tree
Showing 28 changed files with 453 additions and 580 deletions.

This file was deleted.

49 changes: 12 additions & 37 deletions docs/introduction.md → docs/00-introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,15 @@
4. [<code>Supported Languages</code>](#supported-languages)
5. [<code>Size</code>](#bundle-size)</details>

AwakenJS is an extensive and lightweight observable library inspired by the
[callbag spec](https:\/\/staltz.com\/why-we-need-callbags.html) and [rxjs](https:\/\/rxjs-dev.firebaseapp.com\/guide\/overview). It provides composable utilities to build
event-driven applications, allowing for the creation, transformation and
consumption of event streams. This is accomplished through the core types
provided by AwakenJS:
AwakenJS is an extensive and lightweight observable library inspired by the [callbag spec](https:\/\/staltz.com\/why-we-need-callbags.html) and [rxjs](https:\/\/rxjs-dev.firebaseapp.com\/guide\/overview). It provides composable utilities to build event-driven applications, allowing for the creation, transformation and consumption of event streams. This is accomplished through the core types provided by AwakenJS:

- <b><code>Source</code></b> - represents a series of future events which can be subscribed to.
- <b><code>Sink</code></b> - used to consume Sources - that is, a Sink can be used to subscribe
to the events emitted by a given Source.
- <b><code>Event</code></b> - there are three types of events: Push events which push a value,
Error events which carry an error and End events which are the last events emitted by a Source.
- <b><code>Operator</code></b> - used to transform one Source to another Source, for example:
map, filter, debounce, etc.
- <b><code>Disposable</code></b> - acts as a subscription given to Sources and other actions
which can be cancelled through its disposal.
- <b><code>Subject</code></b> - both a Source and Sink - allows for a controlled distribution of
events to many concurrent consumers.
- <b><code>ScheduleFunction</code></b> - used to schedule events and in general callbacks \(for example,
to tell a source to emit an event every 100ms\).
- <b><code>Sink</code></b> - used to consume Sources - that is, a Sink can be used to subscribe to the events emitted by a given Source.
- <b><code>Event</code></b> - there are three types of events: Push events which push a value, Error events which carry an error and End events which are the last events emitted by a Source.
- <b><code>Operator</code></b> - used to transform one Source to another Source, for example: map, filter, debounce, etc.
- <b><code>Disposable</code></b> - acts as a subscription given to Sources and other actions which can be cancelled through its disposal.
- <b><code>Subject</code></b> - both a Source and Sink - allows for a controlled distribution of events to many concurrent consumers.
- <b><code>ScheduleFunction</code></b> - used to schedule events and in general callbacks \(for example, to tell a source to emit an event every 100ms\).

## <a name="motivation"></a>Motivation

Expand All @@ -54,32 +44,17 @@ yarn add @awaken/core

## <a name="supported-languages"></a>Supported Languages

AwakenJS is written in [TypeScript](https:\/\/www.typescriptlang.org\/), a superset of JavaScript, and provides
TypeScript typings out-of-the-box. There are no flow typings as it is a
complex task to automatically generate them from the TypeScript source files
due to the fact that flow shares it's type namespace with it's variable
namespace, meaning there are several collisions after conversion.
AwakenJS is written in [TypeScript](https:\/\/www.typescriptlang.org\/), a superset of JavaScript, and provides TypeScript typings out-of-the-box. There are no flow typings as it is a complex task to automatically generate them from the TypeScript source files due to the fact that flow shares it's type namespace with it's variable namespace, meaning there are several collisions after conversion.

Because TypeScript is a superset of JavaScript and conversion between the two
for small examples is trivial, the examples shown in this documentation are
written in TypeScript.
Because TypeScript is a superset of JavaScript and conversion between the two for small examples is trivial, the examples shown in this documentation are written in TypeScript.

## <a name="bundle-size"></a>Size

The current version of @awaken\/core is
<code>8.813Kb</code> large when compressed using [brotli](https:\/\/caniuse.com\/brotli) at
the highest compression level.
The current version of @awaken\/core is <code>8.813Kb</code> large when compressed using [brotli](https:\/\/caniuse.com\/brotli) at the highest compression level.

> <b>Note</b>: This size includes all of the 100+ exports provided by this library.
> In reality, your final bundle size will be a fraction of that number because
> you are unlikely to use all of the exports.
> <b>Note</b>: This size includes all of the 100+ exports provided by this library. In reality, your final bundle size will be a fraction of that number because you are unlikely to use all of the exports.
All of the packages are [tree shakeable](https:\/\/webpack.js.org\/guides\/tree-shaking\/), so if your bundler
supports tree shaking then you can pull all in the exports you need without
worrying about bundling the entire library. Because this library is tree
shakable, all exports for each package are exported at the index location of
that package. For example, to import some core variables, you would simply
import them from <code>@awaken\/core</code>:
All of the packages are [tree shakeable](https:\/\/webpack.js.org\/guides\/tree-shaking\/), so if your bundler supports tree shaking then you can pull all in the exports you need without worrying about bundling the entire library. Because this library is tree shakable, all exports for each package are exported at the index location of that package. For example, to import some core variables, you would simply import them from <code>@awaken\/core</code>:

```ts
import { Source, Sink, subscribe, pipe, range, takeWhile } from '@awaken/core';
Expand Down
File renamed without changes.
Loading

0 comments on commit 292b671

Please sign in to comment.