Project

pnpm-rails

0.0
No release in over a year
For Rails projects using pnpm as package manager.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 6.0.0
 Project Readme

PNPM Rails

For Rails app using pnpm as package manager. Hook pnpm install and pnpm run build into rails assets:precompile. This gem is like jsbundling-rails but for pnpm. And no installer like webpack, rollup, etc.

Installation

gem "pnpm-rails"

Usage

When the deploy process assets:precompile gets called, pnpm install and pnpm run build will be called automatically. It assumed you have build script for building assets in package.json.

{
  "scripts": {
    "build": "webpack ..."
  }
}

Environment variables

  • SKIP_PNPM_INSTALL - skip pnpm install when assets:precompile gets called.
  • SKIP_JS_BUILD - disable hooking pnpm install and pnpm run build into assets:precompile.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/yfxie/pnpm-rails.

License

The gem is available as open source under the terms of the MIT License.