{"id":15405530,"url":"https://github.com/koic/minifyrb","last_synced_at":"2025-04-17T01:52:50.171Z","repository":{"id":254525998,"uuid":"835022266","full_name":"koic/minifyrb","owner":"koic","description":"A minifier of Ruby files.","archived":false,"fork":false,"pushed_at":"2025-01-02T17:04:38.000Z","size":70,"stargazers_count":19,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T12:20:22.194Z","etag":null,"topics":["minify","minify-ruby","ruby","uglify"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/koic.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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":"koic"}},"created_at":"2024-07-29T02:07:30.000Z","updated_at":"2025-02-10T13:17:15.000Z","dependencies_parsed_at":"2024-10-19T11:21:16.077Z","dependency_job_id":"a41149c0-d4a0-4942-90bb-8d7791c172f0","html_url":"https://github.com/koic/minifyrb","commit_stats":{"total_commits":58,"total_committers":1,"mean_commits":58.0,"dds":0.0,"last_synced_commit":"2d5b32e452c2555f1b39549d2fc42db9e9ae0042"},"previous_names":["koic/minifyrb"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koic%2Fminifyrb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koic%2Fminifyrb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koic%2Fminifyrb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koic%2Fminifyrb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koic","download_url":"https://codeload.github.com/koic/minifyrb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249299678,"owners_count":21246876,"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":["minify","minify-ruby","ruby","uglify"],"created_at":"2024-10-01T16:16:56.806Z","updated_at":"2025-04-17T01:52:50.150Z","avatar_url":"https://github.com/koic.png","language":"Ruby","readme":"# Minify Ruby\n\n[![Gem Version](https://badge.fury.io/rb/minifyrb.svg)](https://badge.fury.io/rb/minifyrb)\n[![CI](https://github.com/koic/minifyrb/actions/workflows/test.yml/badge.svg)](https://github.com/koic/minifyrb/actions/workflows/test.yml)\n\nA minifier of Ruby files.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'minifyrb'\n```\n\nAnd then execute:\n\n```console\n$ bundle install\n```\n\nOr install it yourself as:\n\n```console\n$ gem install minifyrb\n```\n\n## Usage\n\nFor execution from the command line, use `minifyrb` command:\n\n```console\n$ cat path/to/example.rb\ndef foo\n  bar(arg, **options) do\n    baz.qux\n  end\nend\n\n$ minifyrb path/to/example.rb\ndef foo;bar(arg,**options) do baz.qux;end;end\n```\n\nYou can check the command line options with `-h` or `--help`:\n\n```console\n$ minifyrb -h\nUsage: minifyrb [options] [file1, file2, ...]\n    -v, --version                    Output the version number.\n    -o, --output \u003cfile\u003e              Output file (default STDOUT).\n```\n\n### Rake Task\n\nYou can define a Rake task for Minify. Please write the following code in your Rakefile:\n\n```ruby\n# Rakefile\nrequire 'minifyrb/rake_task'\nMinifyrb::RakeTask.new\n```\n\nThe task `rake minifyrb` will be defined:\n\n```console\n$ bundle exec rake -T\nrake minifyrb                 # Minify Ruby files in the current directory and subdirectories\n```\n\n### Ruby API\n\nFrom Ruby code, use `Minifyrb::Minifier#minify` API:\n\n```ruby\nrequire 'minifyrb'\n\nsource = \u003c\u003c~'RUBY'\n  def say(name)\n    puts \"Hello, #{name}!\"\n  end\nRUBY\n\nMinifyrb::Minifier.new(source).minify # =\u003e \"def say(name)puts\\\"Hello, \\#{name}!\\\";end\\n\"\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/koic/minifyrb.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","funding_links":["https://github.com/sponsors/koic"],"categories":["Ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoic%2Fminifyrb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoic%2Fminifyrb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoic%2Fminifyrb/lists"}