Adding initial compass integration

This commit is contained in:
Jeff Avallone 2014-11-23 16:16:10 -05:00
parent 3dacc41880
commit fcdc3f8ecd
13 changed files with 58 additions and 3 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
node_modules node_modules
.sass-cache
build build

1
.ruby-gemset Normal file
View File

@ -0,0 +1 @@
regexper

1
.ruby-version Normal file
View File

@ -0,0 +1 @@
2.1.5

3
Gemfile Normal file
View File

@ -0,0 +1,3 @@
source 'https://rubygems.org'
gem 'compass'

28
Gemfile.lock Normal file
View File

@ -0,0 +1,28 @@
GEM
remote: https://rubygems.org/
specs:
chunky_png (1.3.3)
compass (1.0.1)
chunky_png (~> 1.2)
compass-core (~> 1.0.1)
compass-import-once (~> 1.0.5)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
sass (>= 3.3.13, < 3.5)
compass-core (1.0.1)
multi_json (~> 1.0)
sass (>= 3.3.0, < 3.5)
compass-import-once (1.0.5)
sass (>= 3.2, < 3.5)
ffi (1.9.6)
multi_json (1.10.1)
rb-fsevent (0.9.4)
rb-inotify (0.9.5)
ffi (>= 0.5.0)
sass (3.4.8)
PLATFORMS
ruby
DEPENDENCIES
compass

View File

@ -1,13 +1,15 @@
var gulp = require('gulp'), var gulp = require('gulp'),
wrap = require('gulp-wrap'), wrap = require('gulp-wrap'),
connect = require('gulp-connect'), connect = require('gulp-connect'),
watch = require('gulp-watch'); watch = require('gulp-watch'),
compass = require('gulp-compass');
gulp.task('default', ['server'], function() { gulp.task('default', ['server'], function() {
gulp.watch('./src/**/*.html', ['markup']); gulp.watch('./src/**/*.html', ['markup']);
gulp.watch('./src/**/*.scss', ['compass']);
}); });
gulp.task('server', ['markup'], function() { gulp.task('server', ['markup', 'compass'], function() {
watch('./build/**/*', { name: 'Server' }) watch('./build/**/*', { name: 'Server' })
.pipe(connect.reload()); .pipe(connect.reload());
return connect.server({ return connect.server({
@ -19,5 +21,17 @@ gulp.task('server', ['markup'], function() {
gulp.task('markup', function() { gulp.task('markup', function() {
return gulp.src('./src/**/*.html') return gulp.src('./src/**/*.html')
.pipe(wrap({ src: './template.html' })) .pipe(wrap({ src: './template.html' }))
.pipe(gulp.dest('./build')) .pipe(gulp.dest('./build'));
});
gulp.task('compass', function() {
return gulp.src('./src/**/*.scss')
.pipe(compass({
project: __dirname,
sass: './src/sass',
css: './build/css',
javascript: './build/js',
font: './build/font',
sourcemap: true
}));
}); });

View File

@ -11,6 +11,7 @@
"private": true, "private": true,
"devDependencies": { "devDependencies": {
"gulp": "^3.8.10", "gulp": "^3.8.10",
"gulp-compass": "^2.0.3",
"gulp-connect": "^2.2.0", "gulp-connect": "^2.2.0",
"gulp-watch": "^2.0.0", "gulp-watch": "^2.0.0",
"gulp-wrap": "^0.5.0" "gulp-wrap": "^0.5.0"

0
src/css/.keep Normal file
View File

0
src/font/.keep Normal file
View File

0
src/js/.keep Normal file
View File

0
src/sass/.keep Normal file
View File

5
src/sass/main.scss Normal file
View File

@ -0,0 +1,5 @@
body {
h1 {
background: #bada55;
}
}

View File

@ -2,6 +2,7 @@
<html> <html>
<head> <head>
<title>Demo</title> <title>Demo</title>
<link rel="stylesheet" href="/css/main.css" />
</head> </head>
<body> <body>
${ contents } ${ contents }