From aca6a67798ffb5267fe7e5d2745f951e0fa60744 Mon Sep 17 00:00:00 2001 From: mig Date: Wed, 5 Apr 2017 00:48:30 +0200 Subject: [PATCH] added links to API specs + node usage --- README.md | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b590e4c..280e22a 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ Building Using Jocly in a Web page ------------------------- -After building Jocly, copy the `dist/browser` directory as `jocly` into your project filesystem. +After building Jocly, copy the `dist/browser/` directory as `jocly/` into your project filesystem. Insert this line to your HTML source code: ```` @@ -45,8 +45,25 @@ Insert this line to your HTML source code: You are now ready to use the Jocly API through the `Jocly` global object. +Using Jocly in a node.js application +------------------------------------ + +After building Jocly, the `dist/node/` directory as the Jocly module: + +````Javascript +const Jocly = require("../jocly/dist/node"); +```` + +Or, you can figure out how to use [`npm link`](https://docs.npmjs.com/cli/link) and just do: +````Javascript +const Jocly = require("jocly"); +```` + +You are now ready to use the Jocly API through the `Jocly` entry point. + API Documentation ----------------- -This section is to be written. For now, check the examples into the `examples/browser` -and `examples/node` sub-directories. +Jocly offers two distinct APIs: +- the [Application API](https://github.com/mi-g/jocly/wiki/Application-API) to make Web applications +- the [Game API](https://github.com/mi-g/jocly/wiki/Game-API) to create games to run with Jocly features