diff --git a/.blah/README.ejs b/.blah/README.ejs new file mode 100644 index 0000000..caaf8ab --- /dev/null +++ b/.blah/README.ejs @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + + +<% // Dependencies %> +<% var IsThere = require("is-there"); %> +<% var Fs = require("fs"); %> +<% var Path = require("path"); %> +<% var Ul = require("ul"); %> +<% var ExecSync = require("child_process").execSync; %> + +<% // Compute the directory paths %> +<% var binPath = Path.join(_.path, "bin"); %> +<% var examplesPath = Path.join(_.path, "examples"); %> +<% var examplePath = Path.join(_.path, "example"); %> +<% var example = IsThere(examplePath) ? examplePath : IsThere(examplesPath) ? examplesPath : null; %> +<% var isWeb = IsThere(examplePath + "/index.html"); %> +<% var isOnlyWeb = IsThere(process.cwd() + "/index.html"); %> +<% isWeb = isWeb || isOnlyWeb; %> +<% var isCli = IsThere(binPath); %> + +<% if (_.pack.blah.h_img) { %> +[![<%- _.pack.name %>](<%- _.pack.blah.h_img %>)](<%-_.pack.blah.h_url || "#"%>) +<% } %> + +<% // Create the name and description %> +<% if (isCli) { %> +# `$ <%- _.pack.name %>` [![Donate now][donate-now]][paypal-donations] +<% } else { %> +# <%- _.pack.blah.title || _.pack.name %> [![Donate now][donate-now]][paypal-donations] +<% } %> +<%- _.pack.description %> + +<%- _.pack.blah.description %> + +It's possible to share it into another terminal or in a browser, both with request +control feature. + +If you enjoy using *Share Term*, [supporting it](http://share-term.me/support) +would be really appreciated. :smile: :heart: + +<% if (_.pack.blah.ex_img) { %> +[![<%- _.pack.name %>](<%- _.pack.blah.ex_img %>)](<%-_.pack.blah.ex_url || "#"%>) +<% } %> + +<% // INSTALLATION %> +<% if (!isOnlyWeb) { %> +## Installation +<% } %> +<% // Cli usage %> +<% if (isCli) { %> +You can install the package globally and use it as command line tool: + +```sh +$ npm i -g <%- _.pack.name %> +``` + +Then, run `<%- _.pack.name %> --help` and see what the CLI tool can do. + +<% if (_.pack.bin) { %> +<% var cliCommand = Object.keys(_.pack.bin) %> +<% var cliPath = _.pack.bin[cliCommand] %> +<% } %> +<% if (IsThere(cliPath)) { %> +```sh +$ <%- cliCommand %> --help +<%- ExecSync(cliPath + " --help", { cwd: process.cwd() }).toString().slice(0, -1) %> +``` +<% } %> + +<% } else if (isWeb) { %> +<% if (!isOnlyWeb) { %> +Check out the [`dist`](/dist) directory to download the script and include into your page. +<% } %> +<% } else { %> + +```sh +$ npm i <%- _.pack.name %> +``` + +<% } %> + +## Usage +### :earth_africa: Sharing the terminal +To share your terminal do: + +```sh +$ share-term +``` + +You will get a session id which you will send to your friends. + +### :tokyo_tower: Accessing a session +To join a terminal session, having the id `` you have two ways: + + 1. Open the [Share Term website](http://share-term.me/) and enter your id there. + Then click the Access button. To request remote control click the + 🗼 button in the right bottom side. + 2. Having `share-term` installed on your computer (see [Installation](#Installation)) + you can join the session using: + + ```sh + # Without remote control + $ share-term get + # With remote control + $ share-term get -c + ``` + + + +<% // Show the example if there is one %> +<% if (example) { %> +<% var exStrPath = Path.join(example, "index.js"); %> +<% if (!IsThere(exStrPath)) { %> +<% example = null; %> +<% } %> +<% if (example) { %> +## Example + +<% if (isCli) { %> +Here is an example how to use this package as library. To install it locally, as library, you can do that using `npm`: + +```sh +$ npm i <%- _.pack.name %> +``` + +<% } %> + +<% var exStr = Fs.readFileSync(exStrPath, "utf-8"); %> +<% exStr = exStr.replace("../lib", _.pack.name) %> + +```js +<%- exStr %> +``` +<% } %> +<% } %> + + +<% // Documentation %> +<% if (!isOnlyWeb) { %> +## Documentation + +<% if (isCli) { %> +For full API reference, see the [DOCUMENTATION.md][docs] file. +<% } else { %> +<% docs = docs.split("\n").slice(3).join("\n"); %> +<%- docs %> +<% } %> +<% } %> + +<% // How to contribute %> +## How to contribute +Have an idea? Found a bug? See [how to contribute][contributing]. + +<% // Thanks %> +<% if (_.pack.blah.thanks) { %> +## Thanks +<% for (var k in _.pack.blah.thanks) { %> + - <%-_.pack.blah.thanks[k]%> +<% } %> +<% } %> + +## Press Highlights +None yet. If you wrote or found an article about this project, [add it][contributing] in this section. :memo: + +<% if (!isOnlyWeb) { %> +## Who uses this +If you are using this library in one of your projects, add it in this list. :sparkles: +<% } %> + +<% // Who used this? %> +<% if (_.pack.blah.usages) { %> +<% for (var k in _.pack.blah.usages) { %> + - [<%-_.pack.blah.usages[k].name%>](<%-_.pack.blah.usages[k].url%>) +<% } %> +<% } %> + +<% // License information %> +## License +[KINDLY][license] © [Ionică Bizău][website]–The [LICENSE](/LICENSE) file contains +a copy of the license. + +<% // Links %> +[license]: http://ionicabizau.github.io/kindly-license/?author=Ionic%C4%83%20Biz%C4%83u%20%3Cbizauionica@gmail.com%3E&year=<%- new Date().getFullYear() %> +[contributing]: /CONTRIBUTING.md +[website]: http://ionicabizau.net +[docs]: /DOCUMENTATION.md +[paypal-donations]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=MG98D7NPFZ3MG +[donate-now]: http://i.imgur.com/6cMbHOC.png diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..b09a1db --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,64 @@ +# :eight_spoked_asterisk: :stars: :sparkles: :dizzy: :star2: :star2: :sparkles: :dizzy: :star2: :star2: Contributing :star: :star2: :dizzy: :sparkles: :star: :star2: :dizzy: :sparkles: :stars: :eight_spoked_asterisk: + +So, you want to contribute to this project! That's awesome. However, before +doing so, please read the following simple steps how to contribute. This will +make the life easier and will avoid wasting time on things which are not +requested. :sparkles: + +## Discuss the changes before doing them + - First of all, open an issue in the repository, using the [bug tracker][1], + describing the contribution you would like to make, the bug you found or any + other ideas you have. This will help us to get you started on the right + foot. + + - If it makes sense, add the platform and software information (e.g. operating + system, Node.JS version etc.), screenshots (so we can see what you are + seeing). + + - It is recommended to wait for feedback before continuing to next steps. + However, if the issue is clear (e.g. a typo) and the fix is simple, you can + continue and fix it. + +## Fixing issues + - Fork the project in your account and create a branch with your fix: + `some-great-feature` or `some-issue-fix`. + + - Commit your changes in that branch, writing the code following the + [code style][2]. If the project contains tests (generally, the `test` + directory), you are encouraged to add a test as well. :memo: + + - If the project contains a `package.json` or a `bower.json` file add yourself + in the `contributors` array (or `authors` in the case of `bower.json`; + if the array does not exist, create it): + + ```json + { + "contributors": [ + "Your Name (http://your.website)" + ] + } + ``` + +## Creating a pull request + + - Open a pull request, and reference the initial issue in the pull request + message (e.g. *fixes #*). Write a good description and + title, so everybody will know what is fixed/improved. + + - If it makes sense, add screenshots, gifs etc., so it is easier to see what + is going on. + +## Wait for feedback +Before accepting your contributions, we will review them. You may get feedback +about what should be fixed in your modified code. If so, just keep committing +in your branch and the pull request will be updated automatically. + +## Everyone is happy! +Finally, your contributions will be merged, and everyone will be happy! :smile: +Contributions are more than welcome! + +Thanks! :sweat_smile: + +[1]: https://github.com/IonicaBizau/share-term/issues + +[2]: https://github.com/IonicaBizau/code-style \ No newline at end of file