Skip to content

Commit 14c4a18

Browse files
committed
Fixed readme and version to 0.0.5
1 parent 0c73caf commit 14c4a18

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

README.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,18 @@ See the [HertzScript Specification](https://github.com/Floofies/hertzscript-spec
1212

1313
There are two different ways to use this:
1414

15-
1. Import `src/compile.js` and `src/compileSpawn.js` into your own script.
15+
1. Import the compiler module into your script.
1616

17-
2. Invoke `bin/compileCLI.js` via terminal.
17+
2. Invoke `hzc` via terminal.
1818

19-
`src/compile.js` and `src/compileSpawn.js` are importable modules with simple interfaces.
20-
21-
## `compile.js`
19+
## `Compiler Module`
2220

2321
This module serves as the core of the HzScript compilation pipeline, and transforms JavaScript functions into instruction streams; all functions within a HzScript program are GeneratorFunctions which yield instructions.
2422

2523
Exported as a single function, you can invoke it like so:
2624

2725
```JavaScript
28-
const hzCompile = require("./src/compile.js");
26+
const hzCompile = require("hertzscript-compiler");
2927
const sourceCode = "console.log('Hello World!')";
3028
const compiledCode = hzCompile(sourceCode);
3129
```
@@ -54,22 +52,22 @@ hzCompile( source [, module = false [, standalone = false [, spawn = false ]]])
5452

5553
`spawn` (*Optional*)
5654

57-
- If `true` then `compileSpawn.js` will be used to detect and compile the `spawn` keyword. Defaults to `false`.
55+
- If `true` then the `spawn` keyword compiler will be used to detect and compile the `spawn` keyword. Defaults to `false`.
5856

5957
## Command-Line Interface
6058

61-
`bin/compileCLI.js` imports `src/compile.js` and `src/compileSpawn.js`, wrapping them in a simple command-line interface.
59+
The `hzc` command imports the compiler module and wraps it in a simple command-line interface.
6260

63-
You can invoke the interface script like so, shown here with the `spawn` compiler turned on and the ouput code running in `--standalone` mode:
61+
You can invoke the interface script like so, shown here with the `spawn` compiler enabled and the ouput code wrapped in `--standalone` mode:
6462

6563
```bash
66-
echo "spawn console.log('Hello World!');" | node ./bin/compileCLI.js --spawn -s
64+
echo "spawn console.log('Hello World!')" | hzc --spawn -s
6765
```
6866

6967
You can also supply input and output paths with the `-i` and `-o` parameters:
7068

7169
```bash
72-
node ./bin/compileCLI.js --spawn -s -i path/to/my/script.js -o path/to/my/script.hz.js
70+
hzc -i path/to/my/script.js -o path/to/my/output.hz.js
7371
```
7472

7573
### Command-Line Options
@@ -92,4 +90,4 @@ node ./bin/compileCLI.js --spawn -s -i path/to/my/script.js -o path/to/my/script
9290

9391
`--spawn`
9492

95-
- If set, then `compileSpawn.js` will be used to detect and compile the `spawn` keyword.
93+
- If set, then the `spawn` keyword compiler will be used to detect and compile the `spawn` keyword.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hertzscript-compiler",
3-
"version": "0.0.4",
3+
"version": "0.0.5",
44
"description": "Produces preemptible JavaScript coroutines which conform to the HertzScript specification.",
55
"keywords": [
66
"javascript",

0 commit comments

Comments
 (0)