Skip to content

Commit

Permalink
PHPCBF for spacing.
Browse files Browse the repository at this point in the history
  • Loading branch information
boonebgorges committed Jun 11, 2020
1 parent a01392f commit 30f80e9
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 58 deletions.
112 changes: 57 additions & 55 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = function (grunt) {
require('jit-grunt')(grunt);
require( 'jit-grunt' )( grunt );

colorSchemes = {
blue: {
Expand Down Expand Up @@ -52,78 +52,80 @@ module.exports = function (grunt) {
}
};

var lessTasks = {}
var colorSchemePath = '';
var lessTasks = {}
var colorSchemePath = '';
var colorSchemeTasks = [];
for ( color in colorSchemes ) {
colorSchemePath = 'css/color-schemes/' + color + '.css';
toolbarColorSchemePath = 'css/color-schemes/toolbar-' + color + '.css';
lessTasks[ color ] = {
colorSchemePath = 'css/color-schemes/' + color + '.css';
toolbarColorSchemePath = 'css/color-schemes/toolbar-' + color + '.css';
lessTasks[ color ] = {
options: {
modifyVars: colorSchemes[ color ],
optimization: 2
},
files: {}
}
lessTasks[ color ].files[ colorSchemePath ] = 'style.less';
lessTasks[ color ].files[ colorSchemePath ] = 'style.less';
lessTasks[ color ].files[ toolbarColorSchemePath ] = 'less/openlab-toolbar.less';
colorSchemeTasks.push( 'less:' + color );
};

var timestamp = new Date().getTime();

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
separator: ';'
},
vendor: {
src: ['js/bootstrap.min.js',
'node_modules/jcarousellite/jcarousellite.js',
'js/easyaccordion.js',
'js/jquery.easing.1.3.js',
'js/jquery.mobile.customized.min.js',
'js/camera.mod.js',
'js/jQuery.succinct.mod.js',
'js/detect-zoom.js'],
dest: 'js/dist/vendor.js'
},
},
less: lessTasks,
watch: {
styles: {
files: ['*.less', 'less/*.less'], // which files to watch
tasks: ['less'],
options: {
nospawn: true
}
},
scripts: {
files: ['js/*.js'],
tasks: ['concat'],
options: {
nospawn: true
}
}
},
setPHPConstant: {
version: {
constant: 'OPENLAB_VERSION',
value: '<%= pkg.version %>-' + timestamp,
file: 'functions.php'
grunt.initConfig(
{
pkg: grunt.file.readJSON( 'package.json' ),
concat: {
options: {
separator: ';'
},
vendor: {
src: ['js/bootstrap.min.js',
'node_modules/jcarousellite/jcarousellite.js',
'js/easyaccordion.js',
'js/jquery.easing.1.3.js',
'js/jquery.mobile.customized.min.js',
'js/camera.mod.js',
'js/jQuery.succinct.mod.js',
'js/detect-zoom.js'],
dest: 'js/dist/vendor.js'
},
},
less: lessTasks,
watch: {
styles: {
files: ['*.less', 'less/*.less'], // which files to watch
tasks: ['less'],
options: {
nospawn: true
}
},
});
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-php-set-constant');
scripts: {
files: ['js/*.js'],
tasks: ['concat'],
options: {
nospawn: true
}
}
},
setPHPConstant: {
version: {
constant: 'OPENLAB_VERSION',
value: '<%= pkg.version %>-' + timestamp,
file: 'functions.php'
}
},
}
);
grunt.loadNpmTasks( 'grunt-contrib-less' );
grunt.loadNpmTasks( 'grunt-contrib-uglify' );
grunt.loadNpmTasks( 'grunt-contrib-concat' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-php-set-constant' );

var taskList = ['concat', 'watch', 'less', 'setPHPConstant'];
taskList = taskList.concat( colorSchemeTasks );
taskList = taskList.concat( colorSchemeTasks );

var defaultTasks = ['concat', 'less', 'setPHPConstant'];
grunt.registerTask('default', defaultTasks);
grunt.registerTask( 'default', defaultTasks );
};
6 changes: 3 additions & 3 deletions sidebar.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<aside id="sidebar" role="complementary">
<?php if ( is_active_sidebar('primary-widget-area') ) : ?>
<?php if ( is_active_sidebar( 'primary-widget-area' ) ) : ?>
<div id="primary" class="widget-area">
<ul class="xoxo sidebar-nav">
<?php dynamic_sidebar('primary-widget-area'); ?>
<?php dynamic_sidebar( 'primary-widget-area' ); ?>
</ul>
</div>
<?php endif; ?>
</aside>
</aside>

0 comments on commit 30f80e9

Please sign in to comment.