{"id":13481907,"url":"https://github.com/mattn/goemon","last_synced_at":"2025-05-08T21:45:30.051Z","repository":{"id":27720238,"uuid":"31207523","full_name":"mattn/goemon","owner":"mattn","description":"五右衛門","archived":false,"fork":false,"pushed_at":"2023-02-25T05:22:07.000Z","size":475,"stargazers_count":181,"open_issues_count":3,"forks_count":14,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-31T18:41:24.609Z","etag":null,"topics":["devops","go"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mattn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"mattn","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2015-02-23T12:40:02.000Z","updated_at":"2025-02-19T18:03:51.000Z","dependencies_parsed_at":"2024-06-18T23:09:13.046Z","dependency_job_id":null,"html_url":"https://github.com/mattn/goemon","commit_stats":{"total_commits":108,"total_committers":11,"mean_commits":9.818181818181818,"dds":"0.15740740740740744","last_synced_commit":"20d0f2b0e34a9aee1502dcf03bd9fdea48216d78"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattn%2Fgoemon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattn%2Fgoemon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattn%2Fgoemon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattn%2Fgoemon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattn","download_url":"https://codeload.github.com/mattn/goemon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253154357,"owners_count":21862509,"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":["devops","go"],"created_at":"2024-07-31T17:00:57.330Z","updated_at":"2025-05-08T21:45:30.030Z","avatar_url":"https://github.com/mattn.png","language":"Go","funding_links":["https://github.com/sponsors/mattn"],"categories":["Go"],"sub_categories":[],"readme":"# goemon\n\n![](https://raw.githubusercontent.com/mattn/goemon/master/data/goemon.png)\n\n**Go** **E**xtensible **Mon**itoring\n\nSpeed up your development.\nIf you updated js files, the page should be reloaded. If you updated go files, the app should be recompiled, and should be restarted. And also, the page should be reloaded\n\n## Expected directory structure\n\n```\n+---assets\n|   +- index.html\n|   +- app.css\n|   +- app.js\n+- main.go\n```\n\n## Usage\n\nFor example:\n\n### Run web server\n```\n$ goemon -g \u003e goemon.yml\n$ goemon go run main.go\n```\n\n### Writing markdown\n```\n$ goemon -g md \u003e goemon.yml\n$ goemon --\n```\n\n### Writing C code\n```\n$ goemon -g c \u003e goemon.yml\n$ goemon --\n```\n\n## Default configuration\n\n```yaml\n# Generated by goemon -g\nlivereload: :35730\ntasks:\n- match: './assets/*.js'\n  commands:\n  - minifyjs -m -i ${GOEMON_TARGET_FILE} \u003e ${GOEMON_TARGET_DIR}/${GOEMON_TARGET_NAME}.min.js\n  - :livereload /\n- match: './assets/*.css'\n  commands:\n  - :livereload /\n- match: './assets/*.html'\n  commands:\n  - :livereload /\n- match: '*.go'\n  commands:\n  - go build\n  - :restart\n  - :livereload /\n```\n\n* `match` is wildcard. You can use `./foo/bar/**/*.js` like a shell.\n* `commands` is list of commands to run. `:XXX` is internal command.\n\n| Internal Command  |             Behavior            |\n|-------------------|---------------------------------|\n| :livereload /path | reload `path`                   |\n| :minify           | minify js/css(work in progress) |\n| :restart          | restart app                     |\n| :sleep 3000       | sleep 3000ms                    |\n| :fizzbuzz 100     | do fizzbuzz(1 to 100)           |\n| :event :Foo       | fire event :Foo                 |\n\n`:event :Foo` fire event defined `- match: :Foo`.\n\nCurrently, `:minify` is work in progress. So you should run `minifyjs` command to do it.\nFor example, configuration in above works as below.\n\n|     Pattern      |             Behavior            |\n|------------------|---------------------------------|\n| ./assets/\\*.css  | reload page                     |\n| ./assets/\\*.js   | minify js/css, reload page      |\n| ./assets/\\*.html | reload page                     |\n| ./assets/\\*.go   | build, restart app, reload page |\n\n## LiveReload\n\nYou can use livereload feature.\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003chead\u003e\n  \u003cmeta charset=\"UTF-8\"\u003e\n  \u003cscript src=\"http://localhost:35730/livereload.js\"\u003e\u003c/script\u003e\n  \u003cscript src=\"/app.css\"\u003e\u003c/script\u003e\n  \u003cscript src=\"/app.min.js\"\u003e\u003c/script\u003e\n  \u003ctitle\u003eYour App\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n\u003c!-- Your Code --\u003e  \n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n## Use goemon as library\n\n```\ncat \u003e goemon.go\npackage main\n\nimport (\n\t_ \"github.com/mattn/goemon/auto\"\n)\n^D\n```\n\nThen `go build`. You don't need to use `goemon` command.\n\n\n## Installation\n\n```\n$ go get github.com/mattn/goemon/cmd/goemon\n```\nIf you want to minify js, install minifyjs like below.\n\n```\n$ npm install -g minifyjs\n```\n\n## License\n\nMIT\n\n## Author\n\nYasuhiro Matsumoto (a.k.a mattn)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattn%2Fgoemon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattn%2Fgoemon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattn%2Fgoemon/lists"}