compass-edge 0.9.5.0 → 0.10.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.markdown +0 -153
- data/README.markdown +2 -12
- data/REVISION +1 -1
- data/Rakefile +2 -37
- data/VERSION.yml +1 -1
- data/examples/blueprint_default/index.html.haml +3 -3
- data/examples/blueprint_default/parts/forms.html.haml +0 -2
- data/examples/blueprint_default/src/screen.sass +1 -1
- data/examples/blueprint_plugins/index.html.haml +6 -6
- data/examples/blueprint_plugins/src/buttons.sass +2 -2
- data/examples/blueprint_plugins/src/link_icons.sass +1 -1
- data/examples/blueprint_plugins/src/rtl_screen.sass +3 -3
- data/examples/blueprint_plugins/src/screen.sass +2 -2
- data/examples/blueprint_semantic/src/liquid.sass +4 -4
- data/examples/blueprint_semantic/src/screen.sass +3 -3
- data/examples/compass/src/utilities.sass +2 -2
- data/examples/downloader.rb +2 -2
- data/lib/compass/app_integration.rb +0 -21
- data/lib/compass/app_integration/rails.rb +0 -18
- data/lib/compass/app_integration/rails/configuration_defaults.rb +0 -16
- data/lib/compass/app_integration/rails/installer.rb +6 -6
- data/lib/compass/app_integration/stand_alone.rb +1 -20
- data/lib/compass/app_integration/stand_alone/configuration_defaults.rb +1 -5
- data/lib/compass/app_integration/stand_alone/installer.rb +17 -29
- data/lib/compass/commands.rb +2 -2
- data/lib/compass/commands/create_project.rb +1 -10
- data/lib/compass/commands/generate_grid_background.rb +1 -1
- data/lib/compass/commands/help.rb +7 -34
- data/lib/compass/commands/installer_command.rb +11 -15
- data/lib/compass/commands/project_base.rb +2 -2
- data/lib/compass/commands/update_project.rb +1 -51
- data/lib/compass/commands/validate_project.rb +3 -59
- data/lib/compass/commands/watch_project.rb +2 -4
- data/lib/compass/commands/write_configuration.rb +3 -84
- data/lib/compass/compiler.rb +4 -13
- data/lib/compass/configuration.rb +18 -23
- data/lib/compass/configuration/adapters.rb +1 -1
- data/lib/compass/configuration/data.rb +2 -5
- data/lib/compass/configuration/defaults.rb +1 -32
- data/lib/compass/configuration/helpers.rb +10 -47
- data/lib/compass/configuration/inheritance.rb +1 -1
- data/lib/compass/configuration/serialization.rb +2 -2
- data/lib/compass/errors.rb +1 -4
- data/lib/compass/exec.rb +0 -1
- data/lib/compass/exec/project_options_parser.rb +0 -4
- data/lib/compass/frameworks.rb +1 -40
- data/lib/compass/frameworks/blueprint/stylesheets/_blueprint.sass +1 -29
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_ie.sass +2 -2
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_print.sass +4 -1
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_reset.sass +2 -57
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_screen.sass +29 -2
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_buttons.sass +84 -2
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_colors.sass +33 -2
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_debug.sass +9 -2
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_fancy_type.sass +82 -2
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_form.sass +55 -2
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_grid.sass +178 -2
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_interaction.sass +58 -2
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_link_icons.sass +44 -2
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_liquid.sass +140 -2
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_reset.sass +56 -2
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_rtl.sass +122 -2
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_scaffolding.sass +47 -2
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_typography.sass +160 -2
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_utilities.sass +37 -2
- data/lib/compass/frameworks/blueprint/templates/buttons/buttons.sass +2 -2
- data/lib/compass/frameworks/blueprint/templates/buttons/manifest.rb +0 -12
- data/lib/compass/frameworks/blueprint/templates/link_icons/link_icons.sass +1 -1
- data/lib/compass/frameworks/blueprint/templates/link_icons/manifest.rb +0 -13
- data/lib/compass/frameworks/blueprint/templates/project/manifest.rb +0 -24
- data/lib/compass/frameworks/blueprint/templates/project/screen.sass +7 -1
- data/lib/compass/frameworks/blueprint/templates/project/welcome.html.haml +1 -9
- data/lib/compass/frameworks/compass/stylesheets/_compass.sass +1 -2
- data/lib/compass/frameworks/compass/stylesheets/compass/_utilities.sass +1 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/_css3.sass +6 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/{css3 → utilities/css3}/_border_radius.sass +0 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/css3/_box_shadow.sass +12 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/{css3 → utilities/css3}/_box_sizing.sass +0 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/{css3 → utilities/css3}/_columns.sass +0 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/{css3 → utilities/css3}/_inline_block.sass +0 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/{css3 → utilities/css3}/_opacity.sass +0 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/general/_reset.sass +2 -2
- data/lib/compass/frameworks/compass/templates/ellipsis/manifest.rb +1 -26
- data/lib/compass/frameworks/compass/templates/extension/manifest.rb +2 -16
- data/lib/compass/frameworks/compass/templates/project/manifest.rb +0 -1
- data/lib/compass/grid_builder.rb +1 -1
- data/lib/compass/installers.rb +1 -1
- data/lib/compass/installers/base.rb +52 -13
- data/lib/compass/installers/manifest.rb +1 -33
- data/lib/compass/logger.rb +2 -28
- data/lib/compass/sass_extensions/functions.rb +1 -3
- data/lib/compass/sass_extensions/functions/enumerate.rb +2 -2
- data/lib/compass/sass_extensions/functions/inline_image.rb +1 -22
- data/lib/compass/sass_extensions/functions/urls.rb +0 -20
- data/lib/compass/sass_extensions/monkey_patches.rb +2 -2
- data/lib/compass/validator.rb +3 -2
- data/lib/vendor/fssm.rb +6 -19
- data/lib/vendor/fssm/backends/fsevents.rb +60 -19
- data/lib/vendor/fssm/backends/polling.rb +18 -20
- data/lib/vendor/fssm/ext.rb +0 -30
- data/lib/vendor/fssm/monitor.rb +6 -10
- data/lib/vendor/fssm/path.rb +21 -24
- data/lib/vendor/fssm/state.rb +29 -37
- data/lib/vendor/fssm/support.rb +7 -3
- data/test/command_line_helper.rb +4 -12
- data/test/command_line_test.rb +2 -2
- data/test/compass_test.rb +4 -14
- data/test/configuration_test.rb +5 -5
- data/test/fixtures/stylesheets/blueprint/css/typography.css +3 -5
- data/test/fixtures/stylesheets/blueprint/sass/screen.sass +1 -1
- data/test/fixtures/stylesheets/blueprint/sass/typography.sass +2 -2
- data/test/fixtures/stylesheets/compass/css/print.css +8 -2
- data/test/fixtures/stylesheets/compass/css/reset.css +1 -1
- data/test/fixtures/stylesheets/image_urls/css/screen.css +0 -2
- data/test/io_helper.rb +1 -18
- data/test/rails_integration_test.rb +41 -3
- data/test/sass_extensions_test.rb +2 -2
- data/test/test_helper.rb +0 -1
- metadata +9 -124
- data/examples/compass/bootstrap.rb +0 -3
- data/examples/compass/extensions/yui/stylesheets/_yui.sass +0 -7
- data/examples/compass/extensions/yui/stylesheets/yui/modules/_base.sass +0 -70
- data/examples/compass/extensions/yui/stylesheets/yui/modules/_fonts.sass +0 -45
- data/examples/compass/extensions/yui/stylesheets/yui/modules/_grids.sass +0 -385
- data/examples/compass/extensions/yui/stylesheets/yui/modules/_reset.sass +0 -61
- data/examples/compass/extensions/yui/templates/project/manifest.rb +0 -1
- data/examples/compass/extensions/yui/templates/project/screen.sass +0 -4
- data/examples/css3/config.rb +0 -6
- data/examples/css3/extensions/fancy-fonts/templates/project/Vtks Revolt.ttf +0 -0
- data/examples/css3/extensions/fancy-fonts/templates/project/angelina.ttf +0 -0
- data/examples/css3/extensions/fancy-fonts/templates/project/fancy-fonts.sass +0 -7
- data/examples/css3/extensions/fancy-fonts/templates/project/manifest.rb +0 -5
- data/examples/css3/images/fresh-peas.jpg +0 -0
- data/examples/css3/index.html.haml +0 -55
- data/examples/css3/src/_base.sass +0 -14
- data/examples/css3/src/fancy-fonts.sass +0 -7
- data/examples/css3/src/gradient.sass +0 -10
- data/examples/css3/src/main.sass +0 -80
- data/examples/css3/stylesheets/fonts/Vtks Revolt.ttf +0 -0
- data/examples/css3/stylesheets/fonts/angelina.ttf +0 -0
- data/examples/susy/bootstrap.rb +0 -3
- data/examples/susy/config.rb +0 -9
- data/examples/susy/extensions/susy/LICENSE.txt +0 -28
- data/examples/susy/extensions/susy/README.mkdn +0 -235
- data/examples/susy/extensions/susy/compass-susy-plugin.gemspec +0 -35
- data/examples/susy/extensions/susy/docs/tutorial/build.sh +0 -141
- data/examples/susy/extensions/susy/docs/tutorial/code/01_target/src/_defaults.sass +0 -100
- data/examples/susy/extensions/susy/docs/tutorial/code/01_target/src/screen.sass +0 -98
- data/examples/susy/extensions/susy/docs/tutorial/code/02_container/src/_defaults.sass +0 -147
- data/examples/susy/extensions/susy/docs/tutorial/code/02_container/src/screen.sass +0 -19
- data/examples/susy/extensions/susy/docs/tutorial/code/03_structure/src/_defaults.sass +0 -147
- data/examples/susy/extensions/susy/docs/tutorial/code/03_structure/src/screen.sass +0 -48
- data/examples/susy/extensions/susy/docs/tutorial/code/_common/config.rb +0 -14
- data/examples/susy/extensions/susy/docs/tutorial/code/_common/images/grid.png +0 -0
- data/examples/susy/extensions/susy/docs/tutorial/code/_common/images/susy_logo.png +0 -0
- data/examples/susy/extensions/susy/docs/tutorial/code/_common/src/_base.sass +0 -63
- data/examples/susy/extensions/susy/docs/tutorial/code/_tools/Markdown.pl +0 -1450
- data/examples/susy/extensions/susy/docs/tutorial/code/site/src/_defaults.sass +0 -100
- data/examples/susy/extensions/susy/docs/tutorial/code/site/src/screen.sass +0 -91
- data/examples/susy/extensions/susy/docs/tutorial/figures/susy_element.png +0 -0
- data/examples/susy/extensions/susy/docs/tutorial/figures/susy_grid.png +0 -0
- data/examples/susy/extensions/susy/docs/tutorial/index.mkdn +0 -301
- data/examples/susy/extensions/susy/lib/susy.rb +0 -2
- data/examples/susy/extensions/susy/lib/susy/compass_plugin.rb +0 -5
- data/examples/susy/extensions/susy/lib/susy/sass_extensions.rb +0 -79
- data/examples/susy/extensions/susy/sass/susy/_grid.sass +0 -128
- data/examples/susy/extensions/susy/sass/susy/_reset.sass +0 -7
- data/examples/susy/extensions/susy/sass/susy/_susy.sass +0 -23
- data/examples/susy/extensions/susy/sass/susy/_text.sass +0 -15
- data/examples/susy/extensions/susy/sass/susy/_utils.sass +0 -81
- data/examples/susy/extensions/susy/templates/project/_base.sass +0 -62
- data/examples/susy/extensions/susy/templates/project/_defaults.sass +0 -147
- data/examples/susy/extensions/susy/templates/project/ie.sass +0 -9
- data/examples/susy/extensions/susy/templates/project/manifest.rb +0 -5
- data/examples/susy/extensions/susy/templates/project/print.sass +0 -7
- data/examples/susy/extensions/susy/templates/project/screen.sass +0 -44
- data/examples/susy/src/_base.sass +0 -62
- data/examples/susy/src/_defaults.sass +0 -148
- data/examples/susy/src/screen.sass +0 -114
- data/features/command_line.feature +0 -226
- data/features/extensions.feature +0 -20
- data/features/step_definitions/command_line_steps.rb +0 -223
- data/features/step_definitions/extension_steps.rb +0 -13
- data/lib/compass/commands/interactive.rb +0 -61
- data/lib/compass/commands/project_stats.rb +0 -162
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_buttons.sass +0 -84
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_colors.sass +0 -33
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_debug.sass +0 -9
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_fancy_type.sass +0 -82
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_form.sass +0 -56
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_grid.sass +0 -179
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_interaction.sass +0 -58
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_link_icons.sass +0 -44
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_liquid.sass +0 -141
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_rtl.sass +0 -123
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_scaffolding.sass +0 -49
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_typography.sass +0 -162
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_utilities.sass +0 -37
- data/lib/compass/frameworks/compass/stylesheets/compass/_css3.sass +0 -14
- data/lib/compass/frameworks/compass/stylesheets/compass/css3/_background_clip.sass +0 -16
- data/lib/compass/frameworks/compass/stylesheets/compass/css3/_background_origin.sass +0 -18
- data/lib/compass/frameworks/compass/stylesheets/compass/css3/_background_size.sass +0 -14
- data/lib/compass/frameworks/compass/stylesheets/compass/css3/_box_shadow.sass +0 -20
- data/lib/compass/frameworks/compass/stylesheets/compass/css3/_font_face.sass +0 -31
- data/lib/compass/frameworks/compass/stylesheets/compass/css3/_gradient.sass +0 -40
- data/lib/compass/frameworks/compass/stylesheets/compass/css3/_text_shadow.sass +0 -15
- data/lib/compass/frameworks/compass/stylesheets/compass/css3/_transform.sass +0 -60
- data/lib/compass/frameworks/compass/stylesheets/compass/css3/_transition.sass +0 -57
- data/lib/compass/frameworks/compass/templates/project/USAGE.markdown +0 -32
- data/lib/compass/installers/bare_installer.rb +0 -58
- data/lib/compass/installers/manifest_installer.rb +0 -59
- data/lib/compass/sass_extensions/functions/color_stop.rb +0 -10
- data/lib/compass/sass_extensions/functions/font_files.rb +0 -11
- data/lib/compass/sass_extensions/monkey_patches/traversal.rb +0 -23
- data/lib/compass/stats.rb +0 -92
- data/lib/vendor/fssm/cache.rb +0 -193
- data/lib/vendor/fssm/fsevents.rb +0 -129
- data/lib/vendor/fssm/tree.rb +0 -176
- data/test/fixtures/stylesheets/relative/assets/images/testing.png +0 -0
- data/test/fixtures/stylesheets/relative/config.rb +0 -9
- data/test/fixtures/stylesheets/relative/css/ie.css +0 -1
- data/test/fixtures/stylesheets/relative/css/print.css +0 -1
- data/test/fixtures/stylesheets/relative/css/screen.css +0 -1
- data/test/fixtures/stylesheets/relative/sass/ie.sass +0 -6
- data/test/fixtures/stylesheets/relative/sass/print.sass +0 -6
- data/test/fixtures/stylesheets/relative/sass/screen.sass +0 -3
- data/test/rails_helper.rb +0 -40
@@ -3,26 +3,8 @@ require 'compass/commands/update_project'
|
|
3
3
|
|
4
4
|
module Compass
|
5
5
|
module Commands
|
6
|
-
module ValidationOptionsParser
|
7
|
-
def set_options(opts)
|
8
|
-
opts.banner = %Q{
|
9
|
-
Usage: compass validate [path/to/project] [options]
|
10
|
-
|
11
|
-
Description:
|
12
|
-
Compile project at the path specified or the current
|
13
|
-
directory if not specified and then validate the
|
14
|
-
generated CSS.
|
15
|
-
|
16
|
-
Options:
|
17
|
-
}.strip.split("\n").map{|l| l.gsub(/^ {0,10}/,'')}.join("\n")
|
18
|
-
|
19
|
-
super
|
20
|
-
end
|
21
|
-
end
|
22
6
|
class ValidateProject < ProjectBase
|
23
|
-
|
24
|
-
register :validate
|
25
|
-
|
7
|
+
|
26
8
|
def initialize(working_path, options)
|
27
9
|
super
|
28
10
|
assert_project_directory_exists!
|
@@ -31,47 +13,9 @@ module Compass
|
|
31
13
|
def perform
|
32
14
|
require 'compass/validator'
|
33
15
|
UpdateProject.new(working_path, options).perform
|
34
|
-
|
35
|
-
Validator.new(project_css_subdirectory).validate()
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
class << self
|
40
|
-
|
41
|
-
def option_parser(arguments)
|
42
|
-
parser = Compass::Exec::CommandOptionParser.new(arguments)
|
43
|
-
parser.extend(Compass::Exec::GlobalOptionsParser)
|
44
|
-
parser.extend(Compass::Exec::ProjectOptionsParser)
|
45
|
-
parser.extend(ValidationOptionsParser)
|
46
|
-
end
|
47
|
-
|
48
|
-
def usage
|
49
|
-
option_parser([]).to_s
|
50
|
-
end
|
51
|
-
|
52
|
-
def description(command)
|
53
|
-
"Validate your generated css."
|
54
|
-
end
|
55
|
-
|
56
|
-
def parse!(arguments)
|
57
|
-
parser = option_parser(arguments)
|
58
|
-
parser.parse!
|
59
|
-
parse_arguments!(parser, arguments)
|
60
|
-
parser.options
|
61
|
-
end
|
62
|
-
|
63
|
-
def parse_arguments!(parser, arguments)
|
64
|
-
if arguments.size == 1
|
65
|
-
parser.options[:project_name] = arguments.shift
|
66
|
-
elsif arguments.size == 0
|
67
|
-
# default to the current directory.
|
68
|
-
else
|
69
|
-
raise Compass::Error, "Too many arguments were specified."
|
70
|
-
end
|
71
|
-
end
|
72
|
-
|
16
|
+
Validator.new(project_css_subdirectory).validate()
|
73
17
|
end
|
74
18
|
|
75
19
|
end
|
76
20
|
end
|
77
|
-
end
|
21
|
+
end
|
@@ -7,8 +7,6 @@ module Compass
|
|
7
7
|
module Commands
|
8
8
|
class WatchProject < UpdateProject
|
9
9
|
|
10
|
-
register :watch
|
11
|
-
|
12
10
|
attr_accessor :last_update_time, :last_sass_files
|
13
11
|
|
14
12
|
def perform
|
@@ -61,11 +59,11 @@ module Compass
|
|
61
59
|
puts ">>> Change detected to: #{file}"
|
62
60
|
compiler.run
|
63
61
|
rescue StandardError => e
|
64
|
-
::Compass::Exec
|
62
|
+
::Compass::Exec.report_error(e, options)
|
65
63
|
end
|
66
64
|
end
|
67
65
|
end
|
68
66
|
|
69
67
|
end
|
70
68
|
end
|
71
|
-
end
|
69
|
+
end
|
@@ -2,32 +2,8 @@ require 'compass/commands/project_base'
|
|
2
2
|
|
3
3
|
module Compass
|
4
4
|
module Commands
|
5
|
-
module ConfigurationOptionsParser
|
6
|
-
def set_options(opts)
|
7
|
-
opts.banner = %Q{
|
8
|
-
Usage: compass config [path/to/config_file.rb] [options]
|
9
|
-
|
10
|
-
Description:
|
11
|
-
Generate a configuration file for the options specified.
|
12
|
-
Compass will recognize configuration files in the
|
13
|
-
following locations relative to the project root:
|
14
|
-
* #{Compass::Configuration::Helpers::KNOWN_CONFIG_LOCATIONS.join("
|
15
|
-
* ")}
|
16
|
-
Any other location, and you'll need to specify it when working with the command line tool using the -c option.
|
17
|
-
|
18
|
-
Options:
|
19
|
-
}.strip.split("\n").map{|l| l.gsub(/^ {0,10}/,'')}.join("\n")
|
20
|
-
opts.on("--debug [PROPERTY]", "Debug your configuration by printing out details.") do |prop|
|
21
|
-
self.options[:debug] = prop.nil? ? true : prop.to_sym
|
22
|
-
end
|
23
|
-
|
24
|
-
super
|
25
|
-
end
|
26
|
-
end
|
27
5
|
class WriteConfiguration < ProjectBase
|
28
|
-
|
29
|
-
register :config
|
30
|
-
|
6
|
+
|
31
7
|
include InstallerCommand
|
32
8
|
|
33
9
|
def initialize(working_path, options)
|
@@ -40,28 +16,7 @@ module Compass
|
|
40
16
|
end
|
41
17
|
|
42
18
|
def perform
|
43
|
-
|
44
|
-
puts "Configuration sources:"
|
45
|
-
c = Compass.configuration
|
46
|
-
while c
|
47
|
-
print c.name
|
48
|
-
c = c.inherited_data
|
49
|
-
print ", " if c
|
50
|
-
end
|
51
|
-
print "\n"
|
52
|
-
Compass.configuration.debug.each do |prop, values|
|
53
|
-
if options[:debug].is_a?(Symbol)
|
54
|
-
next unless prop == options[:debug]
|
55
|
-
end
|
56
|
-
puts "***** #{prop} = #{values.first[:resolved].inspect} *****"
|
57
|
-
[:default, :value, :raw, :resolved].each do |kind|
|
58
|
-
puts "#{kind}: " + values.inject([]){|m, v| m << v[kind]}.map{|v| v.nil? ? '-' : v.inspect}.join(", ")
|
59
|
-
end
|
60
|
-
end
|
61
|
-
else
|
62
|
-
directory File.dirname(options[:configuration_file])
|
63
|
-
installer.write_configuration_files(options[:configuration_file])
|
64
|
-
end
|
19
|
+
installer.write_configuration_files(options[:configuration_file])
|
65
20
|
end
|
66
21
|
|
67
22
|
def installer_args
|
@@ -72,42 +27,6 @@ module Compass
|
|
72
27
|
false
|
73
28
|
end
|
74
29
|
|
75
|
-
class << self
|
76
|
-
|
77
|
-
def option_parser(arguments)
|
78
|
-
parser = Compass::Exec::CommandOptionParser.new(arguments)
|
79
|
-
parser.extend(Compass::Exec::GlobalOptionsParser)
|
80
|
-
parser.extend(Compass::Exec::ProjectOptionsParser)
|
81
|
-
parser.extend(ConfigurationOptionsParser)
|
82
|
-
end
|
83
|
-
|
84
|
-
def usage
|
85
|
-
option_parser([]).to_s
|
86
|
-
end
|
87
|
-
|
88
|
-
def description(command)
|
89
|
-
"Generate a configuration file for the provided command line options."
|
90
|
-
end
|
91
|
-
|
92
|
-
def parse!(arguments)
|
93
|
-
parser = option_parser(arguments)
|
94
|
-
parser.parse!
|
95
|
-
parse_arguments!(parser, arguments)
|
96
|
-
parser.options
|
97
|
-
end
|
98
|
-
|
99
|
-
def parse_arguments!(parser, arguments)
|
100
|
-
if arguments.size == 1
|
101
|
-
parser.options[:configuration_file] = arguments.shift
|
102
|
-
elsif arguments.size == 0
|
103
|
-
# default to the current directory.
|
104
|
-
else
|
105
|
-
raise Compass::Error, "Too many arguments were specified."
|
106
|
-
end
|
107
|
-
end
|
108
|
-
|
109
|
-
end
|
110
|
-
|
111
30
|
end
|
112
31
|
end
|
113
|
-
end
|
32
|
+
end
|
data/lib/compass/compiler.rb
CHANGED
@@ -13,9 +13,8 @@ module Compass
|
|
13
13
|
self.options[:cache_location] ||= File.join(from, ".sass-cache")
|
14
14
|
end
|
15
15
|
|
16
|
-
def sass_files
|
17
|
-
|
18
|
-
@sass_files || Dir.glob(separate("#{from}/**/#{'[^_]' if exclude_partials}*.sass"))
|
16
|
+
def sass_files
|
17
|
+
@sass_files || Dir.glob(separate("#{from}/**/[^_]*.sass"))
|
19
18
|
end
|
20
19
|
|
21
20
|
def stylesheet_name(sass_file)
|
@@ -48,16 +47,8 @@ module Compass
|
|
48
47
|
directory dir
|
49
48
|
end
|
50
49
|
sass_files.zip(css_files).each do |sass_filename, css_filename|
|
51
|
-
|
52
|
-
compile sass_filename, css_filename, options
|
53
|
-
rescue Sass::SyntaxError => e
|
54
|
-
full_exception = Compass.configuration.environment == :development
|
55
|
-
logger.record :error, basename(sass_filename), "(Line #{e.sass_line}: #{e.message})"
|
56
|
-
write_file(css_filename,
|
57
|
-
Sass::SyntaxError.exception_to_css(e, :full_exception => full_exception),
|
58
|
-
options.merge(:force => true))
|
59
|
-
end
|
50
|
+
compile sass_filename, css_filename, options
|
60
51
|
end
|
61
52
|
end
|
62
53
|
end
|
63
|
-
end
|
54
|
+
end
|
@@ -1,39 +1,34 @@
|
|
1
1
|
module Compass
|
2
2
|
module Configuration
|
3
3
|
|
4
|
-
def self.attributes_for_directory(dir_name, http_dir_name = dir_name)
|
5
|
-
[
|
6
|
-
"#{dir_name}_dir",
|
7
|
-
"#{dir_name}_path",
|
8
|
-
("http_#{http_dir_name}_dir" if http_dir_name),
|
9
|
-
("http_#{http_dir_name}_path" if http_dir_name)
|
10
|
-
].compact.map{|a| a.to_sym}
|
11
|
-
end
|
12
|
-
|
13
4
|
ATTRIBUTES = [
|
14
|
-
# What kind of project?
|
15
5
|
:project_type,
|
16
|
-
# Where is the project?
|
17
6
|
:project_path,
|
7
|
+
:css_dir,
|
8
|
+
:sass_dir,
|
9
|
+
:images_dir,
|
10
|
+
:javascripts_dir,
|
11
|
+
:extensions_dir,
|
12
|
+
:css_path,
|
13
|
+
:sass_path,
|
14
|
+
:images_path,
|
15
|
+
:javascripts_path,
|
16
|
+
:extensions_path,
|
18
17
|
:http_path,
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
attributes_for_directory(:extensions, nil),
|
26
|
-
# Compilation options
|
18
|
+
:http_images_dir,
|
19
|
+
:http_stylesheets_dir,
|
20
|
+
:http_javascripts_dir,
|
21
|
+
:http_images_path,
|
22
|
+
:http_stylesheets_path,
|
23
|
+
:http_javascripts_path,
|
27
24
|
:output_style,
|
28
25
|
:environment,
|
29
26
|
:relative_assets,
|
30
27
|
:additional_import_paths,
|
31
28
|
:sass_options,
|
32
29
|
:asset_host,
|
33
|
-
:asset_cache_buster
|
34
|
-
|
35
|
-
:color_output
|
36
|
-
].flatten
|
30
|
+
:asset_cache_buster
|
31
|
+
]
|
37
32
|
|
38
33
|
end
|
39
34
|
end
|
@@ -49,7 +49,7 @@ module Compass
|
|
49
49
|
load_paths = []
|
50
50
|
load_paths << sass_path if sass_path
|
51
51
|
Compass::Frameworks::ALL.each do |framework|
|
52
|
-
load_paths << framework.stylesheets_directory
|
52
|
+
load_paths << framework.stylesheets_directory
|
53
53
|
end
|
54
54
|
load_paths += resolve_additional_import_paths
|
55
55
|
load_paths
|
@@ -18,7 +18,6 @@ module Compass
|
|
18
18
|
class Data
|
19
19
|
|
20
20
|
attr_accessor :required_libraries
|
21
|
-
attr_reader :name
|
22
21
|
|
23
22
|
include Compass::Configuration::Inheritance
|
24
23
|
include Compass::Configuration::Serialization
|
@@ -26,9 +25,7 @@ module Compass
|
|
26
25
|
|
27
26
|
inherited_accessor *ATTRIBUTES
|
28
27
|
|
29
|
-
def initialize(
|
30
|
-
raise "I need a name!" unless name
|
31
|
-
@name = name
|
28
|
+
def initialize(attr_hash = nil)
|
32
29
|
self.required_libraries = []
|
33
30
|
set_all(attr_hash) if attr_hash
|
34
31
|
self.top_level = self
|
@@ -103,4 +100,4 @@ module Compass
|
|
103
100
|
|
104
101
|
end
|
105
102
|
end
|
106
|
-
end
|
103
|
+
end
|
@@ -14,14 +14,6 @@ module Compass
|
|
14
14
|
"extensions"
|
15
15
|
end
|
16
16
|
|
17
|
-
def default_fonts_dir
|
18
|
-
File.join(top_level.css_dir, "fonts")
|
19
|
-
end
|
20
|
-
|
21
|
-
def default_environment
|
22
|
-
:development
|
23
|
-
end
|
24
|
-
|
25
17
|
def default_output_style
|
26
18
|
if top_level.environment == :development
|
27
19
|
:expanded
|
@@ -34,10 +26,6 @@ module Compass
|
|
34
26
|
top_level.environment == :development
|
35
27
|
end
|
36
28
|
|
37
|
-
def default_color_output
|
38
|
-
true
|
39
|
-
end
|
40
|
-
|
41
29
|
def default_sass_path
|
42
30
|
if (pp = top_level.project_path) && (dir = top_level.sass_dir)
|
43
31
|
File.join(pp, dir)
|
@@ -68,12 +56,6 @@ module Compass
|
|
68
56
|
end
|
69
57
|
end
|
70
58
|
|
71
|
-
def default_fonts_path
|
72
|
-
if (pp = top_level.project_path) && (dir = top_level.fonts_dir)
|
73
|
-
File.join(pp, dir)
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
59
|
|
78
60
|
def default_http_images_dir
|
79
61
|
top_level.images_dir
|
@@ -91,18 +73,6 @@ module Compass
|
|
91
73
|
http_root_relative top_level.http_stylesheets_dir
|
92
74
|
end
|
93
75
|
|
94
|
-
def default_http_fonts_dir
|
95
|
-
if fd = top_level.fonts_dir_without_default
|
96
|
-
fd
|
97
|
-
else
|
98
|
-
"#{top_level.http_stylesheets_dir}/fonts"
|
99
|
-
end
|
100
|
-
end
|
101
|
-
|
102
|
-
def default_http_fonts_path
|
103
|
-
http_root_relative top_level.http_fonts_dir
|
104
|
-
end
|
105
|
-
|
106
76
|
def default_http_javascripts_dir
|
107
77
|
top_level.javascripts_dir
|
108
78
|
end
|
@@ -115,7 +85,6 @@ module Compass
|
|
115
85
|
|
116
86
|
def http_join(*segments)
|
117
87
|
segments.map do |segment|
|
118
|
-
next unless segment
|
119
88
|
segment = http_pathify(segment)
|
120
89
|
segment[-1..-1] == "/" ? segment[0..-2] : segment
|
121
90
|
end.join("/")
|
@@ -135,4 +104,4 @@ module Compass
|
|
135
104
|
|
136
105
|
end
|
137
106
|
end
|
138
|
-
end
|
107
|
+
end
|
@@ -11,36 +11,25 @@ module Compass
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def default_configuration
|
14
|
-
Data.new
|
14
|
+
Data.new.extend(Defaults).extend(Comments)
|
15
15
|
end
|
16
16
|
|
17
17
|
def add_configuration(config, filename = nil)
|
18
18
|
return if config.nil?
|
19
|
-
|
20
|
-
|
21
|
-
data = configuration_for(config, filename)
|
22
|
-
|
23
|
-
# puts "New configuration: #{data.name}"
|
24
|
-
# puts caller.join("\n")
|
25
|
-
data.inherit_from!(configuration)
|
26
|
-
data.on_top!
|
27
|
-
@configuration = data
|
28
|
-
end
|
29
|
-
|
30
|
-
def configuration_for(config, filename = nil)
|
31
|
-
if config.is_a?(Compass::Configuration::Data)
|
19
|
+
data = if config.is_a?(Compass::Configuration::Data)
|
32
20
|
config
|
33
21
|
elsif config.respond_to?(:read)
|
34
22
|
Compass::Configuration::Data.new_from_string(config.read, filename)
|
35
23
|
elsif config.is_a?(Hash)
|
36
|
-
Compass::Configuration::Data.new(
|
24
|
+
Compass::Configuration::Data.new(config)
|
37
25
|
elsif config.is_a?(String)
|
38
26
|
Compass::Configuration::Data.new_from_file(config)
|
39
|
-
elsif config.is_a?(Symbol)
|
40
|
-
Compass::AppIntegration.lookup(config).configuration
|
41
27
|
else
|
42
28
|
raise "I don't know what to do with: #{config.inspect}"
|
43
29
|
end
|
30
|
+
data.inherit_from!(configuration)
|
31
|
+
data.on_top!
|
32
|
+
@configuration = data
|
44
33
|
end
|
45
34
|
|
46
35
|
# Support for testing.
|
@@ -66,26 +55,9 @@ module Compass
|
|
66
55
|
end
|
67
56
|
|
68
57
|
# Read the configuration file for this project
|
69
|
-
def add_project_configuration(
|
70
|
-
|
71
|
-
configuration_file_path
|
72
|
-
raise ArgumentError, "Too many arguments" if args.any?
|
73
|
-
if configuration_file_path
|
74
|
-
|
75
|
-
data = configuration_for(configuration_file_path)
|
76
|
-
|
77
|
-
if data.raw_project_type
|
78
|
-
add_configuration(data.raw_project_type.to_sym)
|
79
|
-
elsif options[:project_type]
|
80
|
-
add_configuration(options[:project_type])
|
81
|
-
else
|
82
|
-
add_configuration(:stand_alone)
|
83
|
-
end
|
84
|
-
|
85
|
-
add_configuration(data)
|
86
|
-
else
|
87
|
-
add_configuration(options[:project_type] || configuration.project_type || :stand_alone)
|
88
|
-
end
|
58
|
+
def add_project_configuration(configuration_file_path = nil)
|
59
|
+
configuration_file_path ||= detect_configuration_file
|
60
|
+
Compass.add_configuration(configuration_file_path) if configuration_file_path
|
89
61
|
end
|
90
62
|
|
91
63
|
# Returns a full path to the relative path to the project directory
|
@@ -94,17 +66,8 @@ module Compass
|
|
94
66
|
File.join(project_path, *path.split('/'))
|
95
67
|
end
|
96
68
|
|
97
|
-
def deprojectize(path, project_path = nil)
|
98
|
-
project_path ||= configuration.project_path
|
99
|
-
if path[0..(project_path.size - 1)] == project_path
|
100
|
-
path[(project_path.size + 1)..-1]
|
101
|
-
else
|
102
|
-
path
|
103
|
-
end
|
104
|
-
end
|
105
|
-
|
106
69
|
# TODO: Deprecate the src/config.rb location.
|
107
|
-
KNOWN_CONFIG_LOCATIONS = [
|
70
|
+
KNOWN_CONFIG_LOCATIONS = [".compass/config.rb", "config/compass.config", "config.rb", "src/config.rb"]
|
108
71
|
|
109
72
|
# Finds the configuration file, if it exists in a known location.
|
110
73
|
def detect_configuration_file(project_path = nil)
|