{"id":19873724,"url":"https://github.com/hokaccha/simpacker","last_synced_at":"2025-04-04T18:09:07.861Z","repository":{"id":44955811,"uuid":"151100655","full_name":"hokaccha/simpacker","owner":"hokaccha","description":"Use modern JavaScript build system in Rails.","archived":false,"fork":false,"pushed_at":"2024-04-29T00:30:13.000Z","size":938,"stargazers_count":134,"open_issues_count":0,"forks_count":14,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-04-29T01:33:20.585Z","etag":null,"topics":["javascript","rails","ruby","webpack"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/hokaccha.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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":"hokaccha"}},"created_at":"2018-10-01T14:17:23.000Z","updated_at":"2024-06-19T09:57:28.427Z","dependencies_parsed_at":"2024-06-19T09:57:05.594Z","dependency_job_id":"4721d87c-cba8-41e2-9ed7-87076e860c3f","html_url":"https://github.com/hokaccha/simpacker","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hokaccha%2Fsimpacker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hokaccha%2Fsimpacker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hokaccha%2Fsimpacker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hokaccha%2Fsimpacker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hokaccha","download_url":"https://codeload.github.com/hokaccha/simpacker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247226215,"owners_count":20904465,"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":["javascript","rails","ruby","webpack"],"created_at":"2024-11-12T16:19:41.728Z","updated_at":"2025-04-04T18:09:07.831Z","avatar_url":"https://github.com/hokaccha.png","language":"Ruby","readme":"# Simpacker\n\n[![CI](https://github.com/hokaccha/simpacker/actions/workflows/ci.yml/badge.svg)](https://github.com/hokaccha/simpacker/actions/workflows/ci.yml)\n[![Gem Version](https://badge.fury.io/rb/simpacker.svg)](https://badge.fury.io/rb/simpacker)\n\nSimpacker provides the feature to integrate modern JavaScript build system with Rails, like a [webpacker](https://github.com/rails/webpacker).\n\n## Installation\n\nCreate a new rails application without webpacker.\n\n```\n$ rails new myapp --skip-javascript\n```\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'simpacker'\n```\n\nRun the following to install Simpacker:\n\n```\n$ rails simpacker:install\n```\n\nAdd `javascript_pack_tag` in view.\n\n```\n\u003c%= javascript_pack_tag 'application' %\u003e\n```\n\nRun the folloing command to build JavaScript.\n\n```\n$ ./node_modules/.bin/webpack --watch\n```\n\n## Examples\n\n- Webpack settings\n  - [webpack-dev-server](https://github.com/hokaccha/simpacker/tree/master/example/webpack-dev-server)\n  - [Multiple Entry Point](https://github.com/hokaccha/simpacker/tree/master/example/multiple-entry-points)\n  - [Split Chunks](https://github.com/hokaccha/simpacker/tree/master/example/split-chunks)\n- Transpilers\n  - [TypeScript](https://github.com/hokaccha/simpacker/tree/master/example/typescript)\n  - [Babel](https://github.com/hokaccha/simpacker/tree/master/example/babel)\n- Style Sheets\n  - [CSS](https://github.com/hokaccha/simpacker/tree/master/example/css)\n  - [Sass](https://github.com/hokaccha/simpacker/tree/master/example/sass)\n  - [PostCSS](https://github.com/hokaccha/simpacker/tree/master/example/postcss)\n- Frameworks\n  - [React(TypeScript)](https://github.com/hokaccha/simpacker/tree/master/example/react-typescript)\n  - [React(Babel)](https://github.com/hokaccha/simpacker/tree/master/example/react-babel)\n  - [Vue.js](https://github.com/hokaccha/simpacker/tree/master/example/vue)\n  - [Angular](https://github.com/hokaccha/simpacker/tree/master/example/angular)\n- Deployment\n  - [CDN](https://github.com/hokaccha/simpacker/tree/master/example/asset-host)\n  - [Heroku](https://github.com/hokaccha/simpacker/tree/master/example/heroku)\n  - [Docker](https://github.com/hokaccha/simpacker/tree/master/example/docker)\n- Advanced settings\n  - [Rails Engines](https://github.com/hokaccha/simpacker/tree/master/example/engines)\n- Bundler\n  - [Parcel](https://github.com/hokaccha/simpacker/tree/master/example/parcel)\n\n## VS. Webpacker\n\nWebpacker is a great product that you can easily use webpack without knowing it. It also provides many useful features. The difficulty with Webpacker is that you need to configure webpack via webpacker's own DSL and webpacker.yml. If you know how to configure webpack, you need to convert it to webpacker configuration. I want to edit webpack.config.js directly!\n\nSimpacker provides only minimal features that lookup the manifest.json output by webpack and a create script tag through javascript_pack_tag. You need to know about webpack, but there is little to know about Simpacker.\n\nHowever, some useful features of Webpacker, such as yarn integrity and compilation on request, are not available in Simpacker.\n\n## Deployment\n\nSimpacker does not provide feature for deployment. Just run the following command at deployment.\n\n```\n$ npm install\n$ NODE_ENV=production ./node_modules/.bin/webpack\n```\n\nSee also: [CDN](https://github.com/hokaccha/simpacker/tree/master/example/asset-host), [Heroku](https://github.com/hokaccha/simpacker/tree/master/example/heroku), [Docker](https://github.com/hokaccha/simpacker/tree/master/example/docker)\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/hokaccha/simpacker.\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/hokaccha"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhokaccha%2Fsimpacker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhokaccha%2Fsimpacker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhokaccha%2Fsimpacker/lists"}