guard-stylus 0.0.1

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.
Files changed (3) hide show
  1. checksums.yaml +15 -0
  2. data/lib/guard/stylus.rb +29 -0
  3. metadata +86 -0
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MzRlNGMxNmUxNTZkYTk5MmEyODNjNTIzYzNmMDFiOTgxZGIwOWNlNQ==
5
+ data.tar.gz: !binary |-
6
+ N2JmNTMzMjI0MDc0ZjFhNjg4MjM1MjFiN2Y0MTFjZTNhMzQzZjdlNw==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ YjBkZDQyMjIwNTAxOWVhMjAzNmU0Nzc0NmU4ZTM0MTVlMjNjYjIxYzY4NGI5
10
+ NmMyMDk2MDViZGU5ZWExYzFkZTZiMDg5MTM0MTQxMTk4NjE2ZjU2NmFiYTli
11
+ NDliODExNjM3OGI1ZjcwMWYwZWJkZjcwZDIyYzU5OWM1ODI4YzM=
12
+ data.tar.gz: !binary |-
13
+ MWI4YzdhMzYzOGEyYjU0NDgwYjEzMDc0YWJkMmU1OThjMzU1YjliZDU0ZWZk
14
+ NzQ3NzhhYmVkZjBhZjIyOGEyYmY2NTIzZGRmOTdmYmQwYmE1MmYwODNiMThk
15
+ ZWI5YmMzMDVkODNkYzBkNDAxMWYxM2NjMjEwYzZmYWI4MDliMzQ=
@@ -0,0 +1,29 @@
1
+ require 'guard'
2
+ require 'guard/guard'
3
+ require 'guard/watcher'
4
+ require 'guard/helpers/starter'
5
+ require 'guard/helpers/formatter'
6
+ require 'stylus'
7
+
8
+ module Guard
9
+ class Stylus < Guard
10
+ include ::Guard::Helpers::Starter
11
+ def target_filename(directory, file)
12
+ File.join(directory, File.basename(file).sub(/(\.css)?\.styl$/, '.css'))
13
+ end
14
+
15
+ def act_on(directory, file)
16
+ target = target_filename(directory, file)
17
+ FileUtils.mkdir_p(File.dirname(target))
18
+
19
+ compiled = ::Stylus.compile(File.new(file), :compress => options[:compress])
20
+ File.open(target, 'w') do |f|
21
+ f.write(compiled)
22
+ end
23
+ mtime = File.mtime(file)
24
+ File.utime(mtime, mtime, file)
25
+ file
26
+ end
27
+ end
28
+ end
29
+
metadata ADDED
@@ -0,0 +1,86 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: guard-stylus
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Tim Joseph dumol
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-04-17 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: guard
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: 1.7.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: 1.7.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: stylus
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: 0.7.1
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: 0.7.1
41
+ - !ruby/object:Gem::Dependency
42
+ name: guard-helpers
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: 0.0.2
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 0.0.2
55
+ description: A Guard plugin to watch and compile Stylus files
56
+ email: tim@timdumol.com
57
+ executables: []
58
+ extensions: []
59
+ extra_rdoc_files: []
60
+ files:
61
+ - lib/guard/stylus.rb
62
+ homepage: https://github.com/TimDumol/guard-stylus
63
+ licenses:
64
+ - Apache 2.0
65
+ metadata: {}
66
+ post_install_message:
67
+ rdoc_options: []
68
+ require_paths:
69
+ - lib
70
+ required_ruby_version: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ! '>='
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ required_rubygems_version: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - ! '>='
78
+ - !ruby/object:Gem::Version
79
+ version: '0'
80
+ requirements: []
81
+ rubyforge_project:
82
+ rubygems_version: 2.0.3
83
+ signing_key:
84
+ specification_version: 4
85
+ summary: A Guard plugin to watch and compile Stylus files
86
+ test_files: []