Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ node_modules
.cmd_history
.cmd_history/*
.cmd_history/cmd_historycash

# GitHub Pages site
docs/dist
7 changes: 7 additions & 0 deletions docs/assets/footer.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* Footer styles
*/

.mdl-mini-footer {

}
8 changes: 8 additions & 0 deletions docs/assets/footer.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<footer class="mdl-mini-footer">
<div class="mdl-mini-footer__left-section">
&copy; <a href="https://github.com/dthree">David Caccavella</a>
</div>
<div class="mdl-mini-footer__right-section">
Love it? Cash is brand new! Give it a ★ or a tweet to help spread the word!
</div>
</footer>
11 changes: 11 additions & 0 deletions docs/assets/header.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* Header styles
*/

.mdl-layout__header-row {
padding-left: 40px;
}

.mdl-layout-title {
font-family: 'Syncopate', 'Helvetica', sans-serif;
}
19 changes: 19 additions & 0 deletions docs/assets/header.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<header class="mdl-layout__header mdl-layout__header--waterfall">
<div class="mdl-layout__header-row">
<span class="mdl-layout-title">
CASH
</span>
<!-- Add spacer, to align navigation to the right in desktop -->
<div class="mdl-layout-spacer"></div>
<!-- Top navigation -->
<nav class="mdl-navigation">
<a class="mdl-navigation__link mdl-typography--text-uppercase is-active" href="/">Overview</a>
<a class="mdl-navigation__link mdl-typography--text-uppercase" href="/getting-started">Get Started</a>
<a class="mdl-navigation__link mdl-typography--text-uppercase" href="/faq">FAQ</a>
<a class="mdl-navigation__link mdl-typography--text-uppercase" href="https://github.com/dthree/cash">
<i class="material-icons">link</i>
<span>GitHub</span>
</a>
</nav>
</div>
</header>
51 changes: 51 additions & 0 deletions docs/assets/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/**
* Main layout styles
*/

@import 'header.css';
@import 'footer.css';
@import 'stats.css';

html, body {
font-family: 'Roboto', 'Helvetica', sans-serif;
margin: 0;
padding: 0;
}

.hero {
background: rgb(0,130,116);
color: white;
text-align: center;
padding: 4em 40px;
}

.hero__title {
font-family: 'Syncopate', 'Helvetica', sans-serif;
padding: 0;
margin: 0 0 16px;
}

.hero__desc {
font-size: 24px;
}

.page {
padding: 0 40px;
}

.container {
max-width: 800px;
margin: 0 auto;
}

@media screen and (max-width: 1024px) {

.hero {
padding: 1.5em 16px;
}

.page {
padding: 0 16px;
}

}
49 changes: 49 additions & 0 deletions docs/assets/main.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title><%= title %></title>
<meta name="description" content="<%= description %>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:regular,bold,italic,thin,light,bolditalic,black,medium|Syncopate" lang=en">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://code.getmdl.io/1.1.3/material.teal-pink.min.css">
<link rel="stylesheet" href="main.css">
</head>
<body>
<div class="mdl-layout mdl-js-layout mdl-layout--fixed-header">
<%- include('header'); %>
<main class="mdl-layout__content">
<% if (id === 'home') { %><div class="hero">
<h1 class="hero__title">CASH</h1>
<p class="hero__desc">Cross-platform Linux without the suck</p>
<%- include('stats'); %>
<p>
<a class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent" href="/getting-started">
Get Started
</a>
&nbsp;
<a class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect" href="https://github.com/dthree/cash">
<i class="material-icons">link</i>
View on GitHub
</a>
</p>
</div><% } %>
<section class="page">
<div class="container">
<%- content %>
</div>
</section>
<%- include('footer'); %>
</main>
</div>
<script src="https://code.getmdl.io/1.1.3/material.min.js"></script>
<script>
window.ga=function(){ga.q.push(arguments)};ga.q=[];ga.l=+new Date;
ga('create','UA-XXXXX-Y','auto');ga('send','pageview')
</script>
<script src="https://www.google-analytics.com/analytics.js" async defer></script>
</body>
</html>
Empty file added docs/assets/main.js
Empty file.
19 changes: 19 additions & 0 deletions docs/assets/stats.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* GitHub stats
*/

.stats__link {
color: rgba(255, 255, 255, .8);
padding-right: 1em;
text-decoration: none;
font-size: 12px;
font-weight: normal;
}

.stats__link:hover {
color: rgba(255, 255, 255, 1);
}

.stats__link svg {
margin-right: .5em;
}
23 changes: 23 additions & 0 deletions docs/assets/stats.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<%#
This stats is taken from:
- https://api.github.com/repos/dthree/cash
- https://registry.npmjs.com/cash
%>
<p>
<a href="https://github.com/dthree/cash/watchers" class="stats__link">
<svg aria-hidden="true" height="16" role="img" version="1.1" viewBox="0 0 16 16" width="16"><path d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6c4.94 0 7.94-6 7.94-6S13 2 8.06 2z m-0.06 10c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4z m2-4c0 1.11-0.89 2-2 2s-2-0.89-2-2 0.89-2 2-2 2 0.89 2 2z"></path></svg>
<%= github.subscribers_count %> watchers
</a>
<a href="https://github.com/dthree/cash/stargazers" class="stats__link">
<svg aria-hidden="true" height="16" role="img" version="1.1" viewBox="0 0 14 16" width="14"><path d="M14 6l-4.9-0.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14l4.33-2.33 4.33 2.33L10.4 9.26 14 6z"></path></svg>
<%= github.watchers %> stars
</a>
<a href="https://github.com/dthree/cash/network" class="stats__link">
<svg aria-hidden="true" height="16" role="img" version="1.1" viewBox="0 0 10 16" width="10"><path d="M8 1c-1.11 0-2 0.89-2 2 0 0.73 0.41 1.38 1 1.72v1.28L5 8 3 6v-1.28c0.59-0.34 1-0.98 1-1.72 0-1.11-0.89-2-2-2S0 1.89 0 3c0 0.73 0.41 1.38 1 1.72v1.78l3 3v1.78c-0.59 0.34-1 0.98-1 1.72 0 1.11 0.89 2 2 2s2-0.89 2-2c0-0.73-0.41-1.38-1-1.72V9.5l3-3V4.72c0.59-0.34 1-0.98 1-1.72 0-1.11-0.89-2-2-2zM2 4.2c-0.66 0-1.2-0.55-1.2-1.2s0.55-1.2 1.2-1.2 1.2 0.55 1.2 1.2-0.55 1.2-1.2 1.2z m3 10c-0.66 0-1.2-0.55-1.2-1.2s0.55-1.2 1.2-1.2 1.2 0.55 1.2 1.2-0.55 1.2-1.2 1.2z m3-10c-0.66 0-1.2-0.55-1.2-1.2s0.55-1.2 1.2-1.2 1.2 0.55 1.2 1.2-0.55 1.2-1.2 1.2z"></path></svg>
<%= github.forks %> forks
</a>
<a href="https://github.com/dthree/cash/issues" class="stats__link">
<svg aria-hidden="true" height="16" role="img" version="1.1" viewBox="0 0 14 16" width="14"><path d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7S10.14 13.7 7 13.7 1.3 11.14 1.3 8s2.56-5.7 5.7-5.7m0-1.3C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7S10.86 1 7 1z m1 3H6v5h2V4z m0 6H6v2h2V10z"></path></svg>
<%= github.open_issues_count %> open issues
</a>
</p>
45 changes: 45 additions & 0 deletions docs/faq.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
id: faq
title: FAQ | Cash - cross-platform Linux without the suck
---

## FAQ

#### Why Cash?

In its very essence, Cash replaces the Windows CLI prompt (`>`) with the Unix one (`$`), the dollar symbol.

Cash was most fitting in this sense:

> Ask and ye shall receive

```
> cash
$
````

Cash is also a play on the word `bash`, and is actually[\[1\]](https://xkcd.com/906) a recursive acronym for Cash Shell.

Shout out to [@aseemk](https://github.com/aseemk) for donating the name.


#### Doesn't ShellJS do this?

No.

For those who don't know, [ShellJS](https://github.com/shelljs/shelljs) is an awesome Node package that implements UNIX shell commands programatically in JavaScript. Check it out - really. While ShellJS was tremendously helpful in figuring out how to accomplish Cash, the two do not really conflict.

ShellJS gives the feel of UNIX commands in a code environment, but aims to implement the commands in a way that makes sense for a JavaScript library. This means that many commands return JavaScript objects, and some of the rougher and more dangerous edges of bash have been softened a bit.

For example, with cash:
```javascript
$('ls'); // 'node_modules\n'

$('echo foo > foo.txt');
```

With ShellJS:
```javascript
ls(); // ['node_modules'];

echo('foo').to('foo.txt');
77 changes: 77 additions & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
id: getting-started
title: Getting Started | Cash - cross-platform Linux without the suck
---

## Getting Started

- [Introduction](#introduction)
- [Supported commands](#supported-commands)
- [Configuration (.cashrc)](#configuration)
- [Contributing](#contributing)
- [FAQ](#faq)
- [Team](#team)
- [License](#license)
- [Wiki](https://github.com/dthree/cash/wiki)

## Introduction

Cash is a project working on a cross-platform implementation of the most used Unix-based commands in pure JavaScript and with no external dependencies.

The goal of Cash is to open up these commands to the massive JavaScript community for the first time, and to provide a cleaner, simpler and flexible alternative to applications like Cygwin for those wanting the Linux feel on Windows.

Cash was built with strict attention to nearly exact implementations and excellent test coverage of over 200 unit tests.


## Supported commands

The following commands are currently implemented:

- alias
- cat
- clear
- cd
- cp
- echo
- export
- false
- grep
- head
- kill
- less
- ls
- mkdir
- mv
- pwd
- rm
- sort
- source
- tail
- touch
- true
- unalias

Want more commands?

- [Vote on the next commands](https://github.com/dthree/cash/wiki/Roadmap)
- [Help spread the word:](http://bit.ly/1LBEJ5s) More knowledge of Cash equals more contributors
- [Contribute](#contributing)


## Configuration

Want to configure things to your heart's content? Just add your configurations in a `.cashrc` file (`_cashrc` also works, for Windows folk) and put that in your home directory. This supports anything you can do inside a cash command prompt (`export`ing environmental variables, aliases, etc.).

## Contributing

- [Editing commands](https://github.com/dthree/cash/wiki/Contributing#editing-existing-commands)
- [Adding new commands](https://github.com/dthree/cash/wiki/Contributing)

We are currently looking for Core Team members who can push forward Cash at a rapid rate. Are you an awesome developer up to the challenge? Send me a ping.

### Awesome contributors

- [@nfischer](https://github.com/nfischer): Added `source`, `export`, `true` and `false` commands, among several other contributions.
- [@safinn](https://github.com/safinn): Added `clear` and `tail` commands.
- [@legien](https://github.com/legien): Added `head` command.
- [@cspotcode](https://github.com/cspotcode): Implemented template literal execution.
Loading