diff --git a/Gruntfile.js b/Gruntfile.js index c480884..0c2818c 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -27,14 +27,13 @@ module.exports = function (grunt) { grunt.registerTask('build', [ 'clean:build', 'sass:build', - 'autoprefixer:build', + 'postcss:build', 'copy:build', 'assemble:build' ]); grunt.registerTask('useminTasks', [ 'useminPrepare', - 'cssmin:generated', 'uglify:generated', 'concat:generated', 'string-replace', @@ -46,7 +45,7 @@ module.exports = function (grunt) { 'clean:production', 'assemble:production', 'sass:production', - 'autoprefixer:production', + 'postcss:production', 'copy:production', 'useminTasks', 'htmlmin' @@ -58,7 +57,7 @@ module.exports = function (grunt) { 'watch' ]); - grunt.registerTask('prodserve', [ + grunt.registerTask('production-serve', [ 'production', 'connect:production' ]); diff --git a/bower.json b/bower.json index 47c59a7..bbcdea6 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "habanero-prototype-boilerplate", - "version": "2.0.0", + "version": "2.1.0", "homepage": "https://github.com/habaneroconsulting/habanero-prototype-boilerplate", "authors": [ "Christopher Parsons " diff --git a/grunt/concat.js b/grunt/concat.js index 46f1c4d..50dd6fe 100644 --- a/grunt/concat.js +++ b/grunt/concat.js @@ -1,7 +1,8 @@ -'use strict'; - -module.exports = { - options: { - separator: '\n\n' - } -}; +'use strict'; + +module.exports = { + options: { + separator: '\n\n', + sourceMap: true + } +}; diff --git a/grunt/htmlmin.js b/grunt/htmlmin.js index 4175f29..7a06a0d 100644 --- a/grunt/htmlmin.js +++ b/grunt/htmlmin.js @@ -3,7 +3,7 @@ module.exports = { production: { options: { - minifyCSS: true, + minifyCSS: false, minifyJS: true, removeComments: true, collapseWhitespace: true diff --git a/grunt/autoprefixer.js b/grunt/postcss.js similarity index 50% rename from grunt/autoprefixer.js rename to grunt/postcss.js index 04b91b2..fd758aa 100644 --- a/grunt/autoprefixer.js +++ b/grunt/postcss.js @@ -1,10 +1,14 @@ 'use strict'; module.exports = { - options: { - map: true - }, build: { + options: { + map: true, + processors: [ + require('pixrem')(), + require('autoprefixer')({ browsers: '> 1%' }) + ] + }, files: [ { expand: true, @@ -19,15 +23,22 @@ module.exports = { ] }, production: { + options: { + processors: [ + require('pixrem')(), + require('autoprefixer')({ browsers: '> 1%' }), + require('cssnano')() + ] + }, files: [ { expand: true, - cwd: '.tmp/less/styles/', + cwd: '.tmp/scss/styles/', src: [ '**/*.css', '!vendor/**/*.css' ], - dest: '.tmp/less/styles/', + dest: '.tmp/scss/styles/', ext: '.css' } ] diff --git a/grunt/sass.js b/grunt/sass.js index a57f7d3..be3c153 100644 --- a/grunt/sass.js +++ b/grunt/sass.js @@ -2,6 +2,11 @@ module.exports = { build: { + options: { + outputStyle: 'expanded', + sourceMap: true, + sourceMapEmbed: true + }, files: [ { expand: true, diff --git a/grunt/useminPrepare.js b/grunt/useminPrepare.js index 51b574b..5475987 100644 --- a/grunt/useminPrepare.js +++ b/grunt/useminPrepare.js @@ -7,7 +7,7 @@ module.exports = { html: { steps: { js: ['uglifyjs', 'concat'], - css: ['cssmin', 'concat'] + css: ['concat'] }, post: {} } diff --git a/package.json b/package.json index b6a3346..c7be2c9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "habanero-prototype-boilerplate", - "version": "2.0.0", + "version": "2.1.0", "author": "Habanero Consulting Group", "contributors": [ { @@ -22,9 +22,10 @@ }, "devDependencies": { "assemble": "^0.4.42", + "autoprefixer": "^6.0.3", "bower-installer": "^1.2.0", + "cssnano": "^3.3.2", "grunt": "^0.4.5", - "grunt-autoprefixer": "^3.0.3", "grunt-cli": "^0.1.13", "grunt-contrib-clean": "~0.6", "grunt-contrib-concat": "~0.5", @@ -32,22 +33,21 @@ "grunt-contrib-copy": "~0.8", "grunt-contrib-cssmin": "~0.14", "grunt-contrib-htmlmin": "^0.6.0", - "grunt-contrib-jshint": "~0.11.2", + "grunt-contrib-jshint": "~0.11.3", "grunt-contrib-uglify": "~0.10", "grunt-contrib-watch": "~0.6", - "grunt-csscomb": "^3.1.0", "grunt-filerev": "^2.3.1", "grunt-gh-pages": "^1.0.0", "grunt-jscs": "~2.3.0", "grunt-newer": "~1.1", "grunt-open": "~0.2", + "grunt-postcss": "^0.7.0", + "grunt-sass": "^1.1.0", "grunt-string-replace": "^1.2.0", "grunt-usemin": "~3.1", - "habanero-code-style": "^0.2.1", + "habanero-code-style": "^0.2.2", "load-grunt-config": "^0.19.0", - "load-grunt-tasks": "^3.2.0" - }, - "dependencies": { - "grunt-sass": "^1.0.0" + "load-grunt-tasks": "^3.3.0", + "pixrem": "^3.0.0" } } diff --git a/source/styles/reference/_reference.scss b/source/styles/reference/_reference.scss index bb8f8c1..987f0e2 100644 --- a/source/styles/reference/_reference.scss +++ b/source/styles/reference/_reference.scss @@ -14,7 +14,6 @@ @import "mixins/animations"; @import "mixins/arrows"; @import "mixins/color-states"; -@import "mixins/fonts"; @import "mixins/helpers"; @import "mixins/images"; @import "mixins/media-queries"; diff --git a/source/styles/reference/mixins/_fonts.scss b/source/styles/reference/mixins/_fonts.scss deleted file mode 100644 index 10782a0..0000000 --- a/source/styles/reference/mixins/_fonts.scss +++ /dev/null @@ -1,13 +0,0 @@ -/*! refernece/mixins/_fonts.scss */ - -@mixin font-face($family, $filename, $style, $weight) { - @font-face { - src: url('../fonts/#{$filename}.eot'); - src: url('../fonts/#{$filename}.eot?#iefix') format('embedded-opentype'), - url('../fonts/#{$filename}.woff') format('woff'); - - font-family: '#{$family}'; - font-style: $style; - font-weight: $weight; - } -} diff --git a/source/styles/reference/mixins/_typography.scss b/source/styles/reference/mixins/_typography.scss index ea61de0..e7c8788 100644 --- a/source/styles/reference/mixins/_typography.scss +++ b/source/styles/reference/mixins/_typography.scss @@ -1,5 +1,18 @@ /*! reference/mixins/_typography.scss */ +@mixin font-face($family, $filename, $style, $weight) { + @font-face { + src: url('../fonts/#{$filename}.eot'); + src: url('../fonts/#{$filename}.eot?#iefix') format('embedded-opentype'), + url('../fonts/#{$filename}.woff') format('woff'); + + font-family: '#{$family}'; + font-style: $style; + font-weight: $weight; + } +} + + @mixin font-size($pixels) { font-size: $pixels; font-size: $pixels / $font-size-base * 1rem;