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 +4 -4
- data/bin/sasstool +2 -2
- data/lib/sasstool/cli.rb +1 -1
- data/lib/sasstool/command.rb +14 -13
- data/lib/sasstool/importer.rb +4 -3
- data/lib/sasstool/renderer.rb +4 -5
- data/lib/sasstool/version.rb +2 -2
- metadata +26 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01f8a51931c1f14ee6a0e3d3a2c9c59d6eb44b30daca8b353c3b9e11a75cd5c4
|
4
|
+
data.tar.gz: 067af133cb69e48e50e65f2a3b9eee8e57c78181f4bbcea245cfbcd8395657e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cae68fa7e348533ffa31f323b4e4dc90e1b85094870ff7d18f696f3d7d632c27599facdf3ae70cef466cae2a6f2be8386a60c7af16b75c9ecaa66b7d6423cb52
|
7
|
+
data.tar.gz: 3632214012912ddc3a8f6ca0272667e4440a44cae67c85790179552df34fa5f47871a0f4e85d08e2acae9e3b3f13c2e00b95df718f069117dc92f807d9babd7c
|
data/bin/sasstool
CHANGED
data/lib/sasstool/cli.rb
CHANGED
data/lib/sasstool/command.rb
CHANGED
@@ -2,19 +2,19 @@ require 'filewatcher'
|
|
2
2
|
|
3
3
|
module Sasstool
|
4
4
|
class Command < MisterBin::Command
|
5
|
-
help
|
6
|
-
usage
|
7
|
-
usage
|
8
|
-
|
9
|
-
param
|
10
|
-
param
|
11
|
-
option
|
12
|
-
environment
|
13
|
-
|
14
|
-
example
|
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
|
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,
|
42
|
+
raise ArgumentError, 'Please provide an output directory' unless result
|
43
|
+
|
43
44
|
result
|
44
45
|
end
|
45
46
|
end
|
data/lib/sasstool/importer.rb
CHANGED
@@ -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
|
-
|
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
|
data/lib/sasstool/renderer.rb
CHANGED
@@ -44,11 +44,11 @@ module Sasstool
|
|
44
44
|
|
45
45
|
def options
|
46
46
|
@options ||= {
|
47
|
-
source_map_file:
|
47
|
+
source_map_file: "#{path.gsub(/s[ca]ss$/, 'css')}.map",
|
48
48
|
source_map_contents: true,
|
49
|
-
style:
|
50
|
-
importer:
|
51
|
-
filename:
|
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
|
-
|
data/lib/sasstool/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
module Sasstool
|
2
|
-
VERSION =
|
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.
|
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:
|
11
|
+
date: 2023-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: colsole
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
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:
|
29
|
+
version: 0.8.1
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '2'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
34
|
+
name: filewatcher
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
37
|
- - "~>"
|
32
38
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0
|
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
|
46
|
+
version: '2.0'
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
48
|
+
name: mister_bin
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
44
50
|
requirements:
|
45
51
|
- - "~>"
|
46
52
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
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: '
|
60
|
+
version: '0.7'
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
62
|
+
name: sassc
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
58
64
|
requirements:
|
59
65
|
- - "~>"
|
60
66
|
- !ruby/object:Gem::Version
|
61
|
-
version: '2.
|
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.
|
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.
|
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.
|
110
|
+
rubygems_version: 3.4.5
|
104
111
|
signing_key:
|
105
112
|
specification_version: 4
|
106
113
|
summary: Sass command line renderer
|