Date: Tue, 11 Jan 2022 18:52:33 GMT From: Po-Chuan Hsieh <sunpoet@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 2c7fd167ef29 - main - www/rubygem-importmap-rails: Add rubygem-importmap-rails 1.0.1 Message-ID: <202201111852.20BIqX4W060286@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=2c7fd167ef29eb66efbfd8d7ff7894e1aea268d6 commit 2c7fd167ef29eb66efbfd8d7ff7894e1aea268d6 Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2022-01-11 16:56:21 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2022-01-11 18:43:48 +0000 www/rubygem-importmap-rails: Add rubygem-importmap-rails 1.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: https://github.com/rails/importmap-rails --- www/Makefile | 1 + www/rubygem-importmap-rails/Makefile | 24 ++++++++++++++++++++++++ www/rubygem-importmap-rails/distinfo | 3 +++ www/rubygem-importmap-rails/pkg-descr | 19 +++++++++++++++++++ 4 files changed, 47 insertions(+) diff --git a/www/Makefile b/www/Makefile index e9afa9734687..fb4cf69e9a57 100644 --- a/www/Makefile +++ b/www/Makefile @@ -1952,6 +1952,7 @@ SUBDIR += rubygem-httpclient SUBDIR += rubygem-httpi SUBDIR += rubygem-hurley + SUBDIR += rubygem-importmap-rails SUBDIR += rubygem-innate SUBDIR += rubygem-jekyll SUBDIR += rubygem-jekyll-sanity diff --git a/www/rubygem-importmap-rails/Makefile b/www/rubygem-importmap-rails/Makefile new file mode 100644 index 000000000000..f87196b3d706 --- /dev/null +++ b/www/rubygem-importmap-rails/Makefile @@ -0,0 +1,24 @@ +# Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org> + +PORTNAME= importmap-rails +PORTVERSION= 1.0.1 +CATEGORIES= www rubygems +MASTER_SITES= RG + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Use ESM with importmap to manage modern JavaScript in Rails without transpiling or bundling + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/MIT-LICENSE + +BROKEN_RUBY26= yes + +RUN_DEPENDS= rubygem-actionpack70>=6.0.0:www/rubygem-actionpack70 \ + rubygem-railties70>=6.0.0:www/rubygem-railties70 + +USES= gem +USE_RUBY= yes + +NO_ARCH= yes + +.include <bsd.port.mk> diff --git a/www/rubygem-importmap-rails/distinfo b/www/rubygem-importmap-rails/distinfo new file mode 100644 index 000000000000..9895cbc36eb9 --- /dev/null +++ b/www/rubygem-importmap-rails/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1641045742 +SHA256 (rubygem/importmap-rails-1.0.1.gem) = ddbf08621a8db64e7680d1dd39ad3d1be4082377c48448782c3419cb545884f0 +SIZE (rubygem/importmap-rails-1.0.1.gem) = 67072 diff --git a/www/rubygem-importmap-rails/pkg-descr b/www/rubygem-importmap-rails/pkg-descr new file mode 100644 index 000000000000..3845b7c48373 --- /dev/null +++ b/www/rubygem-importmap-rails/pkg-descr @@ -0,0 +1,19 @@ +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: https://github.com/rails/importmap-rails
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202201111852.20BIqX4W060286>