Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Travis CI? #59

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
script:
- "test/travis.rb"
language: ruby
before_install:
- gem install sass
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# csswizardry-grids
# csswizardry-grids [![Build Status](https://travis-ci.org/csswizardry/csswizardry-grids.svg?branch=master)](https://travis-ci.org/csswizardry/csswizardry-grids)

**Simple, fluid, nestable, flexible, Sass-based, responsive grid system.**

Expand Down Expand Up @@ -90,15 +90,15 @@ If you are using traditional classes then an example, basic usage might look
like this:

<div class="grid">

<div class="grid__item lap--one-half desk--two-thirds">
...
</div><!--

--><div class="grid__item lap--one-half desk--one-third">
...
</div>

</div>

It’s as simple as that!
Expand Down Expand Up @@ -127,34 +127,34 @@ If you are using silent classes (`$use-silent-classes: true;`) then your HTML
might look like this:

<div class="page">

<div class="content">
...
</div><!--

--><div class="sub-content">
...
</div>

</div>

…and your Sass, something like this:

.page{
@extend %grid;
}

.content,
.sub-content{
@extend %grid__item;
@extend %one-whole;
@extend %lap--one-half;
}

.content{
@extend %desk--two-thirds;
}

.sub-content{
@extend %desk--one-third;
}
Expand Down
2 changes: 2 additions & 0 deletions test/silent.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
$use-silent-classes: true;
@import '../csswizardry-grids';
10 changes: 10 additions & 0 deletions test/travis.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env ruby

result = `sass csswizardry-grids.scss build.css`
raise result unless $?.to_i == 0
puts "Regular sass compiled successfully"

result = `sass test/silent.scss build.silent.css --style compressed`
raise result unless $?.to_i == 0
raise "When $use-silent-classes is set to true the module should not output any CSS" unless File.size('build.silent.css') == 0
puts "Silent sass compiled successfully"