0.0.6 • Published 4 years ago

shakti-node v0.0.6

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

shakti-node

Run Shakti code and get the results inside node.

CircleCI

runShakti('result: 1 2 3')
# [1,2,3]

Assign your output to a variable result in your shakti code.

Any shakti errors are thrown in node

Usage

Import it:

const { runShakti } = require('shakti-node')
// or
import {runShakti} from 'shakti-node'

and then:

runShakti('result: 1 2 3')
# [1,2,3]
runShaktiFromFile('./myFile.k')
runShaktiCommand('result: 1 2 3')
# {stderror: '', stdout: '', code: 1}
runShakti('`hello + 1')
# throws type error

Common errors

Error: No valid exports main found for

You need to run your program with --experimental-conditional-exports flag passed to node.

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago