-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from canjs/dev-rel-12-update-generated-readmes
Remove generated API docs from the README
- Loading branch information
Showing
2 changed files
with
98 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# Contributing to can-ndjson-stream | ||
|
||
Check out the [contribution guide on CanJS.com](https://canjs.com/doc/guides/contribute.html) for information on: | ||
|
||
- [Code of Conduct](https://canjs.com/doc/guides/contribute.html#CodeofConduct) | ||
- [Getting Help](https://canjs.com/doc/guides/contribute.html#GettingHelp) | ||
- [Project Organization](https://canjs.com/doc/guides/contributing/project-organization.html) | ||
- [Reporting Bugs](https://canjs.com/doc/guides/contributing/bug-report.html) | ||
- [Suggesting Features](https://canjs.com/doc/guides/contributing/feature-suggestion.html) | ||
- [Finding Ways to Contribute](https://canjs.com/doc/guides/contributing/finding-ways-to-contribute.html) | ||
|
||
The rest of this guide has information that’s specific to this repository. | ||
|
||
## Developing Locally | ||
|
||
This section will walk you through setting up the [repository](https://github.com/canjs/can-ndjson-stream) on your computer. | ||
|
||
### Signing up for GitHub | ||
|
||
If you don’t already have a GitHub account, you’ll need to [create a new one](https://help.github.com/articles/signing-up-for-a-new-github-account/). | ||
|
||
### Forking & cloning the repository | ||
|
||
A “fork” is a copy of a repository in your personal GitHub account. “Cloning” is the process of getting the repository’s source code on your computer. | ||
|
||
GitHub has a guide for [forking a repo](https://help.github.com/articles/fork-a-repo/). To fork can-ndjson-stream, you can start by going to its [fork page](https://github.com/canjs/can-ndjson-stream/fork). | ||
|
||
Next, you’ll want to clone the repo. [GitHub’s cloning guide](https://help.github.com/articles/cloning-a-repository/) explains how to do this on Linux, Mac, or Windows. | ||
|
||
GitHub’s guide will [instruct you](https://help.github.com/articles/fork-a-repo/#step-2-create-a-local-clone-of-your-fork) to clone it with a command like: | ||
|
||
```shell | ||
git clone https://github.com/YOUR-USERNAME/can-ndjson-stream | ||
``` | ||
|
||
Make sure you replace `YOUR-USERNAME` with your GitHub username. | ||
|
||
### Installing the dependencies | ||
|
||
After you’ve forked & cloned the repository, you’ll need to install the project’s dependencies. | ||
|
||
First, make sure you’ve [installed Node.js and npm](https://docs.npmjs.com/getting-started/installing-node). | ||
|
||
If you just cloned the repo from the command line, you’ll want to switch to the folder with your clone: | ||
|
||
```shell | ||
cd can-ndjson-stream | ||
``` | ||
|
||
Next, install the project’s dependencies with npm: | ||
|
||
```shell | ||
npm install | ||
``` | ||
|
||
### Starting the development server | ||
|
||
Run the following to start a dev server: | ||
|
||
```shell | ||
npm run develop | ||
``` | ||
|
||
### Running the tests | ||
|
||
You can manually run this repository’s tests in any browser by starting the dev server (see the section above) and visiting this page: http://localhost:8080/test/test.html | ||
|
||
Firefox is used to run the repository’s automated tests from the command line. If you don’t already have it, [download Firefox](https://www.mozilla.org/en-US/firefox/new/). Mozilla has guides for installing it on [Linux](https://support.mozilla.org/t5/Install-and-Update/Install-Firefox-on-Linux/ta-p/2516), [Mac](https://support.mozilla.org/t5/Install-and-Update/How-to-download-and-install-Firefox-on-Mac/ta-p/3453), and [Windows](https://support.mozilla.org/t5/Install-and-Update/How-to-download-and-install-Firefox-on-Windows/ta-p/2210). | ||
|
||
After Firefox is installed, you can run: | ||
|
||
```shell | ||
npm test | ||
``` | ||
|
||
### Making a build | ||
|
||
Run the following command to create a build: | ||
|
||
```shell | ||
npm run build | ||
``` | ||
|
||
This will create a `dist/` folder that contains the AMD, CommonJS, and global module versions of the project. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,28 @@ | ||
# can-ndjson-stream | ||
|
||
[![Join the chat at https://gitter.im/canjs/canjs](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/canjs/canjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/canjs/can-ndjson-stream/blob/master/license.md) | ||
[![npm version](https://badge.fury.io/js/can-ndjson-stream.svg)](https://www.npmjs.com/package/can-ndjson-stream) | ||
[![Travis build status](https://travis-ci.org/canjs/can-ndjson-stream.svg?branch=master)](https://travis-ci.org/canjs/can-ndjson-stream) | ||
[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/github/canjs/can-ndjson-stream?branch=master&svg=true)](https://ci.appveyor.com/project/matthewp/can-ndjson-stream) | ||
[![Coverage status](https://coveralls.io/repos/github/canjs/can-ndjson-stream/badge.svg?branch=master)](https://coveralls.io/github/canjs/can-ndjson-stream?branch=master) | ||
[![Greenkeeper badge](https://badges.greenkeeper.io/canjs/can-ndjson-stream.svg)](https://greenkeeper.io/) | ||
|
||
[![Build Status](https://travis-ci.org/canjs/can-ndjson-stream.png?branch=master)](https://travis-ci.org/canjs/can-ndjson-stream) | ||
|
||
[![Build Status](https://saucelabs.com/browser-matrix/can-ndjson-stream.svg)](https://saucelabs.com/beta/builds/270fe2884b8940f68684fae62c89c39e) | ||
|
||
|
||
Most web applications encounter problems of latency because they process data discretely instead of in streams. `ndjsonstream()` converts a ReadableStream of raw ndjson data into a ReadableStream of Javascript objects. | ||
|
||
## Demo | ||
|
||
All the demo code can be found in the `demo/` directory. | ||
|
||
1. To get started, run the demo server. | ||
## Documentation | ||
|
||
```shell | ||
cd demo | ||
node server.js | ||
``` | ||
Read the [can-ndjson-stream API docs on CanJS.com](https://canjs.com/doc/can-ndjson-stream.html). | ||
|
||
2. Navigate to localhost:8080/demo/can-ndjson-stream.html to see the demo in action. | ||
|
||
3. Check out the demo code in `demo/can-ndjson-stream.html`. | ||
|
||
![ndjsonStream Visual](ndjsonStream.gif) | ||
## Changelog | ||
|
||
See the [latest releases on GitHub](https://github.com/canjs/can-ndjson-stream/releases). | ||
|
||
## Contributing | ||
|
||
### Making a Build | ||
|
||
To make a build of the distributables into `dist/` in the cloned repository run | ||
|
||
``` | ||
npm install | ||
node build | ||
``` | ||
The [contribution guide](https://github.com/canjs/can-ndjson-stream/blob/master/CONTRIBUTING.md) has information on getting help, reporting bugs, developing locally, and more. | ||
|
||
### Running the tests | ||
## License | ||
|
||
Tests can run in the browser by opening a webserver and visiting the `test.html` page. | ||
Automated tests that run the tests from the command line in Chrome can be run with | ||
[MIT](https://github.com/canjs/can-ndjson-stream/blob/master/license.md) | ||
|
||
``` | ||
npm test | ||
``` |