stream 2.2.0

  • README.md
  • Installing
  • Versions
  • 57

Stream #

Stream is a Dart web server supporting request routing, filtering, template engine, WebSocket, MVC design pattern and file-based static resources.

Stream is distributed under an Apache 2.0 License.

Build Status

Installation #

Add this to your pubspec.yaml (or create it):

dependencies:
  stream:

Usage #

Compile RSP (Rikulo Stream Page) to dart files #

There are two ways to compile RSP files into dart files: automatic building with Dart Editor or manual compiling.

RSP is a template technology allowing developers to create dynamically generated web pages based on HTML, XML or other document types (such as this and this). Please refer to here for more information.

Build with Dart Editor #

To compile your RSP files automatically, you just need to add a build.dart file in the root directory of your project, with the following content:

import 'package:stream/rspc.dart';
void main(List<String> arguments) {
  build(arguments);
}

With this build.dart script, whenever your RSP is modified, it will be re-compiled.

Compile Manually #

To compile a RSP file manually, run rspc (RSP compiler) to compile it into the dart file with command line interface as follows:

dart -c lib/rspc.dart -n dir1 dir2 file1 fire2...

A dart file is generated for each RSP file you gave. Fore more options, please run:

dart -c lib/rspc.dart -h

Notes to Contributors #

Fork Stream #

If you'd like to contribute back to the core, you can fork this repository and send us a pull request, when it is ready.

Please be aware that one of Stream's design goals is to keep the sphere of API as neat and consistency as possible. Strong enhancement always demands greater consensus.

If you are new to Git or GitHub, please read this guide first.

Who Uses #

  • Quire - a simple, collaborative, multi-level task management tool.
  • Keikai - a sophisticated spreadsheet for big data

Use this package as an executable

1. Install it

You can install the package from the command line:


$ pub global activate stream

2. Use it

The package has the following executables:


$ rspc

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  stream: ^2.2.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:stream/stream.dart';
  
Version Uploaded Documentation Archive
2.2.0 Feb 14, 2019 Go to the documentation of stream 2.2.0 Download stream 2.2.0 archive
2.1.0 Nov 14, 2018 Go to the documentation of stream 2.1.0 Download stream 2.1.0 archive
2.0.3 Oct 19, 2018 Go to the documentation of stream 2.0.3 Download stream 2.0.3 archive
2.0.2 Oct 15, 2018 Go to the documentation of stream 2.0.2 Download stream 2.0.2 archive
2.0.1+1 Sep 7, 2018 Go to the documentation of stream 2.0.1+1 Download stream 2.0.1+1 archive
2.0.1 Aug 22, 2018 Go to the documentation of stream 2.0.1 Download stream 2.0.1 archive
2.0.0+1 Aug 14, 2018 Go to the documentation of stream 2.0.0+1 Download stream 2.0.0+1 archive
2.0.0 Aug 10, 2018 Go to the documentation of stream 2.0.0 Download stream 2.0.0 archive
1.7.0+4 Aug 21, 2018 Go to the documentation of stream 1.7.0+4 Download stream 1.7.0+4 archive
1.7.0+3 Jun 22, 2018 Go to the documentation of stream 1.7.0+3 Download stream 1.7.0+3 archive

All 122 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
68
Health:
Code health derived from static analysis. [more]
30
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
57
Learn more about scoring.

We analyzed this package on Apr 25, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.2.0
  • pana: 0.12.14

Platforms

Detected platforms: other

Primary library: package:stream/stream.dart with components: io, mirrors.

Health suggestions

Fix lib/src/server.dart. (-19.39 points)

Analysis of lib/src/server.dart reported 43 hints, including:

line 10 col 1: Prefer using /// for doc comments.

line 31 col 3: Prefer using /// for doc comments.

line 96 col 38: Use = to separate a named parameter from its default value.

line 102 col 3: Prefer using /// for doc comments.

line 106 col 22: Use = to separate a named parameter from its default value.

Fix lib/src/connect.dart. (-13.53 points)

Analysis of lib/src/connect.dart reported 29 hints, including:

line 6 col 1: Prefer using /// for doc comments.

line 17 col 3: Prefer using /// for doc comments.

line 24 col 3: Prefer using /// for doc comments.

line 29 col 3: Prefer using /// for doc comments.

line 36 col 3: Prefer using /// for doc comments.

Fix lib/src/plugin/loader.dart. (-11.33 points)

Analysis of lib/src/plugin/loader.dart reported 24 hints, including:

line 6 col 1: Prefer using /// for doc comments.

line 22 col 3: Prefer using /// for doc comments.

line 26 col 3: Prefer using /// for doc comments.

line 31 col 1: Prefer using /// for doc comments.

line 41 col 3: Prefer using /// for doc comments.

Fix additional 12 files with analysis or formatting issues. (-69.62 points)

Additional issues in the following files:

  • lib/src/rspc/tag.dart (21 hints)
  • lib/src/rspc/compiler.dart (20 hints)
  • lib/src/server_impl.dart (20 hints)
  • lib/src/plugin/router.dart (19 hints)
  • lib/src/rspc/build.dart (17 hints)
  • lib/src/rspc/tag_util.dart (16 hints)
  • lib/src/connect_impl.dart (15 hints)
  • lib/src/rsp_util.dart (11 hints)
  • lib/src/rspc/main.dart (3 hints)
  • lib/proxy.dart (2 hints)
  • lib/src/plugin/loader_impl.dart (1 hint)
  • bin/rspc.dart (Run dartfmt to format bin/rspc.dart.)

Maintenance issues and suggestions

Provide a file named CHANGELOG.md. (-20 points)

Changelog entries help developers follow the progress of your package. See the example generated by stagehand.

Documentation URL is insecure. (-5 points)

Update the documentation field and use a secure (https) URL.

Homepage URL is insecure. (-5 points)

Update the homepage field and use a secure (https) URL.

Maintain an example.

None of the files in the package's example/ directory matches known example patterns.

Common filename patterns include main.dart, example.dart, and stream.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
args >=0.13.0 <2.0.0 1.5.1
charcode >=1.1.0 <2.0.0 1.1.2
http >=0.11.0 <2.0.0 0.12.0+2
logging >=0.11.0 <2.0.0 0.11.3+2
path >=1.3.0 <2.0.0 1.6.2
rikulo_commons >=3.0.0 <4.0.0 3.1.3
Transitive dependencies
async 2.2.0
collection 1.14.11
http_parser 3.1.3
meta 1.1.7
mime 0.9.6+2
pedantic 1.5.0
source_span 1.5.5
string_scanner 1.0.4
term_glyph 1.1.0
typed_data 1.1.6