git: 9b6edc5b2246 - main - rubygem-importmap-rails-rails71: Add rubygem-importmap-rails-rails71 2.0.1

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Wed, 18 Sep 2024 06:18:46 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9b6edc5b22460ea3404510da4f0c99c4fc21bf6d

commit 9b6edc5b22460ea3404510da4f0c99c4fc21bf6d
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2024-09-18 05:51:43 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2024-09-18 06:13:05 +0000

    rubygem-importmap-rails-rails71: Add rubygem-importmap-rails-rails71 2.0.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-importmap-rails-rails71/Makefile  | 22 ++++++++++++++++++++++
 www/rubygem-importmap-rails-rails71/distinfo  |  3 +++
 www/rubygem-importmap-rails-rails71/pkg-descr | 17 +++++++++++++++++
 4 files changed, 43 insertions(+)

diff --git a/www/Makefile b/www/Makefile
index 5e9712428a5b..0d6e1a732396 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -2083,6 +2083,7 @@
     SUBDIR += rubygem-hurley
     SUBDIR += rubygem-importmap-rails
     SUBDIR += rubygem-importmap-rails-rails70
+    SUBDIR += rubygem-importmap-rails-rails71
     SUBDIR += rubygem-innate
     SUBDIR += rubygem-jekyll
     SUBDIR += rubygem-jekyll-sanity
diff --git a/www/rubygem-importmap-rails-rails71/Makefile b/www/rubygem-importmap-rails-rails71/Makefile
new file mode 100644
index 000000000000..c554fab973b3
--- /dev/null
+++ b/www/rubygem-importmap-rails-rails71/Makefile
@@ -0,0 +1,22 @@
+PORTNAME=	importmap-rails
+PORTVERSION=	2.0.1
+CATEGORIES=	www rubygems
+MASTER_SITES=	RG
+PKGNAMESUFFIX=	-rails71
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Use ESM with importmap to manage modern JavaScript in Rails without transpiling or bundling
+WWW=		https://github.com/rails/importmap-rails
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/MIT-LICENSE
+
+RUN_DEPENDS=	rubygem-actionpack71>=6.0.0:www/rubygem-actionpack71 \
+		rubygem-activesupport71>=6.0.0:devel/rubygem-activesupport71 \
+		rubygem-railties71>=6.0.0:www/rubygem-railties71
+
+USES=		gem
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/www/rubygem-importmap-rails-rails71/distinfo b/www/rubygem-importmap-rails-rails71/distinfo
new file mode 100644
index 000000000000..7e2accab9a2d
--- /dev/null
+++ b/www/rubygem-importmap-rails-rails71/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1708450620
+SHA256 (rubygem/importmap-rails-2.0.1.gem) = e739a6e70c09f797688c6983fa79567ec1edc9becc30d55b3f7cc897b1825586
+SIZE (rubygem/importmap-rails-2.0.1.gem) = 16384
diff --git a/www/rubygem-importmap-rails-rails71/pkg-descr b/www/rubygem-importmap-rails-rails71/pkg-descr
new file mode 100644
index 000000000000..184d7013fa42
--- /dev/null
+++ b/www/rubygem-importmap-rails-rails71/pkg-descr
@@ -0,0 +1,17 @@
+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.