Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grunt Added #35

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,5 @@ temp/
.Trashes

.svn

/node_modules
87 changes: 87 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
module.exports = function(grunt) {

// 1. All configuration goes here
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),

concat: {
dist: {
src: [
'library/js/libs/*.js', // All JS in the libs folder
'library/js/fitvid.js', // This specific file
'library/js/FitVids.js-master/jquery.fitvids.js', // This specific file
'library/js/scripts.js' // This specific file
],
dest: 'library/js/prod.js',
}
},

uglify: {
build: {
src: 'library/js/prod.js',
dest: 'library/js/prod.min.js'
}
},

//imagemin is not stable, it will break your images
// imagemin: {
// dynamic: {
// files: [{
// expand: true,
// cwd: 'library/images/',
// src: ['**/*.{png,jpg,gif}'],
// dest: 'library/images/'
// }]
// }
// },

watch: {
scripts: {
files: [
'library/js/libs/*.js', // All JS in the libs folder
'library/js/fitvid.js', // This specific file
'library/js/FitVids.js-master/jquery.fitvids.js', // This specific file
'library/js/scripts.js' // This specific file
],
tasks: ['concat', 'uglify'],
options: {
spawn: false,
},
},
css: {
files: [
'library/less/*.less',
'library/less/**/*.less'
],
tasks: ['less'],
options: {
spawn: false,
}
}
},

less: {
dist: {
options: {
style: 'compressed'
},
files: {
'library/css/style.css': 'library/less/style.less',
'library/css/font-awesome/css/font-awesome.css': 'library/less/font-awesome/less/font-awesome.less',
'library/admin/ReduxCore/assets/css/admin.css': 'library/admin/ReduxCore/assets/css/admin.less'
}
}
}

});

// 3. Where we tell Grunt we plan to use this plug-in.
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
// grunt.loadNpmTasks('grunt-contrib-imagemin');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-less');

// 4. Where we tell Grunt what to do when we type "grunt" into the terminal.
grunt.registerTask('default', ['concat', 'uglify', 'less']);
};
20 changes: 0 additions & 20 deletions comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,6 @@

<?php // You can start editing here. ?>

<div id="single-post-nav">
<ul class="pager">

<?php $trunc_limit = 30; ?>

<?php if( '' != get_previous_post() ) { ?>
<li class="previous">
<?php previous_post_link( '<span class="previous-page">%link</span>', __( '<i class="fa fa-caret-left"></i>', 'bones' ) . '&nbsp;' . brew_truncate_text( get_previous_post()->post_title, $trunc_limit ) ); ?>
</li>
<?php } // end if ?>

<?php if( '' != get_next_post() ) { ?>
<li class="next">
<?php next_post_link( '<span class="no-previous-page-link next-page">%link</span>', '&nbsp;' . brew_truncate_text( get_next_post()->post_title, $trunc_limit ) . '&nbsp;' . __( '<i class="fa fa-caret-right"></i>', 'bones' ) ); ?>
</li>
<?php } // end if ?>

</ul>
</div><!-- /#single-post-nav -->

<?php if ( have_comments() ) : ?>

<div id="comments" class="havecomments">
Expand Down
Loading