Skip to content

Commit

Permalink
Start conversion to SASS (finally)
Browse files Browse the repository at this point in the history
  • Loading branch information
leb2 committed Sep 5, 2015
1 parent b3e6601 commit dfd81ef
Show file tree
Hide file tree
Showing 7 changed files with 2,320 additions and 2,302 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1 +1,2 @@
node_modules
stylesheets
4 changes: 2 additions & 2 deletions README.md
@@ -1,8 +1,8 @@
# Slique #
A clean and soothing theme for Reddit. [View the demo](http://reddit.com/r/slique) for
A clean and soothing theme for Reddit. [View the demo](http://reddit.com/r/slique) for
markup required to style the sidebar.


### Installation ###
1. Click on slique.min.css and paste the code into your subreddit's stylesheet.
1. Click on SLIQUE.css and paste the code into your subreddit's stylesheet.
2. Upload the images in the images folder (but not the icons!) and hit save.
24 changes: 20 additions & 4 deletions gulpfile.js
Expand Up @@ -3,27 +3,43 @@ var autoprefixer = require('gulp-autoprefixer');
var minifyCss = require('gulp-minify-css');
var replace = require('gulp-replace');
var rename = require('gulp-rename');
var sass = require('gulp-sass');

gulp.task('build', function() {
return gulp.src('./slique.css')
// return gulp.src('./slique.css')
return gulp.src('./sass/*.scss')

/* Uncomment reddit resources, e.g. background: url(%%image%%); */
.pipe(replace(/\/\*(?:(?:.|\n)(?:(?!\*\/)))*?(.*%%.*;)(?:.|\n)*?\*\//g,'$1'))

/* Remove normal urls with external resources */
.pipe(replace(/\n.*?url\([\'\"]?[^%].*/g,''))

.pipe(sass())

.pipe(replace('@charset "UTF-8";',''))

.pipe(autoprefixer())

/* Remove not allowed webkit flex prefixes from autoprefixer */
.pipe(replace(/.*-webkit-box-(align|orient|ordinal|direction).*/g,''))

.pipe(minifyCss())

.pipe(rename(function(path) {
path.basename += '.min';
}))
.pipe(rename('./SLIQUE.css'))

.pipe(gulp.dest('./'));
});

gulp.task('sass', function() {
return gulp.src('./sass/*.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('./stylesheets/'));
});

gulp.task('watch', function() {
gulp.watch('./sass/*.scss', ['sass']);
});


gulp.task('default', ['build']);
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -13,6 +13,7 @@
"gulp-autoprefixer": "^2.3.1",
"gulp-minify-css": "^1.2.1",
"gulp-rename": "^1.2.2",
"gulp-replace": "^0.5.4"
"gulp-replace": "^0.5.4",
"gulp-sass": "^2.0.4"
}
}

0 comments on commit dfd81ef

Please sign in to comment.