csswaxer 0.0.1 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +9 -11
- data/VERSION +1 -1
- data/lib/csswaxer.rb +2 -1
- metadata +21 -10
data/README.md
CHANGED
@@ -1,31 +1,29 @@
|
|
1
|
-
#
|
1
|
+
# CssWaxer #
|
2
2
|
|
3
3
|
Ruby command that prettifies CSS files grouping lines by property rather than by selector
|
4
4
|
|
5
|
-
## Installation ##
|
5
|
+
## Installation (from GemCutter) ##
|
6
6
|
|
7
7
|
gem install csswaxer
|
8
8
|
|
9
|
-
## Documentation ##
|
10
|
-
|
11
|
-
[http://rdoc.info/projects/claudiob/csswaxer](http://rdoc.info/projects/claudiob/csswaxer)
|
12
|
-
|
13
9
|
## Examples ##
|
14
10
|
|
15
|
-
|
16
|
-
|
17
|
-
require 'radiotagmap'
|
18
|
-
Radiotagmap::update_kml '/tmp/overlay.kml' [['Country','Alt-Country']]
|
11
|
+
csswaxer http://rubygems.org/stylesheets/all.css
|
12
|
+
csswaxer http://vlex.cachefly.net/stylesheets/new.css
|
19
13
|
|
20
14
|
## To do ##
|
21
15
|
|
22
16
|
* Accept CSS files with commands split on multiple lines
|
23
17
|
* Accept local CSS files, not only remote ones
|
24
18
|
* Accept different media types, not only screen
|
25
|
-
* Contain every possible CSS property
|
19
|
+
* Contain every possible CSS property
|
20
|
+
* Re-organize families of properties in the output (first font, then text...)
|
26
21
|
|
27
22
|
## History ##
|
28
23
|
|
24
|
+
v0.0.2 2010/03/28
|
25
|
+
Fixed a bug; now also works on remote CSS files
|
26
|
+
|
29
27
|
v0.0.1 2010/03/28
|
30
28
|
First commit that only works on CSS files with one-line style.
|
31
29
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|
data/lib/csswaxer.rb
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# Copyright:: Copyright (c) 2010 - see LICENSE file
|
5
5
|
|
6
6
|
require 'css_parser'
|
7
|
+
require 'open-uri'
|
7
8
|
|
8
9
|
module CssWaxer
|
9
10
|
class << self
|
@@ -14,7 +15,7 @@ module CssWaxer
|
|
14
15
|
# Open either a local or a remote file depending on the path
|
15
16
|
parser = CssParser::Parser.new
|
16
17
|
if dirty_css =~ /^https?:\/\/\S+$/i then
|
17
|
-
parser.
|
18
|
+
parser.load_uri! dirty_css
|
18
19
|
else
|
19
20
|
parser.load_file! dirty_css
|
20
21
|
end
|
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: csswaxer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 0
|
8
|
+
- 3
|
9
|
+
version: 0.0.3
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- Claudio Baccigalupo
|
@@ -14,15 +19,19 @@ default_executable: csswaxer
|
|
14
19
|
dependencies:
|
15
20
|
- !ruby/object:Gem::Dependency
|
16
21
|
name: css_parser
|
17
|
-
|
18
|
-
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
24
|
requirements:
|
21
25
|
- - ">="
|
22
26
|
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 1
|
29
|
+
- 0
|
30
|
+
- 1
|
23
31
|
version: 1.0.1
|
24
|
-
|
25
|
-
|
32
|
+
type: :runtime
|
33
|
+
version_requirements: *id001
|
34
|
+
description: "CSS Waxer refactors CSS files bringing the focus on properties, rather than on selectors. Typically, CSS files are written by groups of selectors, you first specify all the properties of <body>, then those of <h1>, #header, and so on. This makes it hard to catch a glimpse of the overall style of a site, such as the entire list of colors used, the fonts, or the dimensions. CSS Waxer reorders the lines of a CSS files so that properties are grouped together by family. In this way, you can rapidly check together all the fonts used, the colors, backgrounds, layouts and so on for the whole site."
|
26
35
|
email: claudiob@gmail.com
|
27
36
|
executables:
|
28
37
|
- csswaxer
|
@@ -52,20 +61,22 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
52
61
|
requirements:
|
53
62
|
- - ">="
|
54
63
|
- !ruby/object:Gem::Version
|
64
|
+
segments:
|
65
|
+
- 0
|
55
66
|
version: "0"
|
56
|
-
version:
|
57
67
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
58
68
|
requirements:
|
59
69
|
- - ">="
|
60
70
|
- !ruby/object:Gem::Version
|
71
|
+
segments:
|
72
|
+
- 0
|
61
73
|
version: "0"
|
62
|
-
version:
|
63
74
|
requirements: []
|
64
75
|
|
65
76
|
rubyforge_project:
|
66
|
-
rubygems_version: 1.3.
|
77
|
+
rubygems_version: 1.3.6
|
67
78
|
signing_key:
|
68
79
|
specification_version: 3
|
69
|
-
summary:
|
80
|
+
summary: Command-line tool that makes stylesheet files more readable, grouping lines by property (typography, color, layout, etc.) rather than by selector
|
70
81
|
test_files: []
|
71
82
|
|