diff options
| author | Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2022-01-11 16:56:21 +0000 |
|---|---|---|
| committer | Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2022-01-11 18:43:48 +0000 |
| commit | 2c7fd167ef29eb66efbfd8d7ff7894e1aea268d6 (patch) | |
| tree | 43ccc351511ad0c9c82baf305a8651daf78793a7 | |
| parent | 1f4cc8f0e33438ceaa52fb088a5424a9695bd255 (diff) | |
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
| -rw-r--r-- | www/Makefile | 1 | ||||
| -rw-r--r-- | www/rubygem-importmap-rails/Makefile | 24 | ||||
| -rw-r--r-- | www/rubygem-importmap-rails/distinfo | 3 | ||||
| -rw-r--r-- | www/rubygem-importmap-rails/pkg-descr | 19 |
4 files changed, 47 insertions, 0 deletions
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 |
