1
0
Fork 0
mirror of https://github.com/middleman/middleman.git synced 2022-11-09 12:20:27 -05:00

move compass ext out of the main repo

This commit is contained in:
Thomas Reynolds 2014-06-11 09:25:59 -07:00
parent 4b5c6738e5
commit 7840ebf98a
26 changed files with 1 additions and 369 deletions

View file

@ -37,6 +37,6 @@ gem 'rubocop', require: false
# Middleman itself
gem 'middleman-core', path: 'middleman-core'
gem 'middleman-cli', path: 'middleman-cli'
gem 'middleman-compass', path: 'middleman-compass', require: false
gem 'middleman-compass', github: 'middleman/middleman-compass', require: false
gem 'middleman-sprockets', github: 'middleman/middleman-sprockets', require: false
gem 'middleman', path: 'middleman'

View file

@ -1,10 +0,0 @@
.DS_Store
Gemfile.lock
Gemfile-v4.lock
tmp
.rbenv-*
.sass-cache
pkg
build
.ruby-version
.cache

View file

@ -1,16 +0,0 @@
rvm:
- 1.9.3
- 2.0.0
- 2.1.1
- jruby-19mode
gemfile:
- Gemfile
- Gemfile-v4
script: "bundle exec rake test"
env: TEST=true
matrix:
fast_finish: true

View file

@ -1,43 +0,0 @@
# Contributing
In the spirit of [free software][free-sw], **everyone** is encouraged to help
improve this project.
[free-sw]: http://www.fsf.org/licensing/essays/free-sw.html
Here are some ways *you* can contribute:
* by using alpha, beta, and prerelease versions
* by reporting bugs
* by suggesting new features
* by writing or editing documentation
* by writing specifications
* by writing code ( **no patch is too small** : fix typos, add comments, clean up inconsistent whitespace )
* by refactoring code
* by closing [issues][]
* by reviewing patches
[issues]: https://github.com/middleman/middleman-compass/issues
## Submitting an Issue
We use the [GitHub issue tracker][issues] to track bugs and features. Before
submitting a bug report or feature request, check to make sure it hasn't
already been submitted. When submitting a bug report, please include a [Gist][]
that includes a stack trace and any details that may be necessary to reproduce
the bug, including your gem version, Ruby version, and operating system.
Ideally, a bug report should include a pull request with failing specs.
[gist]: https://gist.github.com/
## Submitting a Pull Request
1. [Fork the repository.][fork]
2. [Create a topic branch.][branch]
3. Add specs for your unimplemented feature or bug fix.
4. Run `bundle exec rake test`. If your specs pass, return to step 3.
5. Implement your feature or bug fix.
6. Run `bundle exec rake test`. If your specs fail, return to step 5.
7. Add, commit, and push your changes.
8. [Submit a pull request.][pr]
[fork]: http://help.github.com/fork-a-repo/
[branch]: http://learn.github.com/p/branching.html
[pr]: http://help.github.com/send-pull-requests/

View file

@ -1,17 +0,0 @@
source "https://rubygems.org"
gem "middleman-cli", :github => "middleman/middleman", :branch => "master"
gem "middleman-core", :github => "middleman/middleman", :branch => "master"
# Specify your gem's dependencies in middleman-sprockets.gemspec
gemspec
gem "rake", "~> 10.0.3", :require => false
gem "yard", "~> 0.8.0", :require => false
# Test tools
gem "cucumber"
gem "fivemat", "~> 1.2.1"
gem "aruba"
gem "rspec", "~> 2.14"
gem "builder", "~> 3.0"

View file

@ -1,20 +0,0 @@
Copyright (c) 2012-2013 Thomas Reynolds
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View file

@ -1,59 +0,0 @@
# Middleman-compass
`middleman-compass` is an extension for the [Middleman] static site generator that allows support for [Compass](http://compass-style.org) in your assets.
## Installation
If you're just getting started, install the `middleman` gem and generate a new project:
```
gem install middleman
middleman init MY_PROJECT
```
If you already have a Middleman project: Add `gem "middleman-compass"` to your `Gemfile` and run `bundle install`
## Configuration
```
activate :compass
```
## Build & Dependency Status
[![Gem Version](https://badge.fury.io/rb/middleman-compass.png)][gem]
[![Build Status](https://travis-ci.org/middleman/middleman-compass.png)][travis]
[![Dependency Status](https://gemnasium.com/middleman/middleman-compass.png?travis)][gemnasium]
[![Code Quality](https://codeclimate.com/github/middleman/middleman-compass.png)][codeclimate]
## Community
The official community forum is available at: http://forum.middlemanapp.com
## Bug Reports
Github Issues are used for managing bug reports and feature requests. If you run into issues, please search the issues and submit new problems: https://github.com/middleman/middleman-compass/issues
The best way to get quick responses to your issues and swift fixes to your bugs is to submit detailed bug reports, include test cases and respond to developer questions in a timely manner. Even better, if you know Ruby, you can submit [Pull Requests](https://help.github.com/articles/using-pull-requests) containing Cucumber Features which describe how your feature should work or exploit the bug you are submitting.
## How to Run Cucumber Tests
1. Checkout Repository: `git clone https://github.com/middleman/middleman-compass.git`
2. Install Bundler: `gem install bundler`
3. Run `bundle install` inside the project root to install the gem dependencies.
4. Run test cases: `bundle exec rake test`
## Donate
[Click here to lend your support to Middleman](https://spacebox.io/s/4dXbHBorC3)
## License
Copyright (c) 2012-2013 Thomas Reynolds. MIT Licensed, see [LICENSE] for details.
[middleman]: http://middlemanapp.com
[gem]: https://rubygems.org/gems/middleman-compass
[travis]: http://travis-ci.org/middleman/middleman-compass
[gemnasium]: https://gemnasium.com/middleman/middleman-compass
[codeclimate]: https://codeclimate.com/github/middleman/middleman-compass
[LICENSE]: https://github.com/middleman/middleman-compass/blob/master/LICENSE.md

View file

@ -1,20 +0,0 @@
require 'bundler'
Bundler::GemHelper.install_tasks
require 'cucumber/rake/task'
require 'middleman-core/version'
Cucumber::Rake::Task.new(:cucumber, 'Run features that should pass') do |t|
exempt_tags = ["--tags ~@wip"]
t.cucumber_opts = "--color #{exempt_tags.join(" ")} --strict --format #{ENV['CUCUMBER_FORMAT'] || 'Fivemat'}"
end
require 'rake/clean'
task :test => [:cucumber]
desc "Build HTML documentation"
task :doc do
sh 'bundle exec yard'
end

View file

@ -1,6 +0,0 @@
Feature: Compass sprites should be generated on build and copied
Scenario: Building a clean site with sprites
Given a successfully built app at "compass-sprites-app"
When I cd to "build"
Then the following files should exist:
| images/icon-s0de2218f58.png |

View file

@ -1,15 +0,0 @@
Feature: Web Fonts
Scenario: Checking built folder for content
Given a successfully built app at "fonts-app"
When I cd to "build"
Then the following files should exist:
| stylesheets/fonts.css |
And the file "stylesheets/fonts.css" should contain "/fonts/StMarie-Thin.otf"
And the file "stylesheets/fonts.css" should contain "/fonts/blank/blank.otf"
Scenario: Rendering scss
Given the Server is running at "fonts-app"
When I go to "/stylesheets/fonts.css"
Then I should see "/fonts/StMarie-Thin.otf"
And I should see "/fonts/blank/blank.otf"

View file

@ -1,7 +0,0 @@
PROJECT_ROOT_PATH = File.dirname(File.dirname(File.dirname(__FILE__)))
ENV['TEST'] = 'true'
require "middleman-core"
require "middleman-core/step_definitions"
require File.join(PROJECT_ROOT_PATH, 'lib', 'middleman-compass')
require "erubis"

View file

@ -1,2 +0,0 @@
require 'middleman-compass'
activate :compass

Binary file not shown.

Before

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 345 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 349 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 372 B

View file

@ -1,3 +0,0 @@
@import "compass";
@import "icon/*.png";
@include all-icon-sprites;

View file

@ -1,5 +0,0 @@
@import "compass/css3/font-face"
+font-face("St Marie", font-files("StMarie-Thin.otf", opentype))
+font-face("St Marie", font-files("blank/blank.otf", opentype))

View file

@ -1,6 +0,0 @@
require "middleman-core"
Middleman::Extensions.register :compass, auto_activate: :before_configuration do
require "middleman-compass/extension"
Middleman::CompassExtension
end

View file

@ -1,64 +0,0 @@
module Middleman
class CompassExtension < Extension
def initialize(app, options_hash={}, &block)
require 'middleman-core/renderers/sass'
require 'compass'
super
# Hooks to manually update the compass config after we're
# done with it
app.define_hook :compass_config
end
def after_configuration
::Compass.configuration do |compass|
compass.project_path = app.source_dir
compass.environment = :development
compass.cache = false
compass.sass_dir = app.config[:css_dir]
compass.css_dir = app.config[:css_dir]
compass.javascripts_dir = app.config[:js_dir]
compass.fonts_dir = app.config[:fonts_dir]
compass.images_dir = app.config[:images_dir]
compass.http_path = app.config[:http_prefix]
# Disable this initially, the cache_buster extension will
# re-enable it if requested.
compass.asset_cache_buster { |_| nil }
# Disable this initially, the relative_assets extension will
compass.relative_assets = false
# Default output style
compass.output_style = :nested
end
# Call hook
app.run_hook_for :compass_config, app, ::Compass.configuration
# Tell Tilt to use it as well (for inline sass blocks)
::Tilt.register 'sass', CompassSassTemplate
::Tilt.prefer(CompassSassTemplate)
# Tell Tilt to use it as well (for inline scss blocks)
::Tilt.register 'scss', CompassScssTemplate
::Tilt.prefer(CompassScssTemplate)
end
# A Compass Sass template for Tilt, adding our options in
class CompassSassTemplate < ::Middleman::Renderers::Sass::SassPlusCSSFilenameTemplate
def sass_options
super.merge(::Compass.configuration.to_sass_engine_options)
end
end
# A Compass Scss template for Tilt, adding our options in
class CompassScssTemplate < ::Middleman::Renderers::Sass::ScssPlusCSSFilenameTemplate
def sass_options
super.merge(::Compass.configuration.to_sass_engine_options)
end
end
end
end

View file

@ -1,5 +0,0 @@
module Middleman
module Compass
VERSION = "4.0.0"
end
end

View file

@ -1,20 +0,0 @@
# -*- encoding: utf-8 -*-
$:.push File.expand_path("../lib", __FILE__)
require "middleman-compass/version"
Gem::Specification.new do |s|
s.name = "middleman-compass"
s.version = Middleman::Compass::VERSION
s.platform = Gem::Platform::RUBY
s.authors = ['Thomas Reynolds', 'Ben Hollis', 'Karl Freeman']
s.email = ['me@tdreyno.com', 'ben@benhollis.net', 'karlfreeman@gmail.com']
s.homepage = "https://github.com/middleman/middleman-compass"
s.summary = %q{Compass support for Middleman}
s.description = %q{Compass support for Middleman}
s.license = "MIT"
s.files = `git ls-files -z`.split("\0")
s.test_files = `git ls-files -z -- {fixtures,features}/*`.split("\0")
s.require_paths = ["lib"]
s.add_dependency("middleman-core")#, [">= 4.0.0"])
s.add_dependency('compass', ['>= 1.0.0.alpha.19'])
end

View file

@ -19,53 +19,3 @@ Feature: Support slim templating language
And the Server is running at "empty_app"
When I go to "/slim.html"
Then I should see "<h1>Welcome to Slim</h1>"
Scenario: Rendering Scss in a Slim filter
Given an empty app
And a file named "config.rb" with:
"""
require 'middleman-compass'
activate :compass
"""
And a file named "source/scss.html.slim" with:
"""
doctype 5
html lang='en'
head
meta charset="utf-8"
scss:
@import "compass";
@include global-reset;
body
h1 Welcome to Slim
"""
And a file named "source/sass.html.slim" with:
"""
doctype 5
html lang='en'
head
meta charset="utf-8"
sass:
@import "compass"
+global-reset
body
h1 Welcome to Slim
"""
And a file named "source/error.html.slim" with:
"""
doctype 5
html lang='en'
head
meta charset="utf-8"
scss:
+global-reset
body
h1 Welcome to Slim
"""
And the Server is running at "empty_app"
When I go to "/scss.html"
Then I should see "html, body, div"
When I go to "/sass.html"
Then I should see "html, body, div"
When I go to "/error.html"
Then I should see "Syntax error"