Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Commit

Permalink
Switched grunt-autoprefixer to grunt-postcss
Browse files Browse the repository at this point in the history
  • Loading branch information
cwparsons committed Nov 3, 2015
1 parent e9897a6 commit b0743d9
Show file tree
Hide file tree
Showing 11 changed files with 57 additions and 42 deletions.
7 changes: 3 additions & 4 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -46,7 +45,7 @@ module.exports = function (grunt) {
'clean:production',
'assemble:production',
'sass:production',
'autoprefixer:production',
'postcss:production',
'copy:production',
'useminTasks',
'htmlmin'
Expand All @@ -58,7 +57,7 @@ module.exports = function (grunt) {
'watch'
]);

grunt.registerTask('prodserve', [
grunt.registerTask('production-serve', [
'production',
'connect:production'
]);
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -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 <cparsons@habaneroconsulting.com>"
Expand Down
15 changes: 8 additions & 7 deletions grunt/concat.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
'use strict';

module.exports = {
options: {
separator: '\n\n'
}
};
'use strict';

module.exports = {
options: {
separator: '\n\n',
sourceMap: true
}
};
2 changes: 1 addition & 1 deletion grunt/htmlmin.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module.exports = {
production: {
options: {
minifyCSS: true,
minifyCSS: false,
minifyJS: true,
removeComments: true,
collapseWhitespace: true
Expand Down
21 changes: 16 additions & 5 deletions grunt/autoprefixer.js → grunt/postcss.js
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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'
}
]
Expand Down
5 changes: 5 additions & 0 deletions grunt/sass.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

module.exports = {
build: {
options: {
outputStyle: 'expanded',
sourceMap: true,
sourceMapEmbed: true
},
files: [
{
expand: true,
Expand Down
2 changes: 1 addition & 1 deletion grunt/useminPrepare.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = {
html: {
steps: {
js: ['uglifyjs', 'concat'],
css: ['cssmin', 'concat']
css: ['concat']
},
post: {}
}
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "habanero-prototype-boilerplate",
"version": "2.0.0",
"version": "2.1.0",
"author": "Habanero Consulting Group",
"contributors": [
{
Expand All @@ -22,32 +22,32 @@
},
"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",
"grunt-contrib-connect": "~0.11",
"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"
}
}
1 change: 0 additions & 1 deletion source/styles/reference/_reference.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
13 changes: 0 additions & 13 deletions source/styles/reference/mixins/_fonts.scss

This file was deleted.

13 changes: 13 additions & 0 deletions source/styles/reference/mixins/_typography.scss
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit b0743d9

Please sign in to comment.