https://github.com/ccnmtl/island-game
Masivukeni Island Game
https://github.com/ccnmtl/island-game
Last synced: 7 months ago
JSON representation
Masivukeni Island Game
- Host: GitHub
- URL: https://github.com/ccnmtl/island-game
- Owner: ccnmtl
- Created: 2015-12-21T18:08:03.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-06-12T07:27:28.000Z (almost 9 years ago)
- Last Synced: 2025-03-30T11:32:47.578Z (about 1 year ago)
- Language: JavaScript
- Size: 276 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
## Masivukeni Island Game
Packaging the Island Game activity from
[Masivukeni](https://github.com/ccnmtl/smart_sa/) as a reusable
javascript library.
(none of the rest of this really works yet. I'm doing documentation
driven development):
### Install
$ npm install island-game --save
make an entrypoint .js file somewhere:
```
var model = require('island-game').IslandGame;
var view = require('island-game').IslandGameView;
var jQuery = require('jquery');
var islandView = new view({
model: new model({
beforeMedication: true}),
el: 'div#island_container',
gender: 'F',
mode: 'after-medication'
});
```
Put some scaffold HTML elements in place:
```
```
configure webpack:
```
entry: [
"./media/island-game-entrypoint.js",
],
...
module: {
loaders: [
{ test: /\.css$/, loader: 'style-loader!css-loader' },
{ test: /\.png/, loader: 'file' },
...
```
```
$ webpack --config webpack.config.js
```
### Todo
* [ ] construct required DOM elements automatically. Basically
everything in
[here](https://github.com/ccnmtl/smart_sa/blob/master/smart_sa/island_game/templates/island_game/island.html)
* [ ] tests
* [ ] publish to npm
* [ ] image path fixes in js and css