{"id":17996711,"url":"https://github.com/zk/inky","last_synced_at":"2025-03-26T04:30:46.556Z","repository":{"id":12554686,"uuid":"15224964","full_name":"zk/inky","owner":"zk","description":"Sketch in ClojureScript","archived":false,"fork":false,"pushed_at":"2014-02-21T04:46:29.000Z","size":1347,"stargazers_count":3,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-21T05:22:19.721Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://inky.cc","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-12-16T12:16:04.000Z","updated_at":"2019-10-30T02:25:19.000Z","dependencies_parsed_at":"2022-09-05T10:50:31.938Z","dependency_job_id":null,"html_url":"https://github.com/zk/inky","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zk%2Finky","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zk%2Finky/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zk%2Finky/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zk%2Finky/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zk","download_url":"https://codeload.github.com/zk/inky/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245589132,"owners_count":20640232,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-29T21:15:37.963Z","updated_at":"2025-03-26T04:30:46.259Z","avatar_url":"https://github.com/zk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# inky.cc\n\nA ClojureScript sketchbook.\n\n[![Build Status](https://travis-ci.org/zkim/nsfw.png)](https://travis-ci.org/zk/inky)\n\n![](http://f.cl.ly/items/3N443a2i1m0j21053A3N/Screen%20Shot%202013-12-23%20at%203.45.41%20PM.png)\n\n\n## Working on Sketches Locally\n\nInky has a dev mode to work on sketches locally. Why? Sub-second (2-3s\nnow, sub-second to return shortly) recompiles and source maps.\n\nJust add the lein-inky plugin to your `~/.lein/profiles.clj` like so:\n\n```bash\n{:user {:plugins [[lein-inky \"0.1.7\"]]}}\n```\n\nAfter that:\n\n1. Create a gist with a cljs file. Easy start: fork\n   [this gist](https://gist.github.com/zk/8108564).\n2. Clone that gist locally: `git clone git@gist.github.com/\u003cgist-id\u003e.git`\n3. `cd \u003cgist-id\u003e`\n4. `lein inky`. Once the server is running visit\n   [http://localhost:4659](http://localhost:4659).\n\n\nOne gotcha, for source maps to correctly resolve your file, you must\nname it after the last part of the ns. For example, if the ns if your\nsketch is `foo.bar.baz`, name the file `baz.cljs` (in the root\ndirectory of the gist).\n\nStarter gist to fork: https://gist.github.com/zk/8108564\n\n\n## Prereqs\n\n* https://github.com/ddollar/foreman\n* http://www.mongodb.org/ (brew / apt / yum ok)\n\n\n## Config\n\nEnv vars:\n\n* `PORT` -- web port to bind to\n* `AWS_ACCESS_ID` -- s3 creds\n* `AWS_SECRET_ACCESS_KEY`\n* `AWS_S3_BUCKET` -- s3 bucket to store compiled code\n* `GA_TRACKING_ID` -- Google Analytics\n* `GA_TRACKING_HOST` -- ex. 'inky.cc'\n* `MONGO_URL` -- DB connection url, mongodb:// format\n* `GH_CLIENT_ID` -- GH app creds\n* `GH_CLIENT_SECRET`\n* `NUM_WORKERS` -- Number of compile workers to spawn, defaults to 2\n\n\n## Dev\n\nCopy bin/dev.sample to bin/dev, fill in appropriate env vars. Note that the env vars are only necessary if you're working on inky. If you're working on a sketch locally, only `$PORT` is required (provided by foreman).\n\n**Warning:** There's a nasty bug where foreman won't correctly kill java processes it starts **when foreman exits due to a child process exiting** (this behavior doesn't manifest when you SIGINT foreman). You may need to manually kill previous processes manually.\n\n\n## Testing\n\nRun `bin/test`\n\n\n## Deploy\n\nDeploys to Heroku. Run `bin/ship`\n\n* Don't forget to bump inky's version number any time deps change\n  (including dep version changes).\n\n## Bumping Versions\n\nThis should be done when new cljs libs are added, or the lein plugin is updated.\n\nPlaces to bump:\n\n* `project.clj`\n* `plugin/project.clj` 2x\n* `README.md`\n* `src/clj/inky/local.clj`\n\nIf you're adding a new lib, don't forget to add it to `inky.config/cljs-libs`.\n\n\n## TODO\n\n* Report compilation progress on compile page\n* Handle s3 connection error / timeout (errors into compiling state\n  right now).\n* Chart compile wait times\n* Compile times are looooooong, ~45-120 seconds on heroku, figure\n  something out here.\n* Implement better way than newing `Thread`s for spawning workers\n* Fix mobile experience\n\n\n## Internals\n\n### Job States\n\nInky runs several worker threads internally to compile gists, which\npull from a job queue backed by MongoDB (`:compile-jobs`). Jobs\ntransition through several states as they are compiled, and as errors\npop up. All flags are unix timestamps unless otherwise specified.\n\n* Enqueued -- `:created` is set.\n* Compiling -- `:created` and `:started` are set.\n* Compile completed successfully -- `:created`, `:started`, and\n  `:succeeded` are set.\n* Compile errored -- `:created`, `:started`, and `:failed` are set\n  (see `:error-cause` for message).\n\nThis is a first cut on representing the different job states.\n\n\n## License\n\nCopyright © 2013 Zachary Kim http://zacharykim.com\n\nDistributed under the Eclipse Public License either version 1.0 or (at\nyour option) any later version.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzk%2Finky","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzk%2Finky","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzk%2Finky/lists"}