Skip to content

Commit

Permalink
Merge pull request #27 from Alimir/develop
Browse files Browse the repository at this point in the history
v3.3
  • Loading branch information
Alimir authored May 28, 2018
2 parents c32328f + 5709d0b commit a743878
Show file tree
Hide file tree
Showing 53 changed files with 1,837 additions and 1,449 deletions.
45 changes: 35 additions & 10 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ module.exports = function(grunt) {
outputStyle: 'expanded' // nested, expanded, compact, compressed.
}
}
},
},

// Generate POT file
makepot: {
Expand Down Expand Up @@ -168,7 +168,7 @@ module.exports = function(grunt) {
frontJsScripts: {
options: {

banner: "/*! <%= meta.version %>\n" +
banner: "/*! <%= meta.version %>\n" +
" * <%= pkg.homepage %>\n" +
" * <%= meta.copyright %>;\n" +
" */\n",
Expand All @@ -186,10 +186,10 @@ module.exports = function(grunt) {
dest: 'assets/js/wp-ulike.js'
},

adminJsScripts: {
adminJsStatistics: {
options: {

banner: "/*! <%= meta.version %>\n" +
banner: "/*! <%= meta.version %>\n" +
" * <%= pkg.homepage %>\n" +
" * <%= meta.copyright %>;\n" +
" */\n",
Expand All @@ -204,6 +204,26 @@ module.exports = function(grunt) {
'admin/assets/js/src/scripts.js',
],
dest: 'admin/assets/js/statistics.js'
},

adminJsSettings: {
options: {

banner: "/*! <%= meta.version %>\n" +
" * <%= pkg.homepage %>\n" +
" * <%= meta.copyright %>;\n" +
" */\n",

process: function(src, filepath) {
var separator = "\n\n/* ================== " + filepath + " =================== */\n\n\n";
return (separator + src).replace(/;\s*$/, "") + ";"; // make sure always a semicolon is at the end
},
},
src: [
'admin/assets/js/src/settings/visual-select.js',
'admin/assets/js/src/settings/panel.js',
],
dest: 'admin/assets/js/settings.js'
}

},
Expand All @@ -218,7 +238,7 @@ module.exports = function(grunt) {
'assets/css/wp-ulike.min.css': ['assets/css/wp-ulike.css']
}
}
},
},

clean: {
build: [
Expand All @@ -234,12 +254,12 @@ module.exports = function(grunt) {
options: {
mangle: true,
preserveComments: 'some'
},
},

frontJsScripts: {
src: '<%= concat.frontJsScripts.dest %>',
dest: 'assets/js/wp-ulike.min.js'
}
}
},

preprocess : {
Expand Down Expand Up @@ -344,9 +364,14 @@ module.exports = function(grunt) {
tasks: ['concat:frontJsScripts', 'uglify:frontJsScripts']
},

concat_admin_js_scripts: {
concat_admin_js_statistics: {
files: ['admin/assets/js/src/*.js'],
tasks: ['concat:adminJsScripts']
tasks: ['concat:adminJsStatistics']
},

concat_admin_js_settings: {
files: ['admin/assets/js/src/settings/*.js'],
tasks: ['concat:adminJsSettings']
},

livereload: {
Expand All @@ -356,7 +381,7 @@ module.exports = function(grunt) {
'assets/img/**/*.{png,jpg,jpeg,gif,webp,svg}'
]
}
},
},

// deploy via rsync
deploy: {
Expand Down
6 changes: 3 additions & 3 deletions admin/admin-ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
/**
* AJAX handler to store the state of dismissible notices.
*
* @author Alimir
* @author Alimir
* @since 2.9
* @return Void
*/
*/
function wp_ulike_ajax_notice_handler() {
// Store it in the options table
update_option( 'wp-ulike-notice-dismissed', TRUE );
Expand All @@ -24,7 +24,7 @@ function wp_ulike_ajax_notice_handler() {
/**
* Remove logs from tables
*
* @author Alimir
* @author Alimir
* @since 2.1
* @return Void
*/
Expand Down
Loading

0 comments on commit a743878

Please sign in to comment.