|
7 | 7 | [changelog]: CHANGELOG.md |
8 | 8 | [version-badge]: https://img.shields.io/badge/version-0.1.0-blue.svg |
9 | 9 |
|
10 | | -- [Introduction](#introduction) |
11 | | -- [Getting Started](#getting-started) |
12 | | - - [Prerequisites](#prerequisites) |
13 | | - - [Coding Standards](#coding-standards) |
14 | | - - [Release Process](#release-process) |
15 | | - - [Versioning](#versioning) |
16 | | - - [Submission Guidelines](#submission-guidelines) |
17 | | - - [Local Run and Build](#local-run-and-build) |
18 | | - |
19 | | -* [Branching Flow](#branching-flow) |
20 | | -* [Deployment](#deployment) |
21 | | - |
22 | | -# NOTE: LJSP is not currently available for download. Coming soon! |
23 | | - |
24 | | -## Introduction |
25 | | - |
26 | | -`ljsp` provides utility functions to do abstract away common operations. |
27 | | -All utility functions are grouped. E.g. math, list, generic, object etc. |
| 10 | +# LJSP: Embrace the Lisp in JavaScript! |
| 11 | +Whether you agree that JavaScript is a Lisp or not, you can still harness the Lisp-inspired power of LJSP in your app. LJSP derives most of its functions from Clojure libraries. Clojurians will notice the extent to which we treated the Clojure docs not only as our requirements' specification, but as a great place to copy and paste text for our docs! For this, we offer heart-felt, tremendous thanks to the Clojure community. |
28 | 12 |
|
29 | 13 | For information on how to use LJSP, please visit our official documentation site: |
30 | 14 | [LJSP.org](https://www.ljsp.org) |
31 | 15 |
|
32 | 16 | ## Getting Started |
33 | 17 |
|
34 | | -Clone from Git. Run `npm i`. |
35 | | - |
36 | | -### Prerequisites |
37 | | - |
38 | | -Make sure you have a standard, modern, FE development environment with `git`, and `node` installed and configured. |
39 | | -If you've followed the onboarding steps, you'll be setup correctly. |
| 18 | +NPM `npm i ljsp-js` |
40 | 19 |
|
41 | | -### Release Process |
| 20 | +YARN `yarn add ljsp-js` |
42 | 21 |
|
43 | | -Once a merge request is merged to master, github pipeline starts running. Once the pipeline finishes, you can see |
44 | | -the new version with changelog and other details in the release section of github project. |
| 22 | +### USAGE |
45 | 23 |
|
46 | | -#### Versioning |
| 24 | +```javascript |
| 25 | +import { log, condp, str, mult, count, instance$ } from 'ljsp-js'; |
47 | 26 |
|
48 | | -1. `ljsp` uses [semantic versioning][semantic-versioning]. |
49 | | -2. `ljsp` follows [conventional commits][conventional-commits]. For list of scopes, see [Contributing Guideline](CONTRIBUTING.md). |
50 | | -3. Release happens automatically once the changes are merged to `master`. |
| 27 | +log("Enter a number: ") |
| 28 | +(function(line) { |
| 29 | + log( |
| 30 | + condp(eq, value, |
| 31 | + 1, "one", |
| 32 | + 2, "two", |
| 33 | + 3, "three", |
| 34 | + str('unexpected value, "', value, '"'))) |
| 35 | + log( |
| 36 | + condp(instance$, value, |
| 37 | + Number, () => mult(value, 2), |
| 38 | + String, () => mult(count(value), 2))) |
| 39 | +})(Number(readLine())) |
| 40 | +``` |
51 | 41 |
|
52 | 42 | ### Submission Guidelines |
53 | 43 |
|
54 | 44 | See the [CONTRIBUTING.md](CONTRIBUTING.md) |
55 | 45 |
|
56 | | -### Local Run and Build |
57 | | - |
58 | | -As of today, building and testing locally is not integrated into the codebase. Please take advantage of |
59 | | -`RunJS` or use `any live editor` you want to test out your changes. We hope to bring in some dev loop here soon. |
60 | | - |
61 | | -**Please test your changes thoroughly**. |
62 | | - |
63 | | -## Branching Flow |
64 | | - |
65 | | -We use the Release Flow methodology for our branching and release flow. |
66 | | - |
67 | 46 | [semantic-versioning]: https://semver.org/spec/v2.0.0.html |
68 | 47 | [conventional-commits]: https://www.conventionalcommits.org/en/v1.0.0/ |
0 commit comments