1.0.0 • Published 8 years ago

island-game v1.0.0

Weekly downloads
1
License
BSD-2-Clause
Repository
github
Last release
8 years ago

Masivukeni Island Game

Packaging the Island Game activity from Masivukeni 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:

    <div id="island_container" class="island-container"></div>

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
  • tests
  • publish to npm
  • image path fixes in js and css