{"id":14955639,"url":"https://github.com/ales-vilchytski/modulejs-rails","last_synced_at":"2025-10-08T18:06:26.561Z","repository":{"id":23743514,"uuid":"27117409","full_name":"ales-vilchytski/modulejs-rails","owner":"ales-vilchytski","description":"Lightweight JavaScript module system for Ruby on Rails 4","archived":false,"fork":false,"pushed_at":"2017-03-29T16:16:24.000Z","size":14,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-01T01:31:20.236Z","etag":null,"topics":["asset-pipeline","javascript","rails4","ruby"],"latest_commit_sha":null,"homepage":null,"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/ales-vilchytski.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":"2014-11-25T09:05:39.000Z","updated_at":"2017-04-05T06:08:51.000Z","dependencies_parsed_at":"2022-07-25T10:32:05.859Z","dependency_job_id":null,"html_url":"https://github.com/ales-vilchytski/modulejs-rails","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ales-vilchytski/modulejs-rails","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ales-vilchytski%2Fmodulejs-rails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ales-vilchytski%2Fmodulejs-rails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ales-vilchytski%2Fmodulejs-rails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ales-vilchytski%2Fmodulejs-rails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ales-vilchytski","download_url":"https://codeload.github.com/ales-vilchytski/modulejs-rails/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ales-vilchytski%2Fmodulejs-rails/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278862338,"owners_count":26058922,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["asset-pipeline","javascript","rails4","ruby"],"created_at":"2024-09-24T13:11:29.015Z","updated_at":"2025-10-08T18:06:26.503Z","avatar_url":"https://github.com/ales-vilchytski.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# modulejs for Ruby on Rails 4 Assets Pipeline\n\nLightweight JavaScript module system (http://larsjung.de/modulejs/), v2.2.0.\nInspired by article: https://www.reinteractive.net/posts/172-a-better-way-to-modularise-your-js-in-rails\n\nWhen you want to use modules in JavaScript you should solve next problems:\n\n1. Load scripts with dependencies, usually in big concatenated JavaScript file\n2. Execute scripts and dependencies in proper order\n\nRails solves problem #1 by Assets Pipeline, modulejs solves problem #2.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'modulejs-rails'\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself as:\n\n    $ gem install modulejs-rails\n\n## Usage\n\nRequire _modulejs_ in Assets Pipeline manifest\n\n    //= require 'modulejs'\n    \nDefine your own modules (_this_ in functions points to _window_):\n\n```javascript\nmodulejs.define('bar', ['foo'], function (foo) {\n    // module setup code and definitions\n    return some_bar_object;\n});\n```\n\nOr setup 3rd party code:\n```javascript\nmodulejs.define('foo', Foo);\n```\n\nAnd require them when needed:\n\n```javascript\nvar bar = modulejs.require('bar');\nbar.doStuff();\n```\n\nSee full documentation here: https://larsjung.de/modulejs/\n\n## Contributing\n\n1. Fork it ( https://github.com/ales-vilchytski/modulejs-rails/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fales-vilchytski%2Fmodulejs-rails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fales-vilchytski%2Fmodulejs-rails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fales-vilchytski%2Fmodulejs-rails/lists"}