From ecaa0c322714f4fa6c3893981ae9cf2e5fc5d12c Mon Sep 17 00:00:00 2001 From: tiagomoraismorgado Date: Thu, 30 Nov 2017 14:36:10 +0000 Subject: [PATCH 1/4] [Docs] README.md - separators, thumbnail, styling, toc ## [Docs] README.md - Separators, Thumbnail, Styling, ToC **this PR does basically aim at:** - *adding serparators to README.me file* - *adding thumbnail to README.me file* - *adding styling to README.me file* - *adding toc to README.me file* --- **main motivation behind such:** - *improving overall document accessability* --- **let's make the web better bit by bit** **ever tried, ever failed no matter. try again, fail again, fail better** --- --- README.md | 116 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 70 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index f89b1526d..57f7edb49 100644 --- a/README.md +++ b/README.md @@ -1,110 +1,134 @@ -TogetherJS - Surprisingly easy collaboration -============================================ +## TogetherJS - Surprisingly easy collaboration -What is TogetherJS? ------------------ +Table of Contents (ToC) +========================= -TogetherJS is a service for your website that makes it surprisingly easy to collaborate in real-time. +* [What is TogetherJS](#what-is-together-js) +* [Contributing](#contributing) +* [Bug Reports](#bug-reports) +* [Roadmap & Plans](#roadmap-and-plans) +* [Setting up a development environment](#setting-up-a-development-environment) +* [Running a local server](#running-a-local-server) +* [Testing](#testing) +* [License](#license) -Using TogetherJS two people can interact on the same page, seeing each other's cursors, edits, and browsing a site together. The TogetherJS service is included by the web site owner, and a web site can customize and configure aspects of TogetherJS's behavior on the site. +--- -For more information and to see TogetherJS in action, visit [togetherjs.com](https://togetherjs.com/) +### What is TogetherJS? -If you want to integrate TogetherJS onto your site see [the wiki](https://github.com/mozilla/togetherjs/wiki) and specifically [Getting Started](https://github.com/mozilla/togetherjs/wiki/Developers:-Getting-Started). +TogetherJS is a service for your website that makes it surprisingly easy to collaborate in real-time. -Contributing -============ +Using TogetherJS two people can interact on the same page, seeing each other's cursors, edits, and browsing a site together. The TogetherJS service is included by the web site owner, and a web site can customize and configure aspects of TogetherJS's behavior on the site. -The remainder of this document is about contributing to TogetherJS - but reports, fixes, features, etc. Look back at those other links if you are looking for something else. +For more information and to see TogetherJS in action, visit [togetherjs.com](https://togetherjs.com/) -Bug Reports ------------ +If you want to integrate TogetherJS onto your site see [the wiki](https://github.com/mozilla/togetherjs/wiki) and specifically [Getting Started](https://github.com/mozilla/togetherjs/wiki/Developers:-Getting-Started). -Please submit bug reports as [github issues](https://github.com/mozilla/togetherjs/issues/new). Don't worry about labels or milestones. If you use the in-app feedback to give us a bug report that's fine too. +--- -Roadmap & Plans ---------------- +### Contributing -To see what we're planning or at least considering to do with TogetherJS, look at [see our bug tracker](https://github.com/mozilla/togetherjs/issues?state=open). +The remainder of this document is about contributing to TogetherJS - but reports, fixes, features, etc. Look back at those other links if you are looking for something else. -Setting up a development environment ------------------------------------- +--- -TogetherJS has two main pieces: +### Bug Reports -* The [server](https://github.com/mozilla/togetherjs/blob/develop/hub/server.js), which echos messages back and forth between users. The server doesn't do much, you may gaze upon its incredibly boring [history](https://github.com/mozilla/togetherjs/commits/develop/hub/server.js). +Please submit bug reports as [github issues](https://github.com/mozilla/togetherjs/issues/new). Don't worry about labels or milestones. If you use the in-app feedback to give us a bug report that's fine too. -* The client in [`togetherjs/`](https://github.com/mozilla/togetherjs/tree/develop/togetherjs) which does all the real work. +--- -There is a TogetherJS hub server deployed at `https://hub.togetherjs.com` - and there's little need for other server deployments. If you want to try TogetherJS out we recommend you use our hub server. Note if you include TogetherJS on an https site, you must use an https hub server. +### Roadmap & Plans -The files need to be lightly "built": we use [LESS](http://lesscss.org/) for styles, and a couple files are generated. To develop you need to build the library using [Grunt](http://gruntjs.com/). +To see what we're planning or at least considering to do with TogetherJS, look at [see our bug tracker](https://github.com/mozilla/togetherjs/issues?state=open). -To build a copy of the library, check out TogetherJS: +--- + +### Setting up a development environment + +TogetherJS has two main pieces: + +* The [server](https://github.com/mozilla/togetherjs/blob/develop/hub/server.js), which echos messages back and forth between users. The server doesn't do much, you may gaze upon its incredibly boring [history](https://github.com/mozilla/togetherjs/commits/develop/hub/server.js). + +* The client in [`togetherjs/`](https://github.com/mozilla/togetherjs/tree/develop/togetherjs) which does all the real work. + +There is a TogetherJS hub server deployed at `https://hub.togetherjs.com` - and there's little need for other server deployments. If you want to try TogetherJS out we recommend you use our hub server. Note if you include TogetherJS on an https site, you must use an https hub server. + +The files need to be lightly "built": we use [LESS](http://lesscss.org/) for styles, and a couple files are generated. To develop you need to build the library using [Grunt](http://gruntjs.com/). + +To build a copy of the library, check out TogetherJS: ```sh $ git clone git://github.com/mozilla/togetherjs.git $ cd togetherjs ``` -Then [install npm](http://nodejs.org/download/) and run: +Then [install npm](http://nodejs.org/download/) and run: ```sh $ npm install $ npm install -g grunt-cli ``` -This will install a bunch of stuff, most of which is only used for development. The only "server" dependency is [WebSocket-Node](https://github.com/Worlize/WebSocket-Node) (and if you use our hub then you don't need to worry about the server). By default everything is installed locally, i.e., in `node_modules/`. This works just fine, but it is useful to install the `grunt` command-line program globally, which `npm install -g grunt-cli` does. +This will install a bunch of stuff, most of which is only used for development. The only "server" dependency is [WebSocket-Node](https://github.com/Worlize/WebSocket-Node) (and if you use our hub then you don't need to worry about the server). By default everything is installed locally, i.e., in `node_modules/`. This works just fine, but it is useful to install the `grunt` command-line program globally, which `npm install -g grunt-cli` does. -Now you can build TogetherJS, like: +Now you can build TogetherJS, like: ```sh $ grunt build buildsite --no-hardlink ``` -This will create a copy of the entire `togetherjs.com` site in `build/`. You'll need to setup a local web server of your own pointed to the `build/` directory. To start a server on port 8080, run: +This will create a copy of the entire `togetherjs.com` site in `build/`. You'll need to setup a local web server of your own pointed to the `build/` directory. To start a server on port 8080, run: ```sh $ node devserver.js ``` -If you want to develop with TogetherJS you probably want the files built continually. To do this use: +If you want to develop with TogetherJS you probably want the files built continually. To do this use: ```sh $ grunt devwatch ``` -This will rebuild when changes are detected. Note that Grunt is configured to create [hard links](http://en.wikipedia.org/wiki/Hard_link) instead of copying so that most changes you make to files in `togetherjs/` don't need to be rebuilt to show up in `build/togetherjs/`. `--no-hardlink` turns this behavior off. +This will rebuild when changes are detected. Note that Grunt is configured to create [hard links](http://en.wikipedia.org/wiki/Hard_link) instead of copying so that most changes you make to files in `togetherjs/` don't need to be rebuilt to show up in `build/togetherjs/`. `--no-hardlink` turns this behavior off. -You may wish to create a static copy of the TogetherJS client to distribute and use on your website. To do this run: +You may wish to create a static copy of the TogetherJS client to distribute and use on your website. To do this run: ```sh $ grunt build --base-url https://myapp.com --no-hardlink --dest static-myapp ``` -Then `static-myapp/togetherjs.js` and `static-myapp/togetherjs-min.js` will be in place, and the rest of the code will be under `static-myapp/togetherjs/`. You would deploy these on your server. +Then `static-myapp/togetherjs.js` and `static-myapp/togetherjs-min.js` will be in place, and the rest of the code will be under `static-myapp/togetherjs/`. You would deploy these on your server. -Running a local server ----------------------- -You shouldn't need to run your own version of the hub server. But if you +--- + +### Running a local server + +You shouldn't need to run your own version of the hub server. But if you happen to make changes to the server, you can change the default hub -URL by setting the HUB_URL environment variable when building. For example: +URL by setting the HUB_URL environment variable when building. For example: ``` $ HUB_URL=http://localhost:8080 grunt devwatch ``` -Testing -------- +--- + +### Testing -Tests are in `togetherjs/tests/` -- these are [doctest.js](http://doctestjs.org/) tests. To actually run the tests build togetherjs, serve it up, and go to `http://localhost:PORT/togetherjs/tests/` -- from there the tests are linked to from the top of the page. The actual tests are `*.js` files in `togetherjs/tests/`, generally `test_*.js` for unit-style tests, and `func_*.js` for functional tests. +Tests are in `togetherjs/tests/` -- these are [doctest.js](http://doctestjs.org/) tests. To actually run the tests build togetherjs, serve it up, and go to `http://localhost:PORT/togetherjs/tests/` -- from there the tests are linked to from the top of the page. The actual tests are `*.js` files in `togetherjs/tests/`, generally `test_*.js` for unit-style tests, and `func_*.js` for functional tests. -The "Manual testing" link is something that lets you simulate different conditions in TogetherJS without setting up a second browser/client. +The "Manual testing" link is something that lets you simulate different conditions in TogetherJS without setting up a second browser/client. -There is unfortunately no automated runner for these tests. It might be nice if [Karma](http://karma-runner.github.io/) could be setup with doctest.js in general, but so far that isn't done. +There is unfortunately no automated runner for these tests. It might be nice if [Karma](http://karma-runner.github.io/) could be setup with doctest.js in general, but so far that isn't done. -License -------- +--- -This Source Code Form is subject to the terms of the Mozilla Public +### License + +This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, -You can obtain one at [http://mozilla.org/MPL/2.0/](http://mozilla.org/MPL/2.0/). +You can obtain one at [http://mozilla.org/MPL/2.0/](http://mozilla.org/MPL/2.0/). + +--- + + From 28832fc59eb186b1a0a21fdeaa98a0f7999011e0 Mon Sep 17 00:00:00 2001 From: tiagomoraismorgado Date: Thu, 30 Nov 2017 14:42:31 +0000 Subject: [PATCH 2/4] adding section tag adding section tag --- README.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/README.md b/README.md index 57f7edb49..9c1243326 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ ## TogetherJS - Surprisingly easy collaboration +
Table of Contents (ToC) + Table of Contents (ToC) ========================= @@ -14,6 +16,10 @@ Table of Contents (ToC) --- +
+ +
what is TogetherJS? + ### What is TogetherJS? TogetherJS is a service for your website that makes it surprisingly easy to collaborate in real-time. @@ -26,24 +32,41 @@ Table of Contents (ToC) --- +
+ +
contributing + ### Contributing The remainder of this document is about contributing to TogetherJS - but reports, fixes, features, etc. Look back at those other links if you are looking for something else. --- + +
+ +
bug reports + ### Bug Reports Please submit bug reports as [github issues](https://github.com/mozilla/togetherjs/issues/new). Don't worry about labels or milestones. If you use the in-app feedback to give us a bug report that's fine too. --- +
+ +
bug reports + ### Roadmap & Plans To see what we're planning or at least considering to do with TogetherJS, look at [see our bug tracker](https://github.com/mozilla/togetherjs/issues?state=open). --- +
+ +
bug reports + ### Setting up a development environment TogetherJS has two main pieces: @@ -102,6 +125,10 @@ $ grunt build --base-url https://myapp.com --no-hardlink --dest static-myapp --- +
+ +
running a local server + ### Running a local server You shouldn't need to run your own version of the hub server. But if you @@ -113,6 +140,10 @@ $ HUB_URL=http://localhost:8080 grunt devwatch --- +
+ +
testing + ### Testing Tests are in `togetherjs/tests/` -- these are [doctest.js](http://doctestjs.org/) tests. To actually run the tests build togetherjs, serve it up, and go to `http://localhost:PORT/togetherjs/tests/` -- from there the tests are linked to from the top of the page. The actual tests are `*.js` files in `togetherjs/tests/`, generally `test_*.js` for unit-style tests, and `func_*.js` for functional tests. @@ -123,6 +154,10 @@ $ HUB_URL=http://localhost:8080 grunt devwatch --- +
+ +
license + ### License This Source Code Form is subject to the terms of the Mozilla Public @@ -131,4 +166,6 @@ You can obtain one at [http://mozilla.org/MPL/2.0/](http://mozilla.org/MPL/2.0/) --- +
+ From bbd7800651dfde1d8525a9530821b1dd3f371725 Mon Sep 17 00:00:00 2001 From: tiagomoraismorgado Date: Thu, 30 Nov 2017 14:44:32 +0000 Subject: [PATCH 3/4] fixing previous commit fixing previous commit --- README.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 9c1243326..c4e3e5aae 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## TogetherJS - Surprisingly easy collaboration -
Table of Contents (ToC) +
Table of Contents (ToC) Table of Contents (ToC) ========================= @@ -16,9 +16,9 @@ Table of Contents (ToC) --- -
+ -
what is TogetherJS? +
what is TogetherJS? ### What is TogetherJS? @@ -32,9 +32,9 @@ Table of Contents (ToC) --- -
+ -
contributing +
contributing ### Contributing @@ -43,9 +43,9 @@ Table of Contents (ToC) --- -
+ -
bug reports +
bug reports ### Bug Reports @@ -53,9 +53,9 @@ Table of Contents (ToC) --- -
+ -
bug reports +
bug reports ### Roadmap & Plans @@ -63,9 +63,9 @@ Table of Contents (ToC) --- -
+ -
bug reports +
bug reports ### Setting up a development environment @@ -125,9 +125,9 @@ $ grunt build --base-url https://myapp.com --no-hardlink --dest static-myapp --- -
+ -
running a local server +
running a local server ### Running a local server @@ -140,9 +140,9 @@ $ HUB_URL=http://localhost:8080 grunt devwatch --- -
+ -
testing +
testing ### Testing @@ -154,9 +154,9 @@ $ HUB_URL=http://localhost:8080 grunt devwatch --- -
+ -
license +
license ### License @@ -166,6 +166,6 @@ You can obtain one at [http://mozilla.org/MPL/2.0/](http://mozilla.org/MPL/2.0/) --- -
+ From 52ec1fab044df3aea89e6f62ca39207fcbc25d30 Mon Sep 17 00:00:00 2001 From: tiagomoraismorgado Date: Thu, 30 Nov 2017 14:47:04 +0000 Subject: [PATCH 4/4] styling collapsing styling collapsing --- README.md | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index c4e3e5aae..6a23f178e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ ## TogetherJS - Surprisingly easy collaboration -
Table of Contents (ToC) +
README.md + +
Table of Contents (ToC) Table of Contents (ToC) ========================= @@ -18,7 +20,7 @@ Table of Contents (ToC)
-
what is TogetherJS? +
what is TogetherJS? ### What is TogetherJS? @@ -34,7 +36,7 @@ Table of Contents (ToC)
-
contributing +
contributing ### Contributing @@ -45,7 +47,7 @@ Table of Contents (ToC)
-
bug reports +
bug reports ### Bug Reports @@ -55,7 +57,7 @@ Table of Contents (ToC)
-
bug reports +
bug reports ### Roadmap & Plans @@ -65,7 +67,7 @@ Table of Contents (ToC)
-
bug reports +
bug reports ### Setting up a development environment @@ -127,7 +129,7 @@ $ grunt build --base-url https://myapp.com --no-hardlink --dest static-myapp
-
running a local server +
running a local server ### Running a local server @@ -142,7 +144,7 @@ $ HUB_URL=http://localhost:8080 grunt devwatch
-
testing +
testing ### Testing @@ -156,7 +158,7 @@ $ HUB_URL=http://localhost:8080 grunt devwatch
-
license +
license ### License @@ -169,3 +171,5 @@ You can obtain one at [http://mozilla.org/MPL/2.0/](http://mozilla.org/MPL/2.0/)
+ +