Skip to content

Commit

Permalink
Updated doc and formats
Browse files Browse the repository at this point in the history
  • Loading branch information
y-lohse committed Sep 21, 2016
1 parent e65673a commit c5b4977
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = function(grunt) {
moduleName: 'inkjs',
},
release: {
dest: 'dist/ink.js',
dest: 'dist/ink-es2015.js',
src: exposedFiles
},
legacy: {
Expand All @@ -31,7 +31,7 @@ module.exports = function(grunt) {
}),
],
},
dest: 'dist/ink-legacy.js',
dest: 'dist/ink.js',
src: exposedFiles
},
legacy_min: {
Expand All @@ -45,7 +45,7 @@ module.exports = function(grunt) {
uglify(),
],
},
dest: 'dist/ink-legacy.min.js',
dest: 'dist/ink.min.js',
src: exposedFiles
}
},
Expand Down
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,27 @@

This is a javascript port of inkle's [ink](https://github.com/inkle/ink), a scripting language for writing interactive narrative. Please have a look at [the demo](http://yannick-lohse.fr/inkjs/)!

inkjs should support pretty much everything the original version does. If you find any bugs, please report them here! The code has zero dependencies and it should work in node and all evergreen browsers.
inkjs should support pretty much everything the original version does. If you find any bugs, please report them here! The code has zero dependencies and it should work in node.js and all evergreen browsers.

## Getting started *browser version*

### Installation

Grab the most convenient format for you from the [release page](https://github.com/y-lohse/inkjs/releases). If in doubt, use the iife version.
Grab the ink.js file from the [latest release](https://github.com/y-lohse/inkjs/releases).

It's also available on bower: `bower install inkjs`
There's an ES2015 version available if you only target browsers with basic ES 2015 support that has a lighter footprint.
Both versions use Universal Module Definition (UMD), so you can use it with [RequireJS](http://requirejs.org/) or basically any other module loader. If you don't know what any of this means, don't worry, you'll be fine too.
It's also available on bower: `bower install inkjs`.

### Loading inkjs

If you're using the IIFE version, add the script to your page and it will create aglobal object called `inkjs`. If you're using the AMD/UMD version, you need to require the package using your prefered mechanism.
Add the script to your page:

The `inkjs` has a property called `Story`. This is the main class we will interact with.
```
<script src="ink.js"></script>
```

This will create a global object named `inkjs`. It has a property called `Story` which is the main class we will interact with.

### Loading a json file

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "inkjs",
"version": "1.1.1",
"description": "A javascript port of inkle's ink scripting language (http://www.inklestudios.com/ink/)",
"main": "dist/ink.js",
"main": "dist/ink-es2015.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "grunt rollup",
Expand Down

0 comments on commit c5b4977

Please sign in to comment.