ariadne_view_components 0.0.9 → 0.0.12

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: 2784e40f38456ba75ebc2beca6c9cfc4b0affceabc204b7a34d8f6859adbc36e
4
- data.tar.gz: aa37a547c572f7fb33218d7fc8e0ec9330364660374e562c5e692adbcf368429
3
+ metadata.gz: ff08b323bd828126ac51033cc824c34cd1ed5614e6fbf9eb94caeefdcea3a39d
4
+ data.tar.gz: 1d49751d0b2226019c28c98b78d73a346c4870b511595036a756b1f82a30e903
5
5
  SHA512:
6
- metadata.gz: 7397e543b7acef6d9db30a3f995ab5e2824b0f7fb253124d3c3a5829b073c3c90ab9acc0017d5f14c966089ff165029780eefe4d588b50727041df6422a22802
7
- data.tar.gz: f92fb375e938162076069219e2479a052613c4f25643d6c358fd897ce708f29ef39ecb4767a1bba374f0f7bdc466ff1b2a9cb8a941b2254ead4e3b67ee85a654
6
+ metadata.gz: fa24f0ef360a87444765320d3d30e767d556bff6a42be7370adfcdde561133aeea69493eaf52481e91140556bd270c792d0cd4aa63f1424ad00965f7ca852cef
7
+ data.tar.gz: c1adbd5dcc1a9c6d74e055ef10c41180ab7d0d7087437146c4503f5506ea1d2923449afd151c435a9144bb2b80660635b9dd69dfba56a86f0f99477c708612ec
@@ -20,7 +20,7 @@ module Ariadne
20
20
  end
21
21
 
22
22
  def executable(
23
- exe_path: File.expand_path(File.join(__dir__, "..", "..", "exe"))
23
+ exe_path: File.expand_path(File.join(__dir__, "..", "..", "..", "exe"))
24
24
  )
25
25
  if Ariadne::ViewComponents::Upstream::NATIVE_PLATFORMS.keys.none? { |p| Gem::Platform.match(p) }
26
26
  raise UnsupportedPlatformException, <<~MESSAGE
@@ -62,9 +62,9 @@ module Ariadne
62
62
  def compile_command(debug: false, **kwargs)
63
63
  [
64
64
  executable(**kwargs),
65
- "-i", relative_path("app/assets/stylesheets/ariadne_view_components.css"),
66
- "-o", relative_path("app/assets/builds/ariadne_view_components.css"),
67
- "-c", relative_path("tailwind.config.js"),
65
+ "-i", local_path("app/assets/stylesheets/ariadne_view_components.css"),
66
+ "-o", "app/assets/builds/ariadne_view_components.css",
67
+ "-c", local_path("tailwind.config.js"),
68
68
  ].tap do |command|
69
69
  command << "--minify" unless debug
70
70
  end
@@ -77,12 +77,9 @@ module Ariadne
77
77
  end
78
78
  end
79
79
 
80
- def relative_path(path)
81
- if defined?(Rails)
82
- Rails.root.join(path).to_s
83
- else
84
- path
85
- end
80
+ def local_path(path)
81
+ root = File.expand_path(File.join(__dir__, "..", "..", ".."))
82
+ File.join(root, path)
86
83
  end
87
84
  end
88
85
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ariadne
4
4
  module ViewComponents
5
- VERSION = "0.0.9"
5
+ VERSION = "0.0.12"
6
6
  end
7
7
  end
data/tailwind.config.js CHANGED
@@ -9,16 +9,17 @@ const CLASS_MAPPINGS = '(?:\\S+|:\\"[\\S-]+\\"): \\"([\\S -]+)\\"'
9
9
  const CLASS_CONSTANT = '[A-Z_]+ = \\"([\\S -]+)\\"'
10
10
  const CLASS_RB_REGEX = new RegExp(`(?:${CLASS_MAPPINGS}|${CLASS_CONSTANT})'`, 'g')
11
11
 
12
+ const resolve = require('path').resolve
12
13
  module.exports = {
13
14
  prefix: 'ariadne-',
14
15
  content: {
15
16
  files: [
16
- './public/*.html',
17
- './app/assets/javascripts/**/*.js',
18
- './app/components/**/*.erb',
19
- './app/components/**/*.rb',
20
- './app/lib/ariadne',
21
- './static/classes.yml'
17
+ resolve(__dirname, 'public/*.html'),
18
+ resolve(__dirname, 'app/assets/javascripts/**/*.js'),
19
+ resolve(__dirname, 'app/components/**/*.erb'),
20
+ resolve(__dirname, 'app/components/**/*.rb'),
21
+ resolve(__dirname, 'app/lib/ariadne'),
22
+ resolve(__dirname, 'static/classes.yml')
22
23
  ],
23
24
  extract: {
24
25
  yml: content => {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ariadne_view_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garen J. Torikian