Installation

npm install jome.js -g

Usage

jome # executes index.jome or the file specified by the entry "main" in config.jome
jome file.jome # execute the given file
jome server start # pass the arguments "server" and "start" to index.jome executable

TODO: Link: For the complete overview, see CLI in depth.

Hello world

Create a file hello.jome with the following content:

console.log "Hello world!"

In a terminal, this gives:

jome hello.jome
# => Hello world!

File parameters

A .jome file is compiled into a function. You can pass arguments to it using the with keyword.

Let's modify the file hello.jome

with name end
console.log "Hello {name}!"

This gives:

jome hello.jome Paul
# => Hello Paul!

index.jome

By default, index.jome is executed if no .jome file is given to the CLI.

Let's write inside the file index.jome

with cmd, message end

if cmd === 'say'
  console.log message
end

This gives:

jome say "Hello Anna!"
# => Hello Anna!

config.jome

config.jome contains all the configuration of the project and the language itself.

TODO: Give an example of a config.jome file.

meta #{
  main: "./server.jome" // Set server.jome as the default file executed when running jome without a file.
  scripts: 
    s: {file: "./server.jome", alias: "server"}
}

TODO: Link: For the complete overview, see config.jome in depth.

createjomeapp

To help you get started, you can use the createjomeapp command and answer it's questions.

npm install createjomeapp -g

Usage:

createjomeapp . # Configure the current folder
createjomeapp some/folder # Create or configure a given folder
createjomeapp --flavor=js --template=web_server . # You can specify some settings directly

TODO: Link: For the complete overview, see createjomeapp.