-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 65b1767
Showing
17 changed files
with
749 additions
and
0 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,19 @@ | ||
{ | ||
"extends": ["eslint:recommended"], | ||
"plugins": [], | ||
"parserOptions": { | ||
"ecmaVersion": 8, | ||
"sourceType": "module" | ||
}, | ||
"env": { | ||
"node": true, | ||
"es6": true | ||
}, | ||
"globals": { | ||
"SharedArrayBuffer": true, | ||
"Atomics": true | ||
}, | ||
"rules": { | ||
"no-console": 0 | ||
} | ||
} |
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,60 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
|
||
# Visual Studio files | ||
/.vs/ | ||
|
||
# VS Code cache files | ||
/.vscode/.browse.VC* | ||
|
||
# Dependency directory | ||
# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git | ||
/node_modules/ | ||
|
||
# Bin directory | ||
/bin/ | ||
/bin.test/ | ||
|
||
# ES2015 modules (for webpack) | ||
/modules/ | ||
|
||
# Declarations directory | ||
/declarations/ | ||
|
||
# Dist directory | ||
/dist/ | ||
|
||
# Debug output directory | ||
/debug/ | ||
|
||
# NPM files | ||
.npmrc |
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,27 @@ | ||
image: node:11 | ||
|
||
before_script: | ||
- npm install -g eslint | ||
- npm ci | ||
|
||
#cache: | ||
# paths: | ||
# - node_modules/ | ||
|
||
test:lint: | ||
script: | ||
- npm run lint | ||
|
||
test:node:11: | ||
script: | ||
- npm run clean | ||
- npm run build | ||
- npm test | ||
|
||
# LTS | ||
test:node:10: | ||
image: node:10 | ||
script: | ||
- npm run clean | ||
- npm run build | ||
- npm test |
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,78 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
|
||
# Visual Studio files | ||
/.vs/ | ||
|
||
# VS Code cache files | ||
/.vscode/.browse.VC* | ||
|
||
# Dependency directory | ||
# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git | ||
/node_modules/ | ||
|
||
# Bin directory | ||
# /bin/ | ||
/bin.test/ | ||
|
||
# ES2015 modules (for webpack) | ||
# /modules/ | ||
|
||
# Declarations directory | ||
# /declarations/ | ||
|
||
# Dist directory | ||
/dist/ | ||
|
||
# Debug output directory | ||
/debug/ | ||
|
||
# NPM files | ||
.npmrc | ||
|
||
|
||
|
||
################### | ||
#### npmignore #### | ||
|
||
/.vscode/ | ||
/spec/ | ||
.babelrc | ||
.travis.yml | ||
.gitlab-ci.yml | ||
tsconfig.json | ||
tsconfig.spec.json | ||
tslint.json | ||
webpack.config.js | ||
|
||
/src.dist/ | ||
webpack.dist.config.js |
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,17 @@ | ||
language: node_js | ||
node_js: | ||
- "10" | ||
- "11" | ||
|
||
#branches: | ||
# only: | ||
# - master | ||
|
||
sudo: false | ||
|
||
before_script: | ||
- npm install -g eslint | ||
- npm run clean | ||
- npm run lint | ||
- npm run build | ||
- npm test |
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,16 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Launch Program", | ||
"program": "${workspaceFolder}\\index.js", | ||
"args": [ | ||
] | ||
} | ||
] | ||
} |
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,13 @@ | ||
# ISC License (ISC) | ||
|
||
### Copyright (c) 2018, Shellyl_N and Authors | ||
#### https://github.com/shellyln | ||
|
||
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby | ||
granted, provided that the above copyright notice and this permission notice appear in all copies. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING | ||
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, | ||
DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, | ||
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE | ||
OR PERFORMANCE OF THIS SOFTWARE. |
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,46 @@ | ||
# Liyad CLI | ||
### CLI and REPL for [Liyad](https://github.com/shellyln/liyad) (Lisp yet another DSL interpreter). | ||
|
||
|
||
---- | ||
|
||
## Requirements | ||
|
||
* Node >= 10 | ||
|
||
## Install | ||
|
||
```bash | ||
$ npm install -g liyad-cli | ||
$ liyad | ||
``` | ||
|
||
## CLI Usage | ||
|
||
``` | ||
Usage: liyad [options] [ -- ] [ -e script | script.lisp | - ] [ -- ] [arguments] | ||
liyad [options] | ||
Options: | ||
- script read from stdin (default; interactive mode if a tty) | ||
-- indicate the end of CLI options / script files | ||
-e, --eval=... evaluate script | ||
-i, --interactive always enter the REPL even if stdin does not appear to be a terminal | ||
-h, --help print command line options | ||
-v, --version print version informations | ||
``` | ||
|
||
## Packaging to the single executable file. | ||
Use [pkg](https://www.npmjs.com/package/pkg). | ||
|
||
```bash | ||
$ npm install -g pkg | ||
$ pkg . --output liyad | ||
$ ./liyad | ||
``` | ||
|
||
---- | ||
|
||
## License | ||
[ISC](https://github.com/shellyln/liyad-cli/blob/master/LICENSE.md) | ||
Copyright (c) 2018, Shellyl_N and Authors. |
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,15 @@ | ||
($local () | ||
($let fac-sub (-> (n a) | ||
;; ($pause) | ||
($if (< n 2) | ||
($cond (=== n 1) a | ||
(=== n 0) 1 | ||
true 0) | ||
($self (- n 1) (* n a)) ) | ||
)) | ||
($capture (fac-sub) | ||
($defun fac (n) (fac-sub n 1)) )) | ||
|
||
($concat "Hello, " (fac 5) "!") | ||
($concat "Hello, " (fac 5) "!") | ||
($concat "Hello, " (fac 5) "!") |
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,12 @@ | ||
#!/usr/bin/env node | ||
|
||
// Copyright (c) 2018, Shellyl_N and Authors | ||
// license: ISC | ||
// https://github.com/shellyln | ||
|
||
|
||
const cli = require('./lib/cli').cli; | ||
|
||
|
||
|
||
cli(); |
Oops, something went wrong.