dsass 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/LICENSE +19 -0
- data/README.markdown +16 -0
- data/bin/dsass +45 -0
- metadata +65 -0
data/LICENSE
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright (C) 2012 Matthew Scharley
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
5
|
+
in the Software without restriction, including without limitation the rights
|
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
furnished to do so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
|
11
|
+
all copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
|
+
SOFTWARE.
|
data/README.markdown
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Drupal SASS
|
|
2
|
+
===========
|
|
3
|
+
|
|
4
|
+
Drupal SASS or dsass allows users to easily run the `sass` command for their
|
|
5
|
+
Drupal websites. It will do it's best to detect a Drupal installation then
|
|
6
|
+
search for Drupal themes with a `sass/` folder. It will then run `sass --watch`
|
|
7
|
+
on all these themes with several default parameters ensuring the best output.
|
|
8
|
+
|
|
9
|
+
Installation
|
|
10
|
+
------------
|
|
11
|
+
|
|
12
|
+
dsass is available as a Ruby gem:
|
|
13
|
+
|
|
14
|
+
gem install dsass
|
|
15
|
+
dsass
|
|
16
|
+
|
data/bin/dsass
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
#####
|
|
4
|
+
## CONFIGURATION
|
|
5
|
+
#####
|
|
6
|
+
|
|
7
|
+
default_args = ['--no-cache', '-t', 'expanded', '--unix-newlines', '-l', '--debug-info', '-E', 'utf-8']
|
|
8
|
+
|
|
9
|
+
#####
|
|
10
|
+
## SCRIPT
|
|
11
|
+
#####
|
|
12
|
+
|
|
13
|
+
# Check for a common prefix for a Drupal site
|
|
14
|
+
if File.exists? 'src'
|
|
15
|
+
Dir.chdir('src')
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
while not File.exists? File.join("modules", "system", "system.info")
|
|
19
|
+
last_pwd = Dir.pwd
|
|
20
|
+
Dir.chdir('..')
|
|
21
|
+
|
|
22
|
+
if last_pwd == Dir.pwd
|
|
23
|
+
print "Can't find a Drupal installation in this directory.\n"
|
|
24
|
+
exit 1
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
print "Executing SASS in " + Dir.pwd + "\n"
|
|
29
|
+
|
|
30
|
+
themes = ["themes", *Dir.glob('sites/*/themes')].map {|p| Dir.glob(p + "/**/*.info")}.flatten.map{|info| File.dirname(info)}.uniq
|
|
31
|
+
sass_themes = themes.find_all {|p| File.directory? p + "/sass" }
|
|
32
|
+
|
|
33
|
+
print "Found " + themes.length.to_s + " themes, " + sass_themes.length.to_s + " of which use SASS.\n"
|
|
34
|
+
|
|
35
|
+
if sass_themes.length == 0
|
|
36
|
+
print "No themes use SASS, so quitting while we're ahead.\n"
|
|
37
|
+
exit
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
args = sass_themes.map {|theme| ['--watch', File.join(theme, "sass") + ":" + File.join(theme, "css")]}.flatten
|
|
41
|
+
args = ['sass', default_args, args].flatten
|
|
42
|
+
|
|
43
|
+
print args.join(" ") + "\n";
|
|
44
|
+
exec *args
|
|
45
|
+
|
metadata
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: dsass
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 1.0.2
|
|
5
|
+
prerelease:
|
|
6
|
+
platform: ruby
|
|
7
|
+
authors:
|
|
8
|
+
- Matthew Scharley
|
|
9
|
+
autorequire:
|
|
10
|
+
bindir: bin
|
|
11
|
+
cert_chain: []
|
|
12
|
+
date: 2012-06-08 00:00:00.000000000 Z
|
|
13
|
+
dependencies:
|
|
14
|
+
- !ruby/object:Gem::Dependency
|
|
15
|
+
name: sass
|
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
|
17
|
+
none: false
|
|
18
|
+
requirements:
|
|
19
|
+
- - ~>
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: '3.1'
|
|
22
|
+
type: :runtime
|
|
23
|
+
prerelease: false
|
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
25
|
+
none: false
|
|
26
|
+
requirements:
|
|
27
|
+
- - ~>
|
|
28
|
+
- !ruby/object:Gem::Version
|
|
29
|
+
version: '3.1'
|
|
30
|
+
description: Provides the dsass command to run sass --watch on all themes in a Drupal
|
|
31
|
+
installation which support SASS.
|
|
32
|
+
email: matt@scharley.me
|
|
33
|
+
executables:
|
|
34
|
+
- dsass
|
|
35
|
+
extensions: []
|
|
36
|
+
extra_rdoc_files: []
|
|
37
|
+
files:
|
|
38
|
+
- LICENSE
|
|
39
|
+
- README.markdown
|
|
40
|
+
- bin/dsass
|
|
41
|
+
homepage: https://github.com/mscharley/dsass
|
|
42
|
+
licenses: []
|
|
43
|
+
post_install_message:
|
|
44
|
+
rdoc_options: []
|
|
45
|
+
require_paths:
|
|
46
|
+
- lib
|
|
47
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
48
|
+
none: false
|
|
49
|
+
requirements:
|
|
50
|
+
- - ! '>='
|
|
51
|
+
- !ruby/object:Gem::Version
|
|
52
|
+
version: 1.9.2
|
|
53
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
54
|
+
none: false
|
|
55
|
+
requirements:
|
|
56
|
+
- - ! '>='
|
|
57
|
+
- !ruby/object:Gem::Version
|
|
58
|
+
version: '0'
|
|
59
|
+
requirements: []
|
|
60
|
+
rubyforge_project:
|
|
61
|
+
rubygems_version: 1.8.23
|
|
62
|
+
signing_key:
|
|
63
|
+
specification_version: 3
|
|
64
|
+
summary: SASS runner for Drupal
|
|
65
|
+
test_files: []
|