compass-edge 0.9.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.
- data/CHANGELOG.markdown +528 -0
- data/LICENSE.markdown +29 -0
- data/README.markdown +46 -0
- data/REVISION +1 -0
- data/Rakefile +131 -0
- data/VERSION.yml +4 -0
- data/bin/compass +26 -0
- data/deps.rip +1 -0
- data/examples/README.markdown +4 -0
- data/examples/blueprint_default/config.rb +7 -0
- data/examples/blueprint_default/images/grid.png +0 -0
- data/examples/blueprint_default/index.html.haml +85 -0
- data/examples/blueprint_default/parts/elements.html.haml +282 -0
- data/examples/blueprint_default/parts/forms.html.haml +190 -0
- data/examples/blueprint_default/parts/grid.html.haml +274 -0
- data/examples/blueprint_default/parts/test-small.jpg +0 -0
- data/examples/blueprint_default/parts/test.jpg +0 -0
- data/examples/blueprint_default/parts/valid.png +0 -0
- data/examples/blueprint_default/src/ie.sass +3 -0
- data/examples/blueprint_default/src/images/grid.png +0 -0
- data/examples/blueprint_default/src/print.sass +3 -0
- data/examples/blueprint_default/src/screen.sass +8 -0
- data/examples/blueprint_plugins/config.rb +8 -0
- data/examples/blueprint_plugins/images/buttons/cross.png +0 -0
- data/examples/blueprint_plugins/images/buttons/key.png +0 -0
- data/examples/blueprint_plugins/images/buttons/tick.png +0 -0
- data/examples/blueprint_plugins/images/grid.png +0 -0
- data/examples/blueprint_plugins/images/link_icons/doc.png +0 -0
- data/examples/blueprint_plugins/images/link_icons/email.png +0 -0
- data/examples/blueprint_plugins/images/link_icons/external.png +0 -0
- data/examples/blueprint_plugins/images/link_icons/feed.png +0 -0
- data/examples/blueprint_plugins/images/link_icons/im.png +0 -0
- data/examples/blueprint_plugins/images/link_icons/pdf.png +0 -0
- data/examples/blueprint_plugins/images/link_icons/visited.png +0 -0
- data/examples/blueprint_plugins/images/link_icons/xls.png +0 -0
- data/examples/blueprint_plugins/images/test-small.jpg +0 -0
- data/examples/blueprint_plugins/images/test.jpg +0 -0
- data/examples/blueprint_plugins/images/valid.png +0 -0
- data/examples/blueprint_plugins/index.html.haml +96 -0
- data/examples/blueprint_plugins/plugins/buttons.html.haml +67 -0
- data/examples/blueprint_plugins/plugins/fancy_type.html.haml +100 -0
- data/examples/blueprint_plugins/plugins/link_icons.html.haml +61 -0
- data/examples/blueprint_plugins/plugins/rtl.html.haml +100 -0
- data/examples/blueprint_plugins/src/buttons.sass +49 -0
- data/examples/blueprint_plugins/src/ie.sass +3 -0
- data/examples/blueprint_plugins/src/images/grid.png +0 -0
- data/examples/blueprint_plugins/src/link_icons.sass +13 -0
- data/examples/blueprint_plugins/src/print.sass +3 -0
- data/examples/blueprint_plugins/src/rtl_screen.sass +13 -0
- data/examples/blueprint_plugins/src/screen.sass +11 -0
- data/examples/blueprint_scoped/images/grid.png +0 -0
- data/examples/blueprint_scoped/src/ie.sass +4 -0
- data/examples/blueprint_scoped/src/print.sass +4 -0
- data/examples/blueprint_scoped/src/screen.sass +5 -0
- data/examples/blueprint_scoped_form/images/grid.png +0 -0
- data/examples/blueprint_scoped_form/src/ie.sass +3 -0
- data/examples/blueprint_scoped_form/src/print.sass +3 -0
- data/examples/blueprint_scoped_form/src/screen.sass +10 -0
- data/examples/blueprint_semantic/config.rb +7 -0
- data/examples/blueprint_semantic/images/grid.png +0 -0
- data/examples/blueprint_semantic/index.html.haml +86 -0
- data/examples/blueprint_semantic/parts/fancy_type.html.haml +100 -0
- data/examples/blueprint_semantic/parts/liquid.html.haml +100 -0
- data/examples/blueprint_semantic/parts/test-small.jpg +0 -0
- data/examples/blueprint_semantic/parts/test.jpg +0 -0
- data/examples/blueprint_semantic/parts/valid.png +0 -0
- data/examples/blueprint_semantic/src/ie.sass +3 -0
- data/examples/blueprint_semantic/src/images/grid.png +0 -0
- data/examples/blueprint_semantic/src/liquid.sass +69 -0
- data/examples/blueprint_semantic/src/print.sass +3 -0
- data/examples/blueprint_semantic/src/screen.sass +70 -0
- data/examples/compass/compass.html.haml +39 -0
- data/examples/compass/config.rb +7 -0
- data/examples/compass/images/blue_arrow.gif +0 -0
- data/examples/compass/src/compass.sass +47 -0
- data/examples/compass/src/images/blue_arrow.gif +0 -0
- data/examples/compass/src/sticky_footer.sass +11 -0
- data/examples/compass/src/utilities.sass +108 -0
- data/examples/compass/sticky_footer.html.haml +14 -0
- data/examples/compass/utilities.html.haml +189 -0
- data/examples/downloader.rb +57 -0
- data/examples/logo/logo.html.haml +40 -0
- data/examples/logo/src/ie.sass +6 -0
- data/examples/logo/src/print.sass +6 -0
- data/examples/logo/src/screen.sass +29 -0
- data/examples/ninesixty/bootstrap.rb +4 -0
- data/examples/ninesixty/config.rb +9 -0
- data/examples/ninesixty/extensions/ninesixty/README.mkdn +56 -0
- data/examples/ninesixty/extensions/ninesixty/compass-960-plugin.gemspec +36 -0
- data/examples/ninesixty/extensions/ninesixty/lib/ninesixty.rb +1 -0
- data/examples/ninesixty/extensions/ninesixty/lib/ninesixty/compass_plugin.rb +5 -0
- data/examples/ninesixty/extensions/ninesixty/sass/960/_grid.sass +64 -0
- data/examples/ninesixty/extensions/ninesixty/sass/960/_text.sass +59 -0
- data/examples/ninesixty/extensions/ninesixty/templates/project/grid.sass +34 -0
- data/examples/ninesixty/extensions/ninesixty/templates/project/manifest.rb +2 -0
- data/examples/ninesixty/extensions/ninesixty/templates/project/text.sass +10 -0
- data/examples/ninesixty/src/grid.sass +16 -0
- data/examples/ninesixty/src/text.sass +10 -0
- data/examples/yui/bootstrap.rb +3 -0
- data/examples/yui/divisions.html.haml +179 -0
- data/examples/yui/extensions/yui/stylesheets/_yui.sass +7 -0
- data/examples/yui/extensions/yui/stylesheets/yui/modules/_base.sass +70 -0
- data/examples/yui/extensions/yui/stylesheets/yui/modules/_fonts.sass +45 -0
- data/examples/yui/extensions/yui/stylesheets/yui/modules/_grids.sass +385 -0
- data/examples/yui/extensions/yui/stylesheets/yui/modules/_reset.sass +61 -0
- data/examples/yui/extensions/yui/templates/project/manifest.rb +1 -0
- data/examples/yui/extensions/yui/templates/project/screen.sass +4 -0
- data/examples/yui/index.html.haml +19 -0
- data/examples/yui/src/screen.sass +13 -0
- data/examples/yui/sub_divisions.html.haml +169 -0
- data/examples/yui/templates.html.haml +54 -0
- data/examples/yui/test.jpg +0 -0
- data/examples/yui/typography.html.haml +132 -0
- data/lib/compass.rb +22 -0
- data/lib/compass/actions.rb +116 -0
- data/lib/compass/app_integration.rb +3 -0
- data/lib/compass/app_integration/merb.rb +1 -0
- data/lib/compass/app_integration/merb/runtime.rb +63 -0
- data/lib/compass/app_integration/rails.rb +8 -0
- data/lib/compass/app_integration/rails/action_controller.rb +15 -0
- data/lib/compass/app_integration/rails/configuration_defaults.rb +29 -0
- data/lib/compass/app_integration/rails/installer.rb +127 -0
- data/lib/compass/app_integration/rails/runtime.rb +14 -0
- data/lib/compass/app_integration/rails/sass_plugin.rb +5 -0
- data/lib/compass/app_integration/rails/templates/compass-install-rails.rb +80 -0
- data/lib/compass/app_integration/rails/urls.rb +14 -0
- data/lib/compass/app_integration/stand_alone.rb +3 -0
- data/lib/compass/app_integration/stand_alone/configuration_defaults.rb +24 -0
- data/lib/compass/app_integration/stand_alone/installer.rb +71 -0
- data/lib/compass/commands.rb +11 -0
- data/lib/compass/commands/base.rb +36 -0
- data/lib/compass/commands/create_project.rb +113 -0
- data/lib/compass/commands/generate_grid_background.rb +91 -0
- data/lib/compass/commands/help.rb +62 -0
- data/lib/compass/commands/installer_command.rb +34 -0
- data/lib/compass/commands/list_frameworks.rb +16 -0
- data/lib/compass/commands/print_version.rb +91 -0
- data/lib/compass/commands/project_base.rb +92 -0
- data/lib/compass/commands/registry.rb +22 -0
- data/lib/compass/commands/stamp_pattern.rb +86 -0
- data/lib/compass/commands/update_project.rb +38 -0
- data/lib/compass/commands/validate_project.rb +21 -0
- data/lib/compass/commands/watch_project.rb +69 -0
- data/lib/compass/commands/write_configuration.rb +32 -0
- data/lib/compass/compiler.rb +54 -0
- data/lib/compass/configuration.rb +38 -0
- data/lib/compass/configuration/adapters.rb +59 -0
- data/lib/compass/configuration/comments.rb +22 -0
- data/lib/compass/configuration/data.rb +103 -0
- data/lib/compass/configuration/defaults.rb +107 -0
- data/lib/compass/configuration/helpers.rb +83 -0
- data/lib/compass/configuration/inheritance.rb +170 -0
- data/lib/compass/configuration/serialization.rb +86 -0
- data/lib/compass/core_ext.rb +14 -0
- data/lib/compass/dependencies.rb +6 -0
- data/lib/compass/errors.rb +7 -0
- data/lib/compass/exec.rb +15 -0
- data/lib/compass/exec/command_option_parser.rb +23 -0
- data/lib/compass/exec/global_options_parser.rb +37 -0
- data/lib/compass/exec/helpers.rb +28 -0
- data/lib/compass/exec/project_options_parser.rb +42 -0
- data/lib/compass/exec/sub_command_ui.rb +45 -0
- data/lib/compass/exec/switch_ui.rb +166 -0
- data/lib/compass/frameworks.rb +53 -0
- data/lib/compass/frameworks/blueprint/stylesheets/_blueprint.sass +3 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_ie.sass +99 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_print.sass +90 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_reset.sass +3 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_screen.sass +29 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_buttons.sass +84 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_colors.sass +33 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_debug.sass +9 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_fancy_type.sass +82 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_form.sass +55 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_grid.sass +178 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_interaction.sass +58 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_link_icons.sass +44 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_liquid.sass +141 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_reset.sass +56 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_rtl.sass +122 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_scaffolding.sass +47 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_typography.sass +160 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_utilities.sass +37 -0
- data/lib/compass/frameworks/blueprint/templates/buttons/buttons.sass +49 -0
- data/lib/compass/frameworks/blueprint/templates/buttons/buttons/cross.png +0 -0
- data/lib/compass/frameworks/blueprint/templates/buttons/buttons/key.png +0 -0
- data/lib/compass/frameworks/blueprint/templates/buttons/buttons/tick.png +0 -0
- data/lib/compass/frameworks/blueprint/templates/buttons/manifest.rb +5 -0
- data/lib/compass/frameworks/blueprint/templates/link_icons/link_icons.sass +13 -0
- data/lib/compass/frameworks/blueprint/templates/link_icons/link_icons/doc.png +0 -0
- data/lib/compass/frameworks/blueprint/templates/link_icons/link_icons/email.png +0 -0
- data/lib/compass/frameworks/blueprint/templates/link_icons/link_icons/external.png +0 -0
- data/lib/compass/frameworks/blueprint/templates/link_icons/link_icons/feed.png +0 -0
- data/lib/compass/frameworks/blueprint/templates/link_icons/link_icons/im.png +0 -0
- data/lib/compass/frameworks/blueprint/templates/link_icons/link_icons/pdf.png +0 -0
- data/lib/compass/frameworks/blueprint/templates/link_icons/link_icons/visited.png +0 -0
- data/lib/compass/frameworks/blueprint/templates/link_icons/link_icons/xls.png +0 -0
- data/lib/compass/frameworks/blueprint/templates/link_icons/manifest.rb +10 -0
- data/lib/compass/frameworks/blueprint/templates/project/grid.png +0 -0
- data/lib/compass/frameworks/blueprint/templates/project/ie.sass +16 -0
- data/lib/compass/frameworks/blueprint/templates/project/manifest.rb +8 -0
- data/lib/compass/frameworks/blueprint/templates/project/partials/_base.sass +11 -0
- data/lib/compass/frameworks/blueprint/templates/project/print.sass +8 -0
- data/lib/compass/frameworks/blueprint/templates/project/screen.sass +47 -0
- data/lib/compass/frameworks/blueprint/templates/project/welcome.html.haml +13 -0
- data/lib/compass/frameworks/compass/stylesheets/_compass.sass +1 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/_layout.sass +1 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/_misc.sass +24 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/_reset.sass +3 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/_utilities.sass +7 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/layout/_sticky_footer.sass +19 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/_css3.sass +6 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/_general.sass +5 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/_links.sass +3 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/_lists.sass +3 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/_print.sass +18 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/_sprites.sass +1 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/_tables.sass +3 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/_text.sass +2 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/css3/_border_radius.sass +47 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/css3/_box_shadow.sass +12 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/css3/_box_sizing.sass +13 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/css3/_columns.sass +37 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/css3/_inline_block.sass +7 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/css3/_opacity.sass +18 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.sass +24 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/general/_float.sass +17 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/general/_hacks.sass +6 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/general/_reset.sass +134 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/general/_tabs.sass +0 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/general/_tag_cloud.sass +19 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/links/_hover_link.sass +5 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/links/_link_colors.sass +24 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/links/_unstyled_link.sass +7 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/lists/_bullets.sass +21 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/lists/_horizontal_list.sass +52 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/lists/_inline_list.sass +29 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/sprites/_sprite_img.sass +52 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/tables/_alternating_rows_and_columns.sass +20 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/tables/_borders.sass +27 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/tables/_scaffolding.sass +9 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/text/_ellipsis.sass +13 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/text/_nowrap.sass +3 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/text/_replacement.sass +17 -0
- data/lib/compass/frameworks/compass/templates/ellipsis/ellipsis.sass +6 -0
- data/lib/compass/frameworks/compass/templates/ellipsis/manifest.rb +2 -0
- data/lib/compass/frameworks/compass/templates/ellipsis/xml/ellipsis.xml +14 -0
- data/lib/compass/frameworks/compass/templates/extension/manifest.rb +6 -0
- data/lib/compass/frameworks/compass/templates/extension/stylesheets/main.sass +1 -0
- data/lib/compass/frameworks/compass/templates/extension/templates/project/manifest.rb +2 -0
- data/lib/compass/frameworks/compass/templates/extension/templates/project/screen.sass +2 -0
- data/lib/compass/frameworks/compass/templates/project/ie.sass +6 -0
- data/lib/compass/frameworks/compass/templates/project/manifest.rb +3 -0
- data/lib/compass/frameworks/compass/templates/project/print.sass +6 -0
- data/lib/compass/frameworks/compass/templates/project/screen.sass +13 -0
- data/lib/compass/grid_builder.rb +76 -0
- data/lib/compass/installers.rb +3 -0
- data/lib/compass/installers/base.rb +186 -0
- data/lib/compass/installers/manifest.rb +79 -0
- data/lib/compass/installers/template_context.rb +44 -0
- data/lib/compass/logger.rb +42 -0
- data/lib/compass/sass_extensions.rb +5 -0
- data/lib/compass/sass_extensions/functions.rb +19 -0
- data/lib/compass/sass_extensions/functions/display.rb +22 -0
- data/lib/compass/sass_extensions/functions/enumerate.rb +6 -0
- data/lib/compass/sass_extensions/functions/inline_image.rb +35 -0
- data/lib/compass/sass_extensions/functions/selectors.rb +42 -0
- data/lib/compass/sass_extensions/functions/urls.rb +105 -0
- data/lib/compass/sass_extensions/monkey_patches.rb +3 -0
- data/lib/compass/sass_extensions/monkey_patches/stylesheet_updating.rb +23 -0
- data/lib/compass/test_case.rb +38 -0
- data/lib/compass/validator.rb +10 -0
- data/lib/compass/version.rb +57 -0
- data/lib/vendor/fssm.rb +28 -0
- data/lib/vendor/fssm/backends/fsevents.rb +78 -0
- data/lib/vendor/fssm/backends/polling.rb +24 -0
- data/lib/vendor/fssm/ext.rb +7 -0
- data/lib/vendor/fssm/monitor.rb +21 -0
- data/lib/vendor/fssm/path.rb +88 -0
- data/lib/vendor/fssm/state.rb +46 -0
- data/lib/vendor/fssm/support.rb +26 -0
- data/test/command_line_helper.rb +97 -0
- data/test/command_line_test.rb +67 -0
- data/test/compass_test.rb +132 -0
- data/test/configuration_test.rb +123 -0
- data/test/fixtures/stylesheets/blueprint/config.rb +9 -0
- data/test/fixtures/stylesheets/blueprint/css/typography.css +158 -0
- data/test/fixtures/stylesheets/blueprint/images/grid.png +0 -0
- data/test/fixtures/stylesheets/blueprint/sass/ie.sass +3 -0
- data/test/fixtures/stylesheets/blueprint/sass/print.sass +3 -0
- data/test/fixtures/stylesheets/blueprint/sass/screen.sass +17 -0
- data/test/fixtures/stylesheets/blueprint/sass/typography.sass +3 -0
- data/test/fixtures/stylesheets/compass/config.rb +9 -0
- data/test/fixtures/stylesheets/compass/css/layout.css +15 -0
- data/test/fixtures/stylesheets/compass/css/print.css +18 -0
- data/test/fixtures/stylesheets/compass/css/reset.css +60 -0
- data/test/fixtures/stylesheets/compass/css/utilities.css +17 -0
- data/test/fixtures/stylesheets/compass/sass/layout.sass +3 -0
- data/test/fixtures/stylesheets/compass/sass/print.sass +5 -0
- data/test/fixtures/stylesheets/compass/sass/reset.sass +10 -0
- data/test/fixtures/stylesheets/compass/sass/utilities.sass +6 -0
- data/test/fixtures/stylesheets/image_urls/config.rb +17 -0
- data/test/fixtures/stylesheets/image_urls/css/screen.css +3 -0
- data/test/fixtures/stylesheets/image_urls/images/grid.png +0 -0
- data/test/fixtures/stylesheets/image_urls/sass/screen.sass +6 -0
- data/test/io_helper.rb +19 -0
- data/test/rails_integration_test.rb +84 -0
- data/test/sass_extensions_test.rb +31 -0
- data/test/test_case_helper.rb +13 -0
- data/test/test_helper.rb +27 -0
- data/test/test_rails_helper.rb +20 -0
- metadata +404 -0
data/lib/compass.rb
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
module Compass
|
|
2
|
+
end
|
|
3
|
+
|
|
4
|
+
%w(dependencies sass_extensions core_ext version errors).each do |lib|
|
|
5
|
+
require "compass/#{lib}"
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
module Compass
|
|
9
|
+
extend Compass::Version
|
|
10
|
+
VERSION = "#{version[:major]}.#{version[:minor]}.#{version[:patch]}"
|
|
11
|
+
def base_directory
|
|
12
|
+
File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
|
13
|
+
end
|
|
14
|
+
def lib_directory
|
|
15
|
+
File.expand_path(File.join(File.dirname(__FILE__)))
|
|
16
|
+
end
|
|
17
|
+
module_function :base_directory, :lib_directory
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
%w(configuration frameworks app_integration).each do |lib|
|
|
21
|
+
require "compass/#{lib}"
|
|
22
|
+
end
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
module Compass
|
|
2
|
+
module Actions
|
|
3
|
+
|
|
4
|
+
attr_writer :logger
|
|
5
|
+
|
|
6
|
+
def logger
|
|
7
|
+
@logger ||= Logger.new
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
# copy/process a template in the compass template directory to the project directory.
|
|
11
|
+
def copy(from, to, options = nil, binary = false)
|
|
12
|
+
options ||= self.options if self.respond_to?(:options)
|
|
13
|
+
contents = File.new(from).read
|
|
14
|
+
write_file to, contents, options, binary
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# create a directory and all the directories necessary to reach it.
|
|
18
|
+
def directory(dir, options = nil)
|
|
19
|
+
options ||= self.options if self.respond_to?(:options)
|
|
20
|
+
if File.exists?(dir) && File.directory?(dir)
|
|
21
|
+
logger.record :exists, basename(dir) unless options[:quiet]
|
|
22
|
+
elsif File.exists?(dir)
|
|
23
|
+
msg = "#{basename(dir)} already exists and is not a directory."
|
|
24
|
+
raise Compass::FilesystemConflict.new(msg)
|
|
25
|
+
else
|
|
26
|
+
logger.record :directory, separate("#{basename(dir)}/")
|
|
27
|
+
FileUtils.mkdir_p(dir) unless options[:dry_run]
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Write a file given the file contents as a string
|
|
32
|
+
def write_file(file_name, contents, options = nil, binary = false)
|
|
33
|
+
options ||= self.options if self.respond_to?(:options)
|
|
34
|
+
skip_write = options[:dry_run]
|
|
35
|
+
contents = process_erb(contents, options[:erb]) if options[:erb]
|
|
36
|
+
if File.exists?(file_name)
|
|
37
|
+
existing_contents = IO.read(file_name)
|
|
38
|
+
if existing_contents == contents
|
|
39
|
+
logger.record :identical, basename(file_name)
|
|
40
|
+
skip_write = true
|
|
41
|
+
elsif options[:force]
|
|
42
|
+
logger.record :overwrite, basename(file_name)
|
|
43
|
+
else
|
|
44
|
+
msg = "File #{basename(file_name)} already exists. Run with --force to force overwrite."
|
|
45
|
+
raise Compass::FilesystemConflict.new(msg)
|
|
46
|
+
end
|
|
47
|
+
else
|
|
48
|
+
logger.record :create, basename(file_name)
|
|
49
|
+
end
|
|
50
|
+
if skip_write
|
|
51
|
+
FileUtils.touch file_name unless options[:dry_run]
|
|
52
|
+
else
|
|
53
|
+
mode = "w"
|
|
54
|
+
mode << "b" if binary
|
|
55
|
+
open(file_name, mode) do |file|
|
|
56
|
+
file.write(contents)
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
def process_erb(contents, ctx = nil)
|
|
62
|
+
ctx = Object.new.instance_eval("binding") unless ctx.is_a? Binding
|
|
63
|
+
ERB.new(contents).result(ctx)
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Compile one Sass file
|
|
67
|
+
def compile(sass_filename, css_filename, options)
|
|
68
|
+
if options[:force] || Sass::Plugin.exact_stylesheet_needs_update?(css_filename, sass_filename)
|
|
69
|
+
logger.record :compile, basename(sass_filename) unless options[:quiet]
|
|
70
|
+
engine = ::Sass::Engine.new(open(sass_filename).read,
|
|
71
|
+
:filename => sass_filename,
|
|
72
|
+
:line_comments => options[:line_comments],
|
|
73
|
+
:style => options[:style],
|
|
74
|
+
:css_filename => css_filename,
|
|
75
|
+
:load_paths => options[:load_paths],
|
|
76
|
+
:cache_location => options[:cache_location])
|
|
77
|
+
css_content = engine.render
|
|
78
|
+
write_file(css_filename, css_content, options.merge(:force => true))
|
|
79
|
+
else
|
|
80
|
+
logger.record :unchanged, basename(sass_filename) unless options[:quiet]
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
def remove(file_name)
|
|
85
|
+
if File.exists?(file_name)
|
|
86
|
+
File.unlink file_name
|
|
87
|
+
logger.record :remove, basename(file_name)
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
def basename(file)
|
|
92
|
+
relativize(file) {|f| File.basename(file)}
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
def relativize(path)
|
|
96
|
+
if path.index(working_path+File::SEPARATOR) == 0
|
|
97
|
+
path[(working_path+File::SEPARATOR).length..-1]
|
|
98
|
+
elsif block_given?
|
|
99
|
+
yield path
|
|
100
|
+
else
|
|
101
|
+
path
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Write paths like we're on unix and then fix it
|
|
106
|
+
def separate(path)
|
|
107
|
+
path.gsub(%r{/}, File::SEPARATOR)
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Removes the trailing separator, if any, from a path.
|
|
111
|
+
def strip_trailing_separator(path)
|
|
112
|
+
(path[-1..-1] == File::SEPARATOR) ? path[0..-2] : path
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
end
|
|
116
|
+
end
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require 'compass/app_integration/merb/runtime' if defined?(Merb::Plugins)
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# To configure Merb to use compass do the following:
|
|
2
|
+
#
|
|
3
|
+
# Add dependencies to config/dependencies.rb
|
|
4
|
+
#
|
|
5
|
+
# dependency "haml", ">=2.2.0"
|
|
6
|
+
# dependency "merb-haml", merb_gems_version
|
|
7
|
+
# dependency "chriseppstein-compass", :require_as => 'compass'
|
|
8
|
+
#
|
|
9
|
+
#
|
|
10
|
+
# To use a different sass stylesheets locations as is recommended by compass
|
|
11
|
+
# add this configuration to your configuration block:
|
|
12
|
+
#
|
|
13
|
+
# Merb::BootLoader.before_app_loads do
|
|
14
|
+
# Merb::Plugins.config[:compass] = {
|
|
15
|
+
# :stylesheets => "app/stylesheets",
|
|
16
|
+
# :compiled_stylesheets => "public/stylesheets/compiled"
|
|
17
|
+
# }
|
|
18
|
+
# end
|
|
19
|
+
#
|
|
20
|
+
module Compass
|
|
21
|
+
def self.setup_template_location
|
|
22
|
+
# default the compass configuration if they didn't set it up yet.
|
|
23
|
+
Merb::Plugins.config[:compass] ||= {}
|
|
24
|
+
|
|
25
|
+
# default sass stylesheet location unless configured to something else
|
|
26
|
+
Merb::Plugins.config[:compass][:stylesheets] ||= Merb.dir_for(:stylesheet) / "sass"
|
|
27
|
+
|
|
28
|
+
# default sass css location unless configured to something else
|
|
29
|
+
Merb::Plugins.config[:compass][:compiled_stylesheets] ||= Merb.dir_for(:stylesheet)
|
|
30
|
+
|
|
31
|
+
#define the template hash for the project stylesheets as well as the framework stylesheets.
|
|
32
|
+
template_location = {
|
|
33
|
+
Merb::Plugins.config[:compass][:stylesheets] => Merb::Plugins.config[:compass][:compiled_stylesheets]
|
|
34
|
+
}
|
|
35
|
+
Compass::Frameworks::ALL.each do |framework|
|
|
36
|
+
template_location[framework.stylesheets_directory] = Merb::Plugins.config[:compass][:compiled_stylesheets]
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# merge existing template locations if present
|
|
40
|
+
if Merb::Plugins.config[:sass][:template_location].is_a?(Hash)
|
|
41
|
+
template_location.merge!(Merb::Plugins.config[:sass][:template_location])
|
|
42
|
+
Merb::Plugins.config[:sass][:template_location] = template_location
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
#configure Sass to know about all these sass locations.
|
|
46
|
+
Sass::Plugin.options[:template_location] = template_location
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
Merb::BootLoader.after_app_loads do
|
|
51
|
+
#set up sass if haml load didn't do it -- this happens when using a non-default stylesheet location.
|
|
52
|
+
unless defined?(Sass::Plugin)
|
|
53
|
+
require "sass/plugin"
|
|
54
|
+
if Merb::Plugins.config[:sass]
|
|
55
|
+
Sass::Plugin.options = Merb::Plugins.config[:sass]
|
|
56
|
+
# support old (deprecatd Merb::Config[:sass] option)
|
|
57
|
+
elsif Merb::Config[:sass]
|
|
58
|
+
Sass::Plugin.options = Merb::Config[:sass]
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
Compass.setup_template_location
|
|
63
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# :stopdoc:
|
|
2
|
+
module ActionController
|
|
3
|
+
class Base
|
|
4
|
+
def process_with_compass(*args)
|
|
5
|
+
Sass::Plugin.rails_controller = self
|
|
6
|
+
begin
|
|
7
|
+
process_without_compass(*args)
|
|
8
|
+
ensure
|
|
9
|
+
Sass::Plugin.rails_controller = nil
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
alias_method_chain :process, :compass
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
# :startdoc:
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
module Compass
|
|
2
|
+
module AppIntegration
|
|
3
|
+
module Rails
|
|
4
|
+
module ConfigurationDefaults
|
|
5
|
+
|
|
6
|
+
def default_images_dir
|
|
7
|
+
File.join("public", "images")
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def default_javascripts_dir
|
|
11
|
+
File.join("public", "javascripts")
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def default_http_images_path
|
|
15
|
+
"/images"
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def default_http_javascripts_path
|
|
19
|
+
"/javascripts"
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def default_http_stylesheets_path
|
|
23
|
+
"/stylesheets"
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
module Compass
|
|
2
|
+
module Installers
|
|
3
|
+
class Base
|
|
4
|
+
end
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
module AppIntegration
|
|
8
|
+
module Rails
|
|
9
|
+
class Installer < Compass::Installers::Base
|
|
10
|
+
|
|
11
|
+
def default_configuration
|
|
12
|
+
Compass::Configuration::Data.new.extend(ConfigurationDefaults)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def completed_configuration
|
|
16
|
+
config = {}
|
|
17
|
+
config[:sass_dir] = prompt_sass_dir unless sass_dir_without_default
|
|
18
|
+
config[:css_dir] = prompt_css_dir unless css_dir_without_default
|
|
19
|
+
config unless config.empty?
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def write_configuration_files(config_file = nil)
|
|
23
|
+
config_file ||= targetize('config/compass.config')
|
|
24
|
+
write_file config_file, config_contents
|
|
25
|
+
write_file targetize('config/initializers/compass.rb'), initializer_contents
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def config_files_exist?
|
|
29
|
+
File.exists?(targetize('config/compass.config')) &&
|
|
30
|
+
File.exists?(targetize('config/initializers/compass.rb'))
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def prepare
|
|
34
|
+
write_configuration_files unless config_files_exist?
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def finalize(options = {})
|
|
38
|
+
if options[:create]
|
|
39
|
+
puts <<-NEXTSTEPS
|
|
40
|
+
|
|
41
|
+
Congratulations! Your rails project has been configured to use Compass.
|
|
42
|
+
Sass will automatically compile your stylesheets during the next
|
|
43
|
+
page request and keep them up to date when they change.
|
|
44
|
+
Make sure you restart your server!
|
|
45
|
+
NEXTSTEPS
|
|
46
|
+
end
|
|
47
|
+
if manifest.has_stylesheet?
|
|
48
|
+
puts "\nNext add these lines to the head of your layouts:\n\n"
|
|
49
|
+
puts stylesheet_links
|
|
50
|
+
puts "\n(You are using haml, aren't you?)"
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def install_location_for_html(to, options)
|
|
56
|
+
separate("public/#{pattern_name_as_dir}#{to}")
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def prompt_sass_dir
|
|
60
|
+
recommended_location = separate('app/stylesheets')
|
|
61
|
+
default_location = separate('public/stylesheets/sass')
|
|
62
|
+
print %Q{Compass recommends that you keep your stylesheets in #{recommended_location}
|
|
63
|
+
instead of the Sass default location of #{default_location}.
|
|
64
|
+
Is this OK? (Y/n) }
|
|
65
|
+
answer = gets.downcase[0]
|
|
66
|
+
answer == ?n ? default_location : recommended_location
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def prompt_css_dir
|
|
70
|
+
recommended_location = separate("public/stylesheets/compiled")
|
|
71
|
+
default_location = separate("public/stylesheets")
|
|
72
|
+
puts
|
|
73
|
+
print %Q{Compass recommends that you keep your compiled css in #{recommended_location}/
|
|
74
|
+
instead the Sass default of #{default_location}/.
|
|
75
|
+
However, if you're exclusively using Sass, then #{default_location}/ is recommended.
|
|
76
|
+
Emit compiled stylesheets to #{recommended_location}/? (Y/n) }
|
|
77
|
+
answer = gets.downcase[0]
|
|
78
|
+
answer == ?n ? default_location : recommended_location
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
def config_contents
|
|
82
|
+
Compass.configuration.serialize do |prop, value|
|
|
83
|
+
if prop == :project_path
|
|
84
|
+
"project_path = RAILS_ROOT if defined?(RAILS_ROOT)\n"
|
|
85
|
+
elsif prop == :output_style
|
|
86
|
+
""
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
def initializer_contents
|
|
92
|
+
%Q{require 'compass'
|
|
93
|
+
# If you have any compass plugins, require them here.
|
|
94
|
+
Compass.configuration.parse(File.join(RAILS_ROOT, "config", "compass.config"))
|
|
95
|
+
Compass.configuration.environment = RAILS_ENV.to_sym
|
|
96
|
+
Compass.configure_sass_plugin!
|
|
97
|
+
}
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
def stylesheet_prefix
|
|
101
|
+
if css_dir.length >= 19
|
|
102
|
+
"#{css_dir[19..-1]}/"
|
|
103
|
+
else
|
|
104
|
+
nil
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
def stylesheet_links
|
|
109
|
+
html = "%head\n"
|
|
110
|
+
manifest.each_stylesheet do |stylesheet|
|
|
111
|
+
# Skip partials.
|
|
112
|
+
next if File.basename(stylesheet.from)[0..0] == "_"
|
|
113
|
+
ss_line = " = stylesheet_link_tag '#{stylesheet_prefix}#{stylesheet.to.sub(/\.sass$/,'.css')}'"
|
|
114
|
+
if stylesheet.options[:media]
|
|
115
|
+
ss_line += ", :media => '#{stylesheet.options[:media]}'"
|
|
116
|
+
end
|
|
117
|
+
if stylesheet.options[:condition]
|
|
118
|
+
ss_line = " /[if #{stylesheet.options[:condition]}]\n " + ss_line
|
|
119
|
+
end
|
|
120
|
+
html << ss_line + "\n"
|
|
121
|
+
end
|
|
122
|
+
html
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
unless defined?(Compass::RAILS_LOADED)
|
|
2
|
+
Compass::RAILS_LOADED = true
|
|
3
|
+
|
|
4
|
+
%w(action_controller sass_plugin urls).each do |lib|
|
|
5
|
+
require "compass/app_integration/rails/#{lib}"
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
# Wierd that this has to be re-included to pick up sub-modules. Ruby bug?
|
|
9
|
+
class Sass::Script::Functions::EvaluationContext
|
|
10
|
+
include Sass::Script::Functions
|
|
11
|
+
private
|
|
12
|
+
include ActionView::Helpers::AssetTagHelper
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# =================================================================
|
|
2
|
+
# Compass Ruby on Rails Installer (template) v.1.0
|
|
3
|
+
# written by Derek Perez (derek@derekperez.com)
|
|
4
|
+
# -----------------------------------------------------------------
|
|
5
|
+
# NOTE: This installer is designed to work as a Rails template,
|
|
6
|
+
# and can only be used with Rails 2.3+.
|
|
7
|
+
# -----------------------------------------------------------------
|
|
8
|
+
# Copyright (c) 2009 Derek Perez
|
|
9
|
+
#
|
|
10
|
+
# Permission is hereby granted, free of charge, to any person
|
|
11
|
+
# obtaining a copy of this software and associated documentation
|
|
12
|
+
# files (the "Software"), to deal in the Software without
|
|
13
|
+
# restriction, including without limitation the rights to use,
|
|
14
|
+
# copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
+
# copies of the Software, and to permit persons to whom the
|
|
16
|
+
# Software is furnished to do so, subject to the following
|
|
17
|
+
# conditions:
|
|
18
|
+
#
|
|
19
|
+
# The above copyright notice and this permission notice shall be
|
|
20
|
+
# included in all copies or substantial portions of the Software.
|
|
21
|
+
#
|
|
22
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
23
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
24
|
+
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
25
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
26
|
+
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
27
|
+
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
28
|
+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
29
|
+
# OTHER DEALINGS IN THE SOFTWARE.
|
|
30
|
+
# =================================================================
|
|
31
|
+
puts "==================================================="
|
|
32
|
+
puts "Welcome to the Compass Installer for Ruby on Rails!"
|
|
33
|
+
puts "==================================================="
|
|
34
|
+
puts
|
|
35
|
+
|
|
36
|
+
# css framework prompt
|
|
37
|
+
css_framework = ask("What CSS Framework do you want to use with Compass? (default: 'blueprint')")
|
|
38
|
+
css_framework = "blueprint" if css_framework.blank?
|
|
39
|
+
|
|
40
|
+
# sass storage prompt
|
|
41
|
+
sass_dir = ask("Where would you like to keep your sass files within your project? (default: 'app/stylesheets')")
|
|
42
|
+
sass_dir = "app/stylesheets" if sass_dir.blank?
|
|
43
|
+
|
|
44
|
+
# compiled css storage prompt
|
|
45
|
+
css_dir = ask("Where would you like Compass to store your compiled css files? (default: 'public/stylesheets/compiled')")
|
|
46
|
+
css_dir = "public/stylesheets/compiled" if css_dir.blank?
|
|
47
|
+
|
|
48
|
+
# define dependencies
|
|
49
|
+
gem "haml", :lib => "haml", :version => ">=2.2.0"
|
|
50
|
+
gem "chriseppstein-compass", :source => "http://gems.github.com/", :lib => "compass"
|
|
51
|
+
|
|
52
|
+
# install and unpack
|
|
53
|
+
rake "gems:install GEM=haml", :sudo => true
|
|
54
|
+
rake "gems:install GEM=chriseppstein-compass", :sudo => true
|
|
55
|
+
rake "gems:unpack GEM=chriseppstein-compass"
|
|
56
|
+
|
|
57
|
+
# load any compass framework plugins
|
|
58
|
+
if css_framework =~ /960/
|
|
59
|
+
gem "chriseppstein-compass-960-plugin", :source => "http://gems.github.com", :lib => "ninesixty"
|
|
60
|
+
rake "gems:install GEM=chriseppstein-compass-960-plugin", :sudo => true
|
|
61
|
+
rake "gems:unpack GEM=chriseppstein-compass-960-plugin"
|
|
62
|
+
css_framework = "960" # rename for command
|
|
63
|
+
plugin_require = "-r ninesixty"
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# build out compass command
|
|
67
|
+
compass_command = "compass --rails -f #{css_framework} . --css-dir=#{css_dir} --sass-dir=#{sass_dir} "
|
|
68
|
+
compass_command << plugin_require if plugin_require
|
|
69
|
+
|
|
70
|
+
# Require compass during plugin loading
|
|
71
|
+
file 'vendor/plugins/compass/init.rb', <<-CODE
|
|
72
|
+
# This is here to make sure that the right version of sass gets loaded (haml 2.2) by the compass requires.
|
|
73
|
+
require 'compass'
|
|
74
|
+
CODE
|
|
75
|
+
|
|
76
|
+
# integrate it!
|
|
77
|
+
run "haml --rails ."
|
|
78
|
+
run compass_command
|
|
79
|
+
|
|
80
|
+
puts "Compass (with #{css_framework}) is all setup, have fun!"
|