Git Product home page Git Product logo

boxart-boiler's Introduction

rwd-game-boiler

Build Status Build Status

A boilerplate repo for building responsive and accessible Open Web Games using the DOM.

Why the DOM?

The DOM's boxmodel lends itself to responsive 2d-casual game board layouts, and the high tuned HTML render flows of our browsers are more battery safe, while providing ooportunities for graphics acceleration and performance. With boxart-boiler games, the idea is to build DOM-first. If you want to drop down into lower level drawing APIs, you can always temporarily rasterize and enhance an element outside of boxart.

Moreover, HTML gives us a way to represent whatever information we mean to convey visually, no matter how complex, in a way that assistive technologies can tap into. This is how we can make truly open Open Web Games.

System Dependencies

In order to use or contribute to this repo you'll need the following things installed on your system:

Getting Started

To start working with this repo and build your own responsive, accessible game we recommend you either download the code for the latest release from the releases page, or fork this repo and use git to clone your fork.

Once the code is on your machine open a terminal in its directory and run npm install; this will install all our dependencies and you'll be able to run the project's grunt tasks. To see the site hosted locally run grunt and visit: http://localhost:8080 in your browser of choice.

Build Tasks

The following tasks are provided by this boilerplate for use during development.

default

grunt

The default grunt task runs webpack-dev-server; a task which hosts your site on a local http server and watches your code for changes. When changes are detected webpack will automatically cut a new build and the code (where possible) will be automatically swapped into the browser, meaning you don't have to refresh the page to see updates. If the code cannot be hotswapped the page will be refreshed so the latest changes are visible. The webpack-dev-server task is configured in the grunt-webpack.js file in the tasks directory, and is setup to read the webpack.config.js file to configure webpack's behavior.

Generate Docs Site

grunt docs

TK

Lint

grunt lint

This repo uses eslint to enforce code quality and a consistent style across the project. Running grunt lint will notify you of any possible JS errors or style variations. This task is configured with numerous .eslintrc files that are scattered throughout the repo. Note that none of those files actually define linting rules, instead they reference predefined rule sets which live in the eslint directory.

An .editorconfig file is also provided to help reduce frustrating style errors that could bog down this linting task. If your text editor or IDE supports it, install an editor config plugin.

Test

grunt test

The test task first lints the code the runs our tests using the karma test runner. Testing in JS typically involves lots of moving parts and this project is no exception: tests leverage the Mocha Testing Framework, and the Chai Assertion Library.

This task also sets up a watcher that will re-run tests when changes are detected. To run the tests only once the task karma:ci can be used instead, but note it will only run the tests and skip linting.

Build

grunt build:dev

The build task uses Webpack to bundle our code for release for a dev environment. Before building this task runs both the lint and karma:ci tasks, to ensure code quality. The webpack.config.build.js file is used to configure webpack's behavior during this task.

Tech Stack and Tool Chain

This project makes liberal use of the following technologies:

boxart-boiler's People

Contributors

boazsender avatar bobholt avatar gnarf avatar kadamwhite avatar mattsurabian avatar mzgoddard avatar susanjrobertson avatar wilto avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.