{"id":15512485,"url":"https://github.com/danielpclark/webpacker-cli","last_synced_at":"2025-08-03T03:16:11.908Z","repository":{"id":56897971,"uuid":"157121731","full_name":"danielpclark/webpacker-cli","owner":"danielpclark","description":"Bringing the power of Webpacker to any web framework.","archived":false,"fork":false,"pushed_at":"2019-03-04T19:26:34.000Z","size":37,"stargazers_count":26,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T03:51:32.654Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danielpclark.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":"2018-11-11T21:13:28.000Z","updated_at":"2020-09-09T02:38:55.000Z","dependencies_parsed_at":"2022-08-21T02:20:21.780Z","dependency_job_id":null,"html_url":"https://github.com/danielpclark/webpacker-cli","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielpclark%2Fwebpacker-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielpclark%2Fwebpacker-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielpclark%2Fwebpacker-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielpclark%2Fwebpacker-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielpclark","download_url":"https://codeload.github.com/danielpclark/webpacker-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244849647,"owners_count":20520758,"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-02T09:53:40.389Z","updated_at":"2025-03-21T18:33:30.783Z","avatar_url":"https://github.com/danielpclark.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"[![Gem Version](https://badge.fury.io/rb/webpacker_cli.svg)](http://badge.fury.io/rb/webpacker_cli)\n[![Build Status](https://travis-ci.org/danielpclark/webpacker-cli.svg)](https://travis-ci.org/danielpclark/webpacker-cli)\n\n# WebpackerCli\n\nBringing the impressive work of the Rails' **Webpacker** project **to be available for frameworks\nother than Rails**.  This is done by mocking the minimal amount of Rails for the Webpacker's\nRake commands to be able to run.\n\nWebpacker itself takes Webpack, which has a primary focus for pre-processing JavaScript related\ncode, and make pre-processing other kinds of files such as CSS, SASS, Images, VueJS, React,\nCoffeeScript, and other similar content as simple as a couple very minor edits.  Without Webpacker\nyou would need to go through quite a bit of extra work to get Webpack to handle non JS items.\n\nThis project makes asset packing and cache invalidation easy for any web framework by bringing\nWebpacker's tooling to the command line.  This cli tool is not meant to be used in a Rails project\n_(at least not until it's designed to not overwrite a few files that exist in Rails)_.\n\nThis project has the same dependencies/prerequisites as [Webpacker](https://github.com/rails/webpacker#prerequisites).\n\n## Installation\n\nInstall it yourself as:\n\n    $ gem install webpacker_cli\n\n_Note: If you have trouble compiling the Nokogiri dependency on Linux try installing the following packages: `build-essential ruby-dev libxml2-dev`_\n\n## Usage\n\nGeneral help is found with\n\n    $ webpacker-cli --help\n\nThe help menu will change after initialization within the project directory.\n\nAnd get started using it in your target project with:\n\n    $ webpacker-cli init\n\nThis creates the minimum files for Webpacker to work and runs `bundle` \u0026 `rake webpacker:install`.\nFrom here you have your configuration files for Webpack/Webpacker in the `config` directory.\n\nTo compile your assets you may now run:\n\n    $ webpacker-cli compile\n\nTo add support for another file type you can add a file to the `config/webpack/loaders`\ndirectory.  Then load it from `config/webpack/environment.js` and lastly add the file extension\nto the `config/webpacker.yml` under `default.extensions`.  Be sure to add the JS package with\na command like `yarn add`.\n\n\u003e Server Tip: It is recommended to compile your assets upon deploy rather than per web request.\n\nOnce your assets are compiled for deployment you will need to have your web application route\nthe assets by the file stored in `public/packs/manifest.json` which will look similar to:\n\n    {\n      \"application.js\": \"/packs/application-9578bdd78b657fa4358f.js\",\n      \"application.js.map\": \"/packs/application-9578bdd78b657fa4358f.js.map\"\n    }\n\nThis way Webpacker handles cache invalidation for you whenever you make changes to your assets.\nSo the `manifest.json` is the key-value pair of data used to be substitued in your web page views\nfor the `src` references.\n\n## Example Integration\n\nFor a good example of using this tool for integrating with your own language see [webpacker-rs](https://github.com/danielpclark/webpacker-rs).  This library uses this tool to add Webpacker as part of the default build process of web deployment for the Rust language.  In essence the user theirself is responsible for running `webpacker-cli init` and then **webpacker-rs** has two methods for deployment which validate dependencies on the server and then compile the assets.  After deployment then **webpacker-rs** also provides a method for looking up the file mappings from the `manifest.json` file and provides a convenience helper method for dealing with the path routing.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/danielpclark/webpacker-cli\n\n## License\n\nThe gem is available as open source under the terms of the [GNU Lesser General Public License version 3](https://opensource.org/licenses/LGPL-3.0).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielpclark%2Fwebpacker-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielpclark%2Fwebpacker-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielpclark%2Fwebpacker-cli/lists"}