Adding /js/ folder to watcher task excluding theme.js and theme.min.js
This commit is contained in:
parent
2c01290ced
commit
6ca1abff08
|
@ -103,7 +103,7 @@ gulp.task('sass', function () {
|
||||||
gulp.task('watch', function () {
|
gulp.task('watch', function () {
|
||||||
gulp.watch('./sass/**/*.scss', ['sass']);
|
gulp.watch('./sass/**/*.scss', ['sass']);
|
||||||
gulp.watch('./css/theme.css', ['cssnano']);
|
gulp.watch('./css/theme.css', ['cssnano']);
|
||||||
gulp.watch([basePaths.dev + 'js/**/*.js'], ['scripts'])
|
gulp.watch([basePaths.dev + 'js/**/*.js','js/**/*.js','!js/theme.js','!js/theme.min.js'], ['scripts'])
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
21
js/theme.js
21
js/theme.js
|
@ -5379,3 +5379,24 @@ var Popover = function ($) {
|
||||||
}, false );
|
}, false );
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This file adds some LIVE to the Theme Customizer live preview. To leverage
|
||||||
|
* this, set your custom settings to 'postMessage' and then add your handling
|
||||||
|
* here. Your javascript should grab settings from customizer controls, and
|
||||||
|
* then make any necessary changes to the page using jQuery.
|
||||||
|
*
|
||||||
|
* @see https://codex.wordpress.org/Theme_Customization_API#Part_3:_Configure_Live_Preview_.28Optional.29
|
||||||
|
*/
|
||||||
|
( function( $ ) {
|
||||||
|
|
||||||
|
// Update the site title in real time...
|
||||||
|
wp.customize( 'blogname', function( value ) {
|
||||||
|
value.bind( function( newval ) {
|
||||||
|
console.log(newval);
|
||||||
|
$( '.navbar-header a' ).html( newval );
|
||||||
|
} );
|
||||||
|
} );
|
||||||
|
|
||||||
|
} )( jQuery );
|
||||||
|
|
File diff suppressed because one or more lines are too long
Reference in New Issue