sasstool 0.2.2 → 0.2.3

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: ef0bcf79ec7eb20aa6311274eeb54b1edf592a50db834554772f540f7cff8f81
4
- data.tar.gz: aba3d1af516c8509486331de1028ae2de8cbce1490b6ff600c9bb9f609917289
3
+ metadata.gz: 01f8a51931c1f14ee6a0e3d3a2c9c59d6eb44b30daca8b353c3b9e11a75cd5c4
4
+ data.tar.gz: 067af133cb69e48e50e65f2a3b9eee8e57c78181f4bbcea245cfbcd8395657e0
5
5
  SHA512:
6
- metadata.gz: 5c390ac0c5673e07cbf4c24bb24d9d076b221b41eeb375466d082a82c90ad31c21355bb074362646a0989d823769c442de87877040c35443c749878132dfb32a
7
- data.tar.gz: c460510b330d6600e5b3134cfa5e861f72db2126a233aef93293d74ab93c10d7e25cef7dccf67e1868a4eea04f1f1c82857af8dca5bfdb2356175028766b12ff
6
+ metadata.gz: cae68fa7e348533ffa31f323b4e4dc90e1b85094870ff7d18f696f3d7d632c27599facdf3ae70cef466cae2a6f2be8386a60c7af16b75c9ecaa66b7d6423cb52
7
+ data.tar.gz: 3632214012912ddc3a8f6ca0272667e4440a44cae67c85790179552df34fa5f47871a0f4e85d08e2acae9e3b3f13c2e00b95df718f069117dc92f807d9babd7c
data/bin/sasstool CHANGED
@@ -9,6 +9,6 @@ begin
9
9
  exit router.run ARGV
10
10
  rescue => e
11
11
  puts e.backtrace.reverse if ENV['DEBUG']
12
- say! "!txtred!#{e.class}: #{e.message}"
12
+ say! "r`#{e.class}: #{e.message}`"
13
13
  exit 1
14
- end
14
+ end
data/lib/sasstool/cli.rb CHANGED
@@ -6,7 +6,7 @@ module Sasstool
6
6
  class CLI
7
7
  def self.router
8
8
  MisterBin::Runner.new version: VERSION,
9
- header: "SASS Tool",
9
+ header: 'SASS Tool',
10
10
  handler: Command
11
11
  end
12
12
  end
@@ -2,19 +2,19 @@ require 'filewatcher'
2
2
 
3
3
  module Sasstool
4
4
  class Command < MisterBin::Command
5
- help "sasstool - SASS Command Line Renderer"
6
- usage "sasstool INFILE [OUTDIR --watch]"
7
- usage "sasstool (-h|--help)"
8
-
9
- param "INFILE", "Path to SCSS or SASS input file"
10
- param "OUTDIR", "Path to CSS output directory. Can also be provided by an environment variable"
11
- option "-w, --watch", "Watch the directory of the input file, and save on change"
12
- environment "SASSTOOL_OUTDIR", "Path to CSS output directory"
13
-
14
- example "sasstool style/main.scss public/css"
5
+ help 'sasstool - SASS Command Line Renderer'
6
+ usage 'sasstool INFILE [OUTDIR --watch]'
7
+ usage 'sasstool (-h|--help)'
8
+
9
+ param 'INFILE', 'Path to SCSS or SASS input file'
10
+ param 'OUTDIR', 'Path to CSS output directory. Can also be provided by an environment variable'
11
+ option '-w, --watch', 'Watch the directory of the input file, and save on change'
12
+ environment 'SASSTOOL_OUTDIR', 'Path to CSS output directory'
13
+
14
+ example 'sasstool style/main.scss public/css'
15
15
 
16
16
  def run
17
- save
17
+ save
18
18
  watch if args['--watch']
19
19
  end
20
20
 
@@ -30,7 +30,7 @@ module Sasstool
30
30
 
31
31
  def save
32
32
  renderer.save outdir
33
- say "Saved"
33
+ say 'Saved'
34
34
  end
35
35
 
36
36
  def renderer
@@ -39,7 +39,8 @@ module Sasstool
39
39
 
40
40
  def outdir
41
41
  result = args['OUTDIR'] || ENV['SASSTOOL_OUTDIR']
42
- raise ArgumentError, "Please provide an output directory" unless result
42
+ raise ArgumentError, 'Please provide an output directory' unless result
43
+
43
44
  result
44
45
  end
45
46
  end
@@ -1,11 +1,12 @@
1
1
  module Sasstool
2
2
  class Importer < SassC::Importer
3
3
  def imports(path, parent_path)
4
- if path.include? "*"
4
+ if path.include? '*'
5
5
  dir = File.dirname parent_path
6
6
  glob = "#{dir}/#{path}"
7
+ extensions = ['.scss', '.sass']
7
8
  files = Dir[glob].select do |file|
8
- ['.scss', '.sass'].include? File.extname(file)
9
+ extensions.include? File.extname(file)
9
10
  end
10
11
 
11
12
  files.map do |file|
@@ -16,4 +17,4 @@ module Sasstool
16
17
  end
17
18
  end
18
19
  end
19
- end
20
+ end
@@ -44,11 +44,11 @@ module Sasstool
44
44
 
45
45
  def options
46
46
  @options ||= {
47
- source_map_file: "#{path.gsub(/s[ca]ss$/, 'css')}.map",
47
+ source_map_file: "#{path.gsub(/s[ca]ss$/, 'css')}.map",
48
48
  source_map_contents: true,
49
- style: :nested,
50
- importer: Importer,
51
- filename: path
49
+ style: :nested,
50
+ importer: Importer,
51
+ filename: path,
52
52
  }
53
53
  end
54
54
 
@@ -57,4 +57,3 @@ module Sasstool
57
57
  end
58
58
  end
59
59
  end
60
-
@@ -1,3 +1,3 @@
1
1
  module Sasstool
2
- VERSION = "0.2.2"
3
- end
2
+ VERSION = '0.2.3'
3
+ end
metadata CHANGED
@@ -1,71 +1,77 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sasstool
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Ben Shitrit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-09 00:00:00.000000000 Z
11
+ date: 2023-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: mister_bin
14
+ name: colsole
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.7'
19
+ version: 0.8.1
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '2'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
25
28
  - !ruby/object:Gem::Version
26
- version: '0.7'
29
+ version: 0.8.1
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '2'
27
33
  - !ruby/object:Gem::Dependency
28
- name: colsole
34
+ name: filewatcher
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
37
  - - "~>"
32
38
  - !ruby/object:Gem::Version
33
- version: '0.7'
39
+ version: '2.0'
34
40
  type: :runtime
35
41
  prerelease: false
36
42
  version_requirements: !ruby/object:Gem::Requirement
37
43
  requirements:
38
44
  - - "~>"
39
45
  - !ruby/object:Gem::Version
40
- version: '0.7'
46
+ version: '2.0'
41
47
  - !ruby/object:Gem::Dependency
42
- name: sassc
48
+ name: mister_bin
43
49
  requirement: !ruby/object:Gem::Requirement
44
50
  requirements:
45
51
  - - "~>"
46
52
  - !ruby/object:Gem::Version
47
- version: '2.4'
53
+ version: '0.7'
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
51
57
  requirements:
52
58
  - - "~>"
53
59
  - !ruby/object:Gem::Version
54
- version: '2.4'
60
+ version: '0.7'
55
61
  - !ruby/object:Gem::Dependency
56
- name: filewatcher
62
+ name: sassc
57
63
  requirement: !ruby/object:Gem::Requirement
58
64
  requirements:
59
65
  - - "~>"
60
66
  - !ruby/object:Gem::Version
61
- version: '2.0'
67
+ version: '2.4'
62
68
  type: :runtime
63
69
  prerelease: false
64
70
  version_requirements: !ruby/object:Gem::Requirement
65
71
  requirements:
66
72
  - - "~>"
67
73
  - !ruby/object:Gem::Version
68
- version: '2.0'
74
+ version: '2.4'
69
75
  description: Sass command line renderer with globbing import support
70
76
  email: db@dannyben.com
71
77
  executables:
@@ -84,7 +90,8 @@ files:
84
90
  homepage: https://github.com/dannyben/sasstool
85
91
  licenses:
86
92
  - MIT
87
- metadata: {}
93
+ metadata:
94
+ rubygems_mfa_required: 'true'
88
95
  post_install_message:
89
96
  rdoc_options: []
90
97
  require_paths:
@@ -93,14 +100,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
93
100
  requirements:
94
101
  - - ">="
95
102
  - !ruby/object:Gem::Version
96
- version: 2.6.0
103
+ version: 2.7.0
97
104
  required_rubygems_version: !ruby/object:Gem::Requirement
98
105
  requirements:
99
106
  - - ">="
100
107
  - !ruby/object:Gem::Version
101
108
  version: '0'
102
109
  requirements: []
103
- rubygems_version: 3.3.14
110
+ rubygems_version: 3.4.5
104
111
  signing_key:
105
112
  specification_version: 4
106
113
  summary: Sass command line renderer