Socket
Socket
Sign inDemoInstall

odesza

Package Overview
Dependencies
1
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.3 to 0.2.1

cli.js

10

package.json
{
"name": "odesza",
"version": "0.1.3",
"version": "0.2.1",
"description": "Write clean, expressive templates with just HTML and inline JavaScript",

@@ -10,3 +10,3 @@ "main": "index.js",

"type": "git",
"url": "https://github.com/littlstar/odesza"
"url": "https://github.com/wellsjo/odesza"
},

@@ -16,5 +16,11 @@ "scripts": {

},
"bin": {
"odesza": "./cli.js"
},
"devDependencies": {
"tape": "^4.2.2"
},
"dependencies": {
"commander": "^2.9.0"
}
}

26

README.md

@@ -5,9 +5,7 @@ # Odesza

- multiple inheritance
- variables
- fully expressive inline JavaScript
- multiple inheritance (extends, includes, blocks)
- full access to inline ES6 JavaScript
- support for Express
- no magic, 0 dependencies, and just 150 lines of code
## Variables & Statements
## Variables & Expressions
Variables are passed in when Odesza templates are rendered. Scope is maintained through includes and extends. You can also treat `${}` as a function statement.

@@ -25,18 +23,18 @@

hello.ode
```
```javascript
<title>${title}</title>
<p>
Welcome, ${names.join(',')}!
Welcome, ${names.map(n => `<i>${n}</i>`).join(', ')}!
</p>
```
output
```
```html
<title>hello world</title>
<p>
Welcome, foo, bar
Welcome, <i>foo</i>, <i>bar</i>
</p>
```
## Inline JS
Odesza makes it easy to write inline JavaScript in your templates. Under the hood, templates are evaluated as ES6 template strings, which means you have access to `${}` expressions.
## Inline JavaScript
Odesza makes it easy to write inline JavaScript in your templates. Under the hood, templates are evaluated as ES6 template strings, which means you have access to `${}` expressions. If you need more flexibility with inline js, you can create a self-executing function expression with code inside it like this: `${(() => { ... }())`.

@@ -194,2 +192,8 @@ code

## Command Line
You can compile odesza templates from the command line to `stdout` or an output file.
```
odesza <file> [-o <output>]
```
## Install

@@ -196,0 +200,0 @@ ```

'use strict';
const assert = require('assert');
const odesza = require('../');
const test = require('tape');
const path = require('path');
const diff = require('diff');
const fs = require('fs');

@@ -9,0 +7,0 @@ const fixture = file => path.join(__dirname, 'fixtures', file);

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc