Skip to content

Use node to run eslc binary #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
15 changes: 0 additions & 15 deletions bin/eslc

This file was deleted.

3 changes: 3 additions & 0 deletions bin/eslc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env node
// Simple wrapper script for src/cli.ls, independent of the build system.
require("../lib/cli")
2 changes: 1 addition & 1 deletion doc/basics-reference.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ those later.)

## Compilation

<!-- !test program ./bin/eslc | head -c -1 -->
<!-- !test program node ./bin/eslc.js | head -c -1 -->

When you hand your code to the eslisp compiler, it reads the lists and turns
them into JavaScript code with the following rules:
Expand Down
2 changes: 1 addition & 1 deletion doc/how-macros-work.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ differently, but call them the same way as normal functions. They can execute
whatever logic you want, and their return values become program code at the
point where they're called.

<!-- !test program ./bin/eslc | head -c -1 -->
<!-- !test program node ./bin/eslc.js | head -c -1 -->

## The basics

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"doc": "./doc"
},
"bin": {
"eslc": "./bin/eslc"
"eslc": "./bin/eslc.js"
},
"files": [
"lib",
Expand Down
2 changes: 1 addition & 1 deletion readme.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ your own language features, [like this][9].
> :warning: **Note the 0.x.x [semver][10].** The API may shift under your
> feet.

<!-- !test program ./bin/eslc | head -c -1 -->
<!-- !test program node ./bin/eslc.js | head -c -1 -->

<!-- !test in fib -->

Expand Down
4 changes: 2 additions & 2 deletions test.ls
Original file line number Diff line number Diff line change
Expand Up @@ -872,9 +872,9 @@ test "macros can be required relative to root directory" ->
(x)
"""

eslc-path = path.join process.cwd!, "bin/eslc"
eslc-path = path.join __dirname, "bin/eslc.js"
try
exec-sync "#eslc-path #main-basename", cwd : dir-name
exec-sync "node #eslc-path #main-basename", cwd : dir-name
..to-string! `@equals` "\n"
finally
e <~ rimraf dir-name
Expand Down