git: a7ba0c40b595 - main - www/rubygem-jsbundling-rails-rails71: Add rubygem-jsbundling-rails-rails71 1.3.1
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 18 Sep 2024 06:18:48 UTC
The branch main has been updated by sunpoet:
URL: https://cgit.FreeBSD.org/ports/commit/?id=a7ba0c40b595a14c5f6a6593b5e76e95a42e722a
commit a7ba0c40b595a14c5f6a6593b5e76e95a42e722a
Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2024-09-18 05:51:47 +0000
Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2024-09-18 06:13:06 +0000
www/rubygem-jsbundling-rails-rails71: Add rubygem-jsbundling-rails-rails71 1.3.1
Import maps let you import JavaScript modules using logical names that map to
versioned/digested files -- directly from the browser. So you can build modern
JavaScript applications using JavaScript libraries made for ESM without the need
for transpiling or bundling.This frees you from needing Webpack, Yarn, npm, or
any other part of the JavaScript toolchain. All you need is the asset pipeline
that's already included in Rails.
With this approach you'll ship many small JavaScript files instead of one big
JavaScript file. Thanks to HTTP/2 that no longer carries a material performance
penalty during the initial transport, and in fact offers substantial benefits
over the long run due to better caching dynamics. Whereas before any change to
any JavaScript file included in your big bundle would invalidate the cache for
the the whole bundle, now only the cache for that single file is invalidated.
There's native support for import maps in Chrome/Edge 89+, and a shim available
for any browser with basic ESM support. So your app will be able to work with
all the evergreen browsers.
---
www/Makefile | 1 +
www/rubygem-jsbundling-rails-rails71/Makefile | 20 ++++++++++++++++++++
www/rubygem-jsbundling-rails-rails71/distinfo | 3 +++
www/rubygem-jsbundling-rails-rails71/pkg-descr | 12 ++++++++++++
4 files changed, 36 insertions(+)
diff --git a/www/Makefile b/www/Makefile
index 0d6e1a732396..f768d75e2d82 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -2101,6 +2101,7 @@
SUBDIR += rubygem-jruby-rack
SUBDIR += rubygem-jsbundling-rails
SUBDIR += rubygem-jsbundling-rails-rails70
+ SUBDIR += rubygem-jsbundling-rails-rails71
SUBDIR += rubygem-jsobfu
SUBDIR += rubygem-json-jwt
SUBDIR += rubygem-jsonb_accessor
diff --git a/www/rubygem-jsbundling-rails-rails71/Makefile b/www/rubygem-jsbundling-rails-rails71/Makefile
new file mode 100644
index 000000000000..938a442d6ea3
--- /dev/null
+++ b/www/rubygem-jsbundling-rails-rails71/Makefile
@@ -0,0 +1,20 @@
+PORTNAME= jsbundling-rails
+PORTVERSION= 1.3.1
+CATEGORIES= www rubygems
+MASTER_SITES= RG
+PKGNAMESUFFIX= -rails71
+
+MAINTAINER= sunpoet@FreeBSD.org
+COMMENT= Bundle and transpile JavaScript in Rails with esbuild, rollup.js, or Webpack
+WWW= https://github.com/rails/jsbundling-rails
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/MIT-LICENSE
+
+RUN_DEPENDS= rubygem-railties71>=6.0.0:www/rubygem-railties71
+
+USES= gem
+
+NO_ARCH= yes
+
+.include <bsd.port.mk>
diff --git a/www/rubygem-jsbundling-rails-rails71/distinfo b/www/rubygem-jsbundling-rails-rails71/distinfo
new file mode 100644
index 000000000000..525427ce99d0
--- /dev/null
+++ b/www/rubygem-jsbundling-rails-rails71/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1722711339
+SHA256 (rubygem/jsbundling-rails-1.3.1.gem) = 0fa03f6d051c694cbf55a022d8be53399879f2c4cf38b2968f86379c62b1c2ca
+SIZE (rubygem/jsbundling-rails-1.3.1.gem) = 10752
diff --git a/www/rubygem-jsbundling-rails-rails71/pkg-descr b/www/rubygem-jsbundling-rails-rails71/pkg-descr
new file mode 100644
index 000000000000..a9cca1c01efb
--- /dev/null
+++ b/www/rubygem-jsbundling-rails-rails71/pkg-descr
@@ -0,0 +1,12 @@
+Use esbuild, rollup.js, or Webpack to bundle your JavaScript, then deliver it
+via the asset pipeline in Rails. This gem provides installers to get you going
+with the bundler of your choice in a new Rails application, and a convention to
+use app/assets/builds to hold your bundled output as artifacts that are not
+checked into source control (the installer adds this directory to .gitignore by
+default).
+
+You develop using this approach by running the bundler in watch mode in a
+terminal with yarn build --watch (and your Rails server in another, if you're
+not using something like puma-dev). You can also use ./bin/dev, which will start
+both the Rails server and the JS build watcher (along with a CSS build watcher,
+if you're also using cssbundling-rails).