# elysion

> The Elysion compiler

Latest version **1.1.1** (published 2022-10-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install elysion
pnpm add elysion
yarn add elysion
bun add elysion
```

Provides the command `els`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2022-10-25 |
| First published | 2022-08-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 905.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Ángel Castillo |
| Maintainers | blehh |
| Keywords | compiler, language, implicit, simplify |

## Links

- npm: https://www.npmjs.com/package/elysion
- Repository: https://github.com/giovcastillo/elysion
- Homepage: https://github.com/giovcastillo/elysion#readme
- Issues: https://github.com/giovcastillo/elysion/issues
- npm.io page: https://npm.io/package/elysion

## Dependencies (3)

- [yargs](https://npm.io/package/yargs.md) ^17.5.1
- [jison-gho](https://npm.io/package/jison-gho.md) ^0.6.1-216
- [typescript](https://npm.io/package/typescript.md) 4.8.4

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2022-10-25
- 1.1.0 — 2022-10-08
- 1.0.7 — 2022-09-25
- 1.0.6 — 2022-09-22
- 1.0.5 — 2022-09-22
- 1.0.4 — 2022-09-04
- 1.0.3 — 2022-09-04
- 1.0.2 — 2022-09-04
- 1.0.1 — 2022-09-04
- 1.0.0 — 2022-08-16

## README

Elysion
=======
**Elysion** is a coding language made to compile ***implicit* yet *readable* code** to pure, modern JavaScript. Since Elysion is just a compiler for JavaScript, it can handle and compile expressions of both languages.

This package is still under development, and is not recommended to be used in production. Some parts of JavaScript are still not supported.


Overview
========
Elysion
-------
```js
MyTypes as '', 1, false, null, foo: \bar

for index, value in MyTypes
  _type = typeof value

  console.log `${_type} value at #${index}`
```
JavaScript output
---
```js
let MyTypes, index, value, _type, _j;

MyTypes = ['', 1, false, null, { foo: "bar" }];

for (index in (_j = MyTypes)) {
  value = _j[index];

  _type = typeof value;

  console.log(`${_type} value at #${index}`);
}
```

Installation
===
### With Node.js
```ps
# for local development...
npm install --save-dev elysion

# if you'd like to use 'els' command globally...
npm install -g elysion
```

Usage
===
### Command Line Interface
```ps
# with `.elsconfig`
els

# compile a file manually
els -c path/to/file.els

# compile a directory
els -c path/to/folder path/to/destination
```

### On Node.js
```js
const Elysion = require('elysion');

// prints "hello('world!');"
console.log(
  Elysion.compile("hello 'world!'").output
);

// ---------

// parse an ELSON file
var elson = require('fs')
  .readFileSync('path/to/.elson', { encoding: 'utf-8' });

console.log(
  Elysion.toJSON(elson)
)
```

References
===
### Structure of a `.elsconfig` file
(`.elsconfig` has the syntax of an `.elson` file)

**Do not** place newlines between properties, or the file will be treated as an array.
```coffee
sourceDir: 'path/to/folder'
# or...
sourceRoot: 'path/to/root' # optional
files:
  'my-file.src'
  'another-file.src'
# -----
compilerOptions:
  # whether you want a source map to be generated
  sourceMaps: yes or no
  # whether to place the source map as a data URI 
  # or generate a '.js.map' file containing the map
  inlineMap: yes or no
  # the output directory for all scripts
  # use '@' for same directory
  outDir: 'path/to/destination'
  # the extension of the output files
  # if .elson, the output will be .json
  # set to '.els.js' by default
  outExtension: '.js'
  # -----------------
  # --- For TypeScript support (still working on it)
  # -----------------
  # whether the output will be a TypeScript file
  # (only for files containing typed expressions) 
  preserveTS: yes or no
  # skip all diagnostics if there's any
  # if false, the file will not be compiled
  # if there's any error
  omitDiagnostics: yes or no
```

---
_Source: https://npm.io/package/elysion · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
