Skip to content
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
2 changes: 2 additions & 0 deletions TODO.taskpaper
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ General tasks:
- Main CSS file.
- That’s about all I have control over! @done(2016-07-09)
- Figure out a workflow for getting from a source image (in Sketch?) to optimised assets for the web site.
- Remove unused CSS to slim down the site a bit.
Doing something like this: https://hellojason.net/blog/remove-unused-css-from-middleman-before-deploying/ in an `after_build` step might work.

Port articles across from Medium:
- Mental Wellbeing App Survey: https://blog.woss.name/mental-wellbeing-app-survey-54fd3f572e86#.l246uyxgn
Expand Down
6 changes: 6 additions & 0 deletions gulpfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ less = require 'gulp-less'
autoprefixer = require 'gulp-autoprefixer'
sourcemaps = require 'gulp-sourcemaps'
minifyCSS = require 'gulp-minify-css'
uncss = require 'gulp-uncss'
uglify = require 'gulp-uglify'
rollbar = require 'gulp-rollbar'

Expand Down Expand Up @@ -110,3 +111,8 @@ gulp.task 'watch', ->
gulp.watch [ paths.less ].concat(watchedLessPaths), [ 'build:stylesheets:development' ]
gulp.watch paths.javascripts, [ 'build:javascripts:development' ]
gulp.watch paths.fonts, [ 'build:fonts' ]

gulp.task 'uncss', ->
gulp.src(path.join(paths.dist.stylesheets, '**', '*.css'))
.pipe(uncss(html: path.join('build', '**', '*.html')))
.pipe(gulp.dest(paths.dist.stylesheets))
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,8 @@
},
"engines": {
"node": "^6.2.1"
},
"dependencies": {
"gulp-uncss": "^1.0.5"
}
}