Skip to content

Commit

Permalink
2.3.40
Browse files Browse the repository at this point in the history
  • Loading branch information
cdukes committed Sep 7, 2016
1 parent 6787085 commit 6587c2c
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 134 deletions.
73 changes: 12 additions & 61 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,22 @@ module.exports = function(grunt) {
options: {
syntax: require('postcss-scss'),
processors: [
require('stylelint')({
configFile: 'sass/.stylelintrc'
}),
require('postcss-reporter')({
clearMessages: true
})
require('postcss-flexbugs-fixes')
]
},
src: 'sass/**/*.scss'
},
css: {
options: {
processors: [
require('postcss-color-rgba-fallback')()
require('postcss-import'),
require('postcss-color-rgba-fallback'),
require('postcss-easings'),
require('postcss-focus'),
require('autoprefixer')({
cascade: true,
flexbox: false
}),
]
},
src: 'build/**/*.css'
Expand All @@ -49,7 +51,6 @@ module.exports = function(grunt) {

sass: {
options: {
compass: true,
style: 'expanded',
precision: 3,
sourcemap: 'none'
Expand All @@ -62,32 +63,6 @@ module.exports = function(grunt) {
}
},

csslint: {
build: {
options: {
csslintrc: 'sass/.csslintrc'
},
src: [
'build/css/style.css',
'build/css/admin.css'
]
}
},

grunticon: {
options: {
compressPNG: true
},
build: {
files: [{
expand: true,
cwd: 'svgs/',
src: ['*.svg', '*.png'],
dest: 'build/svgs/'
}]
}
},

jshint: {
options: {
strict: true,
Expand All @@ -108,7 +83,6 @@ module.exports = function(grunt) {
'bower_components/include-media-export/include-media.js',
'bower_components/js-cookie/src/js.cookie.js',
'bower_components/vanilla-fitvids/dist/fitvids.js',
'build/svgs/grunticon.loader.js',
'js/scripts.js'
],
dest: 'build/js/scripts.js',
Expand Down Expand Up @@ -145,18 +119,6 @@ module.exports = function(grunt) {
}
},

autoprefixer: {
options: {
cascade: true
},
build: {
files: {
'build/css/style.css': ['build/css/style.css'],
'build/css/admin.css': ['build/css/admin.css']
}
}
},

csso: {
options: {
report: 'min'
Expand Down Expand Up @@ -194,7 +156,7 @@ module.exports = function(grunt) {

css: {
files: ['sass/**/*.scss'],
tasks: ['sass', 'autoprefixer'],
tasks: ['sass', 'postcss:css'],
options: {
spawn: false
}
Expand All @@ -206,37 +168,26 @@ module.exports = function(grunt) {
options: {
spawn: false
}
},

svgs: {
files: ['svgs/**/*'],
tasks: ['newer:grunticon'],
options: {
spawn: false
}
}
}

});

grunt.loadNpmTasks('grunt-autoprefixer');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-csslint');
grunt.loadNpmTasks('grunt-contrib-imagemin');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-csscomb');
grunt.loadNpmTasks('grunt-csso');
grunt.loadNpmTasks('grunt-grunticon');
grunt.loadNpmTasks('grunt-newer');
grunt.loadNpmTasks('grunt-notify');
grunt.loadNpmTasks('grunt-postcss');

grunt.registerTask('default', ['clean', 'sass', 'grunticon', 'concat', 'copy', 'imagemin', 'autoprefixer', 'watch']);
grunt.registerTask('build', ['clean', 'csscomb', 'postcss:scss', 'sass', 'grunticon', 'jshint', 'concat', 'uglify', 'copy', 'imagemin', 'autoprefixer', 'postcss:css', 'csso']);
grunt.registerTask('default', ['clean', 'sass', 'concat', 'copy', 'imagemin', 'watch']);
grunt.registerTask('build', ['clean', 'csscomb', 'postcss:scss', 'sass', 'jshint', 'concat', 'uglify', 'copy', 'imagemin', 'postcss:css', 'csso']);

};
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,13 @@ grunt
- Disable some or all of the default Genesis theme option meta boxes (template, some disabled by default)

## Changelog
### 2.3.40 (September 7, 2016)
- Add PostCSS modules: `postcss-flexbugs-fixes`, `postcss-import`, `postcss-easings`
- Remove Grunt modules: `csslint`, `grunticon`, `stylelint`
- Switch to PostCSS's `autoprefixer`, since `grunt-autoprefixer` is deprecated
- Turn off `flexbox` for `autoprefixer` by default
- Use `normalize.css` instead of `normalize.scss`

### 2.3.39 (August 20, 2016)
- Add SCSS to hide the WP admin bar on mobile (disabled by default)
- Allow `favicon.ico` to be loaded from the `images` folder
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"include-media": "*",
"jquery": "*",
"js-cookie": "js-cookie/js-cookie",
"normalize-scss": "*",
"normalize-css": "necolas/normalize.css",
"vanilla-fitvids": "rosszurowski/vanilla-fitvids"
}
}
9 changes: 0 additions & 9 deletions includes/structure/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,6 @@ function bfg_load_assets() {
// Main script file (in footer)
$src = $use_production_assets ? '/build/js/scripts.min.js' : '/build/js/scripts.js';
wp_enqueue_script( 'bfg', $stylesheet_dir . $src, array('jquery'), $assets_version, true );
wp_localize_script(
'bfg',
'grunticon_paths',
array(
'svg' => $stylesheet_dir . '/build/svgs/icons.data.svg.css',
'png' => $stylesheet_dir . '/build/svgs/icons.data.png.css',
'fallback' => $stylesheet_dir . '/build/svgs/icons.fallback.css',
)
);
// wp_localize_script( 'bfg', 'ajax_object', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) ) );

}
Expand Down
4 changes: 0 additions & 4 deletions js/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,4 @@
// Enable FitVids on the content area
fitvids('.content');

// Grunticon
if( typeof grunticon === 'function')
grunticon([grunticon_paths.svg, grunticon_paths.png, grunticon_paths.fallback]);

})( window.jQuery );
13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
{
"name": "genesis-bfg",
"devDependencies": {
"autoprefixer": "*",
"grunt": "*",
"grunt-autoprefixer": "*",
"grunt-contrib-clean": "*",
"grunt-contrib-concat": "*",
"grunt-contrib-copy": "*",
"grunt-contrib-csslint": "*",
"grunt-contrib-imagemin": "*",
"grunt-contrib-jshint": "*",
"grunt-contrib-uglify": "*",
"grunt-contrib-watch": "*",
"grunt-csscomb": "*",
"grunt-csso": "*",
"grunt-grunticon": "*",
"grunt-newer": "*",
"grunt-notify": "*",
"grunt-postcss": "*",
"grunt-sass": "*",
"postcss-color-rgba-fallback": "*",
"postcss-reporter": "*",
"postcss-scss": "*",
"stylelint": "*",
"stylelint-config-standard": "*"
"postcss-easings": "*",
"postcss-flexbugs-fixes": "*",
"postcss-focus": "*",
"postcss-import": "*",
"postcss-scss": "*"
}
}
33 changes: 0 additions & 33 deletions sass/.csslintrc

This file was deleted.

17 changes: 0 additions & 17 deletions sass/.stylelintrc

This file was deleted.

6 changes: 4 additions & 2 deletions sass/style.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// CSS Imports (relative to build/css)
@import '../../bower_components/normalize-css/normalize.css';

// Colors
@import '../bower_components/brand-colors/dist/latest/scss/brand-colors.latest.scss';
@import '../bower_components/colors-sass/sass/variables';
Expand All @@ -7,8 +10,7 @@
@import 'variables';
@import '../bower_components/include-media-export/dist/_include-media-export';

// Normalize, Clearfix, & Toolkit
@import '../bower_components/normalize-scss/normalize.scss';
// Clearfix & Toolkit
@import 'clearfix';
@import 'toolkit';
@import 'accessibility';
Expand Down

0 comments on commit 6587c2c

Please sign in to comment.