sprockets-esbuild 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5246ad865fb26e08ce0a305c8f828e41ed83b0ddbc778e123457b454c71daf4a
4
- data.tar.gz: a920c21b7a2910ec105c37e3a554dd2cc495e37378ab62eb55854efd58e1b417
3
+ metadata.gz: ba4d356fee1fd0f71fef9dc414ec9abe50a37e45670640d14e365925a5b431ca
4
+ data.tar.gz: 36e320940a5ae86295bf1ca2e9bdcec84f9ba004dae21bfcba307ea94f728557
5
5
  SHA512:
6
- metadata.gz: 8c5cb84dc61c7c4dcceb1667ba6d6997f2f10cba8f73bfe4a5c36587bce6961faf69b0d390ad47c9c7ce3e61c7c9a0951bfe72ff7cc592cf855c177e896d06ba
7
- data.tar.gz: 4402a53b024d8ed8a707c40dd53d02f109d33621bb509ebc2a32d1bc86dfca45e6839e1c5fdc0d86b14d72688503d81e3d7fa175b35fa740aab2c311d1c58c8a
6
+ metadata.gz: 99db531229668f9dadeca630ae8d4bd0e958abc5afc08d217102230f3a7fe841ebfdf1676d478c69f0dd13684898ec72a6c9e4ac7c340fddd5818b8521a32938
7
+ data.tar.gz: a2ea342368d2b5ed9e25c22f4759d0901aa6fe37146c8d084aba59d2df56dac6839a760ab2d6cca5d1aab9ff5d73a5174366904d17e2f6fc592a248deb5f798f
data/exe/esbuild ADDED
@@ -0,0 +1,37 @@
1
+ #! /usr/bin/env ruby
2
+ # because rubygems shims assume a gem's executables are Ruby
3
+
4
+ require "sprockets-esbuild/upstream"
5
+
6
+ supported_platforms = SprocketsEsbuild::Upstream::NATIVE_PLATFORMS.keys
7
+ platform = [:cpu, :os].map { |m| Gem::Platform.local.send(m) }.join("-")
8
+
9
+ if supported_platforms.none? { |supported_platform| Gem::Platform.match(supported_platform) }
10
+ STDERR.puts(<<~ERRMSG)
11
+ ERROR: sprockets-esbuild does not support the #{platform} platform
12
+ ERRMSG
13
+ exit 1
14
+ end
15
+
16
+ exe_path = Dir.glob(File.join(__dir__, "*", "esbuild")).find do |f|
17
+ Gem::Platform.match(File.basename(File.dirname(f)))
18
+ end
19
+ if exe_path.nil?
20
+ STDERR.puts(<<~ERRMSG)
21
+ ERROR: Cannot find the esbuild executable for #{platform} in #{__dir__}
22
+ If you're using bundler, please make sure you're on the latest bundler version:
23
+
24
+ gem install bundler
25
+ bundle update --bundler
26
+
27
+ Then make sure your lock file includes this platform by running:
28
+
29
+ bundle lock --add-platform #{platform}
30
+ bundle install
31
+
32
+ See `bundle lock --help` output for details.
33
+ ERRMSG
34
+ exit 1
35
+ end
36
+
37
+ system exe_path, *ARGV
@@ -0,0 +1,14 @@
1
+ module SprocketsEsbuild
2
+ # constants describing the upstream esbuild project
3
+ module Upstream
4
+ VERSION = "0.14.5"
5
+
6
+ # rubygems platform name => [upstream release tarball name, tarball path]
7
+ NATIVE_PLATFORMS = {
8
+ "arm64-darwin" => ["esbuild-darwin-arm64", "package/bin/esbuild"],
9
+ "x64-mingw32" => ["esbuild-windows-64", "package/esbuild.exe"],
10
+ "x86_64-darwin" => ["esbuild-darwin-64", "package/bin/esbuild"],
11
+ "x86_64-linux" => ["esbuild-linux-64", "package/bin/esbuild"],
12
+ }
13
+ end
14
+ end
@@ -1,3 +1,3 @@
1
1
  module SprocketsEsbuild
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -1,2 +1,6 @@
1
+ module SprocketsEsbuild
2
+ end
3
+
4
+ require 'sprockets-esbuild/upstream'
1
5
  require 'sprockets-esbuild/version'
2
6
  require 'sprockets-esbuild/transformers'
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprockets-esbuild
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Ruby
8
+ - Mike Dalessio
8
9
  autorequire:
9
10
  bindir: exe
10
11
  cert_chain: []
11
- date: 2021-12-19 00:00:00.000000000 Z
12
+ date: 2021-12-26 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: sprockets
@@ -26,20 +27,23 @@ dependencies:
26
27
  version: '0'
27
28
  description:
28
29
  email: rubys@intertwingly.net
29
- executables: []
30
+ executables:
31
+ - esbuild
30
32
  extensions: []
31
33
  extra_rdoc_files: []
32
34
  files:
33
35
  - README.md
34
36
  - Rakefile
37
+ - exe/esbuild
35
38
  - lib/sprockets-esbuild.rb
36
39
  - lib/sprockets-esbuild/transformers.rb
40
+ - lib/sprockets-esbuild/upstream.rb
37
41
  - lib/sprockets-esbuild/version.rb
38
- homepage: https://github.com/rails/tailwindcss-rails
42
+ homepage: https://github.com/rubys/sprockets-esbuild
39
43
  licenses:
40
44
  - MIT
41
45
  metadata:
42
- homepage_uri: https://github.com/rails/tailwindcss-rails
46
+ homepage_uri: https://github.com/rubys/sprockets-esbuild
43
47
  post_install_message:
44
48
  rdoc_options: []
45
49
  require_paths: