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
data/examples/downloader.rb
CHANGED
@@ -24,8 +24,8 @@ def fetch(uri_str, limit = 10)
|
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
|
-
def install_from_github(user, project, ext_name,
|
28
|
-
download_link = "http://github.com/#{user}/#{project}/zipball
|
27
|
+
def install_from_github(user, project, ext_name, working_directory = Dir.pwd)
|
28
|
+
download_link = "http://github.com/#{user}/#{project}/zipball/master"
|
29
29
|
extdir = File.join(working_directory,'extensions')
|
30
30
|
|
31
31
|
if !File.exists?(extdir)
|
@@ -1,24 +1,3 @@
|
|
1
1
|
%w(stand_alone rails merb).each do |lib|
|
2
2
|
require "compass/app_integration/#{lib}"
|
3
3
|
end
|
4
|
-
|
5
|
-
module Compass
|
6
|
-
module AppIntegration
|
7
|
-
module Helpers
|
8
|
-
def lookup(project_type)
|
9
|
-
eval "Compass::AppIntegration::#{camelize(project_type)}"
|
10
|
-
rescue NameError
|
11
|
-
raise Compass::Error, "No application integration exists for #{project_type}"
|
12
|
-
end
|
13
|
-
|
14
|
-
protected
|
15
|
-
|
16
|
-
# Stolen from ActiveSupport
|
17
|
-
def camelize(s)
|
18
|
-
s.to_s.gsub(/\/(.?)/) { "::#{$1.upcase}" }.gsub(/(?:^|_)(.)/) { $1.upcase }
|
19
|
-
end
|
20
|
-
|
21
|
-
end
|
22
|
-
extend Helpers
|
23
|
-
end
|
24
|
-
end
|
@@ -5,22 +5,4 @@ end
|
|
5
5
|
require 'compass/app_integration/rails/runtime' if defined?(ActionController::Base)
|
6
6
|
|
7
7
|
|
8
|
-
module Compass
|
9
|
-
module AppIntegration
|
10
|
-
module Rails
|
11
|
-
|
12
|
-
extend self
|
13
|
-
|
14
|
-
def installer(*args)
|
15
|
-
Installer.new(*args)
|
16
|
-
end
|
17
|
-
|
18
|
-
def configuration
|
19
|
-
Compass::Configuration::Data.new('rails').
|
20
|
-
extend(ConfigurationDefaults)
|
21
|
-
end
|
22
|
-
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
8
|
|
@@ -3,18 +3,10 @@ module Compass
|
|
3
3
|
module Rails
|
4
4
|
module ConfigurationDefaults
|
5
5
|
|
6
|
-
def project_type_without_default
|
7
|
-
:rails
|
8
|
-
end
|
9
|
-
|
10
6
|
def default_images_dir
|
11
7
|
File.join("public", "images")
|
12
8
|
end
|
13
9
|
|
14
|
-
def default_fonts_dir
|
15
|
-
File.join("public", "fonts")
|
16
|
-
end
|
17
|
-
|
18
10
|
def default_javascripts_dir
|
19
11
|
File.join("public", "javascripts")
|
20
12
|
end
|
@@ -27,18 +19,10 @@ module Compass
|
|
27
19
|
"/javascripts"
|
28
20
|
end
|
29
21
|
|
30
|
-
def default_http_fonts_path
|
31
|
-
"/fonts"
|
32
|
-
end
|
33
|
-
|
34
22
|
def default_http_stylesheets_path
|
35
23
|
"/stylesheets"
|
36
24
|
end
|
37
25
|
|
38
|
-
def default_extensions_dir
|
39
|
-
"vendor/plugins/compass/extensions"
|
40
|
-
end
|
41
|
-
|
42
26
|
end
|
43
27
|
end
|
44
28
|
end
|
@@ -2,13 +2,15 @@ module Compass
|
|
2
2
|
module Installers
|
3
3
|
class Base
|
4
4
|
end
|
5
|
-
class ManifestInstaller < Base
|
6
|
-
end
|
7
5
|
end
|
8
6
|
|
9
7
|
module AppIntegration
|
10
8
|
module Rails
|
11
|
-
class Installer < Compass::Installers::
|
9
|
+
class Installer < Compass::Installers::Base
|
10
|
+
|
11
|
+
def default_configuration
|
12
|
+
Compass::Configuration::Data.new.extend(ConfigurationDefaults)
|
13
|
+
end
|
12
14
|
|
13
15
|
def completed_configuration
|
14
16
|
config = {}
|
@@ -18,10 +20,8 @@ module Compass
|
|
18
20
|
end
|
19
21
|
|
20
22
|
def write_configuration_files(config_file = nil)
|
21
|
-
config_file ||= targetize('config/compass.
|
22
|
-
directory File.dirname(config_file)
|
23
|
+
config_file ||= targetize('config/compass.config')
|
23
24
|
write_file config_file, config_contents
|
24
|
-
directory File.dirname(targetize('config/initializers/compass.rb'))
|
25
25
|
write_file targetize('config/initializers/compass.rb'), initializer_contents
|
26
26
|
end
|
27
27
|
|
@@ -1,22 +1,3 @@
|
|
1
1
|
%w(configuration_defaults installer).each do |lib|
|
2
2
|
require "compass/app_integration/stand_alone/#{lib}"
|
3
|
-
end
|
4
|
-
|
5
|
-
module Compass
|
6
|
-
module AppIntegration
|
7
|
-
module StandAlone
|
8
|
-
|
9
|
-
extend self
|
10
|
-
|
11
|
-
def installer(*args)
|
12
|
-
Installer.new(*args)
|
13
|
-
end
|
14
|
-
|
15
|
-
def configuration
|
16
|
-
Compass::Configuration::Data.new('stand_alone').
|
17
|
-
extend(ConfigurationDefaults)
|
18
|
-
end
|
19
|
-
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
3
|
+
end
|
@@ -2,10 +2,6 @@ module Compass
|
|
2
2
|
module AppIntegration
|
3
3
|
module StandAlone
|
4
4
|
module ConfigurationDefaults
|
5
|
-
def default_project_type
|
6
|
-
:stand_alone
|
7
|
-
end
|
8
|
-
|
9
5
|
def sass_dir_without_default
|
10
6
|
"src"
|
11
7
|
end
|
@@ -25,4 +21,4 @@ module Compass
|
|
25
21
|
|
26
22
|
end
|
27
23
|
end
|
28
|
-
end
|
24
|
+
end
|
@@ -2,13 +2,11 @@ module Compass
|
|
2
2
|
module Installers
|
3
3
|
class Base
|
4
4
|
end
|
5
|
-
class ManifestInstaller < Base
|
6
|
-
end
|
7
5
|
end
|
8
6
|
|
9
7
|
module AppIntegration
|
10
8
|
module StandAlone
|
11
|
-
class Installer < Compass::Installers::
|
9
|
+
class Installer < Compass::Installers::Base
|
12
10
|
|
13
11
|
def init
|
14
12
|
directory targetize("")
|
@@ -35,40 +33,30 @@ module Compass
|
|
35
33
|
write_configuration_files unless config_files_exist? || !@manifest.generate_config?
|
36
34
|
end
|
37
35
|
|
36
|
+
def default_configuration
|
37
|
+
Compass::Configuration::Data.new.extend(Compass::AppIntegration::StandAlone::ConfigurationDefaults)
|
38
|
+
end
|
39
|
+
|
38
40
|
def completed_configuration
|
39
41
|
nil
|
40
42
|
end
|
41
43
|
|
42
44
|
def finalize(options = {})
|
43
|
-
if options[:create]
|
45
|
+
if options[:create]
|
44
46
|
puts <<-NEXTSTEPS
|
45
47
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
You must compile your sass stylesheets into CSS when they change.
|
57
|
-
This can be done in one of the following ways:
|
58
|
-
1. To compile on demand:
|
59
|
-
compass compile [path/to/project]
|
60
|
-
2. To monitor your project for changes and automatically recompile:
|
61
|
-
compass watch [path/to/project]
|
62
|
-
|
63
|
-
More Resources:
|
64
|
-
* Wiki: http://wiki.github.com/chriseppstein/compass
|
65
|
-
* Sass: http://sass-lang.com
|
66
|
-
* Community: http://groups.google.com/group/compass-users/
|
67
|
-
|
68
|
-
NEXTSTEPS
|
48
|
+
Congratulations! Your compass project has been created.
|
49
|
+
You must recompile your sass stylesheets when they change.
|
50
|
+
This can be done in one of the following ways:
|
51
|
+
1. From within your project directory run:
|
52
|
+
compass
|
53
|
+
2. From any directory run:
|
54
|
+
compass -u path/to/project
|
55
|
+
3. To monitor your project for changes and automatically recompile:
|
56
|
+
compass --watch [path/to/project]
|
57
|
+
NEXTSTEPS
|
69
58
|
end
|
70
|
-
|
71
|
-
if manifest.has_stylesheet? && !manifest.welcome_message_options[:replace]
|
59
|
+
if manifest.has_stylesheet?
|
72
60
|
puts "\nTo import your new stylesheets add the following lines of HTML (or equivalent) to your webpage:"
|
73
61
|
puts stylesheet_links
|
74
62
|
end
|
data/lib/compass/commands.rb
CHANGED
@@ -5,7 +5,7 @@ require 'compass/commands/registry'
|
|
5
5
|
|
6
6
|
%w(base generate_grid_background help list_frameworks project_base
|
7
7
|
update_project watch_project create_project installer_command
|
8
|
-
print_version
|
9
|
-
write_configuration
|
8
|
+
print_version stamp_pattern validate_project
|
9
|
+
write_configuration).each do |lib|
|
10
10
|
require "compass/commands/#{lib}"
|
11
11
|
end
|
@@ -15,10 +15,6 @@ module Compass
|
|
15
15
|
|
16
16
|
Options:
|
17
17
|
}.split("\n").map{|l| l.gsub(/^ */,'')}.join("\n")
|
18
|
-
|
19
|
-
opts.on_tail("--bare", "Don't generate any Sass or CSS files.") do
|
20
|
-
self.options[:bare] = true
|
21
|
-
end
|
22
18
|
else
|
23
19
|
opts.banner = %Q{
|
24
20
|
Usage: compass init project_type path/to/project [options]
|
@@ -68,15 +64,10 @@ module Compass
|
|
68
64
|
end
|
69
65
|
end
|
70
66
|
|
71
|
-
def primary; true; end
|
72
|
-
|
73
67
|
def parse!(arguments)
|
74
68
|
parser = option_parser(arguments)
|
75
69
|
parse_options!(parser, arguments)
|
76
70
|
parse_arguments!(parser, arguments)
|
77
|
-
if parser.options[:framework] && parser.options[:bare]
|
78
|
-
raise Compass::Error, "A bare project cannot be created when a framework is specified."
|
79
|
-
end
|
80
71
|
set_default_arguments(parser)
|
81
72
|
parser.options
|
82
73
|
end
|
@@ -101,7 +92,7 @@ module Compass
|
|
101
92
|
if arguments.size == 1
|
102
93
|
parser.options[:project_name] = arguments.shift
|
103
94
|
elsif arguments.size == 0
|
104
|
-
|
95
|
+
raise Compass::Error, "Please specify a path to the project."
|
105
96
|
else
|
106
97
|
raise Compass::Error, "Too many arguments were specified."
|
107
98
|
end
|
@@ -11,45 +11,20 @@ Description:
|
|
11
11
|
|
12
12
|
To get help on a particular command please specify the command.
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
primary_commands = Compass::Commands.all.select do |c|
|
17
|
-
cmd = Compass::Commands[c]
|
18
|
-
cmd.respond_to?(:primary) && cmd.primary
|
19
|
-
end
|
20
|
-
other_commands = Compass::Commands.all - primary_commands
|
14
|
+
Available commands:
|
21
15
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
banner << " * #{framework.name}\n"
|
28
|
-
framework.template_directories.each do |pattern|
|
29
|
-
banner << " - #{framework.name}/#{pattern}"
|
30
|
-
if description = framework.manifest(pattern).description
|
31
|
-
banner << "\t- #{description}"
|
32
|
-
end
|
33
|
-
banner << "\n"
|
16
|
+
}
|
17
|
+
Compass::Commands.all.sort_by{|c| c.to_s}.each do |command|
|
18
|
+
banner << " * #{command}"
|
19
|
+
if Compass::Commands[command].respond_to? :description
|
20
|
+
banner << "\t- #{Compass::Commands[command].description(command)}"
|
34
21
|
end
|
22
|
+
banner << "\n"
|
35
23
|
end
|
36
|
-
|
37
24
|
opts.banner = banner
|
38
25
|
|
39
26
|
super
|
40
27
|
end
|
41
|
-
|
42
|
-
def command_list(header, commands)
|
43
|
-
list = "#{header}\n"
|
44
|
-
commands.sort_by{|c| c.to_s}.each do |command|
|
45
|
-
list << " * #{command}"
|
46
|
-
if Compass::Commands[command].respond_to? :description
|
47
|
-
list << "\t- #{Compass::Commands[command].description(command)}"
|
48
|
-
end
|
49
|
-
list << "\n"
|
50
|
-
end
|
51
|
-
list
|
52
|
-
end
|
53
28
|
end
|
54
29
|
class Help < Base
|
55
30
|
register :help
|
@@ -78,8 +53,6 @@ To get help on a particular command please specify the command.
|
|
78
53
|
$command = options[:help_command]
|
79
54
|
puts Compass::Commands[options[:help_command]].usage
|
80
55
|
$command = "help"
|
81
|
-
elsif Compass::Frameworks.template_exists? options[:help_command]
|
82
|
-
puts Compass::Frameworks.template_usage(options[:help_command])
|
83
56
|
else
|
84
57
|
raise OptionParser::ParseError, "No such command: #{options[:help_command]}"
|
85
58
|
end
|
@@ -6,28 +6,24 @@ module Compass
|
|
6
6
|
include Compass::Installers
|
7
7
|
|
8
8
|
def configure!
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
end
|
14
|
-
Compass.add_configuration(options, 'command_line')
|
9
|
+
Compass.add_configuration(installer.default_configuration)
|
10
|
+
Compass.add_project_configuration
|
11
|
+
Compass.add_configuration(options)
|
12
|
+
Compass.add_configuration(installer.completed_configuration)
|
15
13
|
if File.exists?(Compass.configuration.extensions_path)
|
16
14
|
Compass::Frameworks.discover(Compass.configuration.extensions_path)
|
17
15
|
end
|
18
|
-
Compass.add_configuration(installer.completed_configuration, 'installer')
|
19
16
|
end
|
20
17
|
|
21
|
-
def
|
22
|
-
|
18
|
+
def installer
|
19
|
+
project_type = options[:project_type] || Compass.configuration.project_type
|
20
|
+
installer_class = "Compass::AppIntegration::#{camelize(project_type)}::Installer"
|
21
|
+
@installer = eval("#{installer_class}.new *installer_args")
|
23
22
|
end
|
24
23
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
else
|
29
|
-
app.installer(*installer_args)
|
30
|
-
end
|
24
|
+
# Stolen from ActiveSupport
|
25
|
+
def camelize(s)
|
26
|
+
s.to_s.gsub(/\/(.?)/) { "::#{$1.upcase}" }.gsub(/(?:^|_)(.)/) { $1.upcase }
|
31
27
|
end
|
32
28
|
|
33
29
|
def installer_args
|
@@ -11,7 +11,7 @@ module Compass
|
|
11
11
|
def initialize(working_path, options = {})
|
12
12
|
super(working_path, options)
|
13
13
|
self.project_name = determine_project_name(working_path, options)
|
14
|
-
Compass.
|
14
|
+
Compass.configuration.project_path = determine_project_directory(working_path, options)
|
15
15
|
configure!
|
16
16
|
end
|
17
17
|
|
@@ -89,4 +89,4 @@ module Compass
|
|
89
89
|
|
90
90
|
end
|
91
91
|
end
|
92
|
-
end
|
92
|
+
end
|
@@ -3,25 +3,8 @@ require 'compass/compiler'
|
|
3
3
|
|
4
4
|
module Compass
|
5
5
|
module Commands
|
6
|
-
module CompileProjectOptionsParser
|
7
|
-
def set_options(opts)
|
8
|
-
opts.banner = %Q{
|
9
|
-
Usage: compass compile [path/to/project] [options]
|
10
|
-
|
11
|
-
Description:
|
12
|
-
compile project at the path specified or the current director if not specified.
|
13
|
-
|
14
|
-
Options:
|
15
|
-
}.split("\n").map{|l| l.gsub(/^ */,'')}.join("\n")
|
16
|
-
|
17
|
-
super
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
6
|
class UpdateProject < ProjectBase
|
22
|
-
|
23
|
-
register :compile
|
24
|
-
|
7
|
+
|
25
8
|
def initialize(working_path, options)
|
26
9
|
super
|
27
10
|
assert_project_directory_exists! unless dry_run?
|
@@ -50,39 +33,6 @@ module Compass
|
|
50
33
|
:force => options[:force]).merge(additional_options))
|
51
34
|
end
|
52
35
|
|
53
|
-
class << self
|
54
|
-
def option_parser(arguments)
|
55
|
-
parser = Compass::Exec::CommandOptionParser.new(arguments)
|
56
|
-
parser.extend(Compass::Exec::GlobalOptionsParser)
|
57
|
-
parser.extend(Compass::Exec::ProjectOptionsParser)
|
58
|
-
parser.extend(CompileProjectOptionsParser)
|
59
|
-
end
|
60
|
-
|
61
|
-
def usage
|
62
|
-
option_parser([]).to_s
|
63
|
-
end
|
64
|
-
|
65
|
-
def primary; true; end
|
66
|
-
|
67
|
-
def description(command)
|
68
|
-
"Compile Sass stylesheets to CSS"
|
69
|
-
end
|
70
|
-
|
71
|
-
def parse!(arguments)
|
72
|
-
parser = option_parser(arguments)
|
73
|
-
parser.parse!
|
74
|
-
parse_arguments!(parser, arguments)
|
75
|
-
parser.options
|
76
|
-
end
|
77
|
-
|
78
|
-
def parse_arguments!(parser, arguments)
|
79
|
-
if arguments.size == 1
|
80
|
-
parser.options[:project_name] = arguments.shift
|
81
|
-
elsif arguments.size > 1
|
82
|
-
raise Compass::Error, "Too many arguments were specified."
|
83
|
-
end
|
84
|
-
end
|
85
|
-
end
|
86
36
|
end
|
87
37
|
end
|
88
38
|
end
|