jzacsh / doodle

[clone of the original at https://gitlab.com/jzacsh/doodle] Yet another HTML5 webapp for drawing
https://study.j.zac.sh/doodle/
Apache License 2.0
0 stars 0 forks source link

Doodle App Build Status

This is a simple canvas doodling app I built, originaly to entertain a toddler. Like most vacation hacking, this app exploded over my two week break into a full fledged app with undo/redo, history-jumping, etc.

Feature Set

In Progress: Beware, some buttons just do: throw new Error('implement me!'); :)

Basically, this is super simple, history-recording canvas JavaScript. The intention is to have a useable, basic sketchboad, hopefully make other features easier to implement. Currently implemented:

Known Issues

I'm making heavy use of Github issues for this repo. The highlights:

Hacking

On first clone, quick npm install:

  git clone git@github.com:jzacsh/doodle.git &&
    cd doodle &&
    npm install

This is basically a tiny angularjs app, but could be built with anything. The real meat of this repo is in the vanilla JavaScript classes prefixed Doodle... and similarly vanilla JavaScript in lib/ directory to manage history and CanvasRenderingContext2D.

Testing

Run unit tests and watch for file updates, as you modify tests:

# one one terminal
$EDITOR test/*.js

# in another terminal
npm run testing  # or `npm run test` to just run once

Local Development

Of course, now that you have dilligently added failing tests, implement your features

Compile & serve locally, via npm watch automatic calls to npm run restart (or restartdev):

npm run watch # or `npm run watchdev` for uncompiled

Deploy to Your CDN

This is a static web app, meaning its plain text files that only a browser interprets. Just serve them from anywhere. The target files are produced in ./tmp/ by executing:

npm run build