Switch back to pre-gulp4 version
This commit is contained in:
parent
1829f2059c
commit
7cdaeddef7
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
270
gulpfile.js
270
gulpfile.js
|
@ -1,107 +1,179 @@
|
||||||
// Defining requirements
|
// Defining requirements
|
||||||
var autoprefixer = require( 'autoprefixer' ),
|
var gulp = require( 'gulp' );
|
||||||
browserSync = require('browser-sync').create(),
|
var plumber = require( 'gulp-plumber' );
|
||||||
cleanCSS = require( 'gulp-clean-css' ),
|
var sass = require( 'gulp-sass' );
|
||||||
concat = require( 'gulp-concat' ),
|
var watch = require( 'gulp-watch' );
|
||||||
del = require( 'del' ),
|
var cssnano = require( 'gulp-cssnano' );
|
||||||
gulp = require( 'gulp' ),
|
var rename = require( 'gulp-rename' );
|
||||||
imagemin = require( 'gulp-imagemin' ),
|
var concat = require( 'gulp-concat' );
|
||||||
postcss = require( 'gulp-postcss' ),
|
var uglify = require( 'gulp-uglify' );
|
||||||
rename = require( 'gulp-rename' ),
|
var merge2 = require( 'merge2' );
|
||||||
replace = require( 'gulp-replace' ),
|
var imagemin = require( 'gulp-imagemin' );
|
||||||
sass = require( 'gulp-sass' ),
|
var ignore = require( 'gulp-ignore' );
|
||||||
sourcemaps = require( 'gulp-sourcemaps' ),
|
var rimraf = require( 'gulp-rimraf' );
|
||||||
uglify = require( 'gulp-uglify' ),
|
var clone = require( 'gulp-clone' );
|
||||||
rev = require('gulp-rev'),
|
var merge = require( 'gulp-merge' );
|
||||||
revDel = require('rev-del');
|
var sourcemaps = require( 'gulp-sourcemaps' );
|
||||||
|
var browserSync = require( 'browser-sync' ).create();
|
||||||
|
var del = require( 'del' );
|
||||||
|
var cleanCSS = require( 'gulp-clean-css' );
|
||||||
|
var gulpSequence = require( 'gulp-sequence' );
|
||||||
|
var replace = require( 'gulp-replace' );
|
||||||
|
var autoprefixer = require( 'gulp-autoprefixer' );
|
||||||
|
|
||||||
// Configuration file to keep your code DRY
|
// Configuration file to keep your code DRY
|
||||||
const cfg = require( './gulpconfig.json' );
|
var cfg = require( './gulpconfig.json' );
|
||||||
const paths = cfg.paths;
|
var paths = cfg.paths;
|
||||||
|
|
||||||
// Compile SCSS to CSS
|
gulp.task( 'watch-scss', ['browser-sync'], function() {
|
||||||
function scss( ) {
|
gulp.watch( paths.sass + '/**/*.scss', ['scss-for-dev'] );
|
||||||
return gulp.src( paths.sass + '/*.scss' )
|
});
|
||||||
.pipe(sourcemaps.init({loadMaps: true}))
|
|
||||||
.pipe(sass()).on('error', sass.logError)
|
|
||||||
.pipe(postcss([
|
|
||||||
autoprefixer()
|
|
||||||
]))
|
|
||||||
.pipe(sourcemaps.write(undefined, { sourceRoot: null }))
|
|
||||||
.pipe( gulp.dest( paths.css ) );
|
|
||||||
|
|
||||||
|
// Run:
|
||||||
|
// gulp sass
|
||||||
|
// Compiles SCSS files in CSS
|
||||||
|
gulp.task( 'sass', function() {
|
||||||
|
var stream = gulp.src( paths.sass + '/*.scss' )
|
||||||
|
.pipe( plumber( {
|
||||||
|
errorHandler: function( err ) {
|
||||||
|
console.log( err );
|
||||||
|
this.emit( 'end' );
|
||||||
}
|
}
|
||||||
|
} ) )
|
||||||
exports.scss = scss;
|
|
||||||
|
|
||||||
// Minify CSS
|
|
||||||
function minifycss( done ) {
|
|
||||||
gulp.src( paths.css + '/theme.css' )
|
|
||||||
.pipe(sourcemaps.init({loadMaps: true}))
|
.pipe(sourcemaps.init({loadMaps: true}))
|
||||||
.pipe( cleanCSS( { compatibility: '*' } ) )
|
.pipe( sass( { errLogToConsole: true } ) )
|
||||||
.pipe( rename( { suffix: '.min' } ) )
|
.pipe( autoprefixer( 'last 2 versions' ) )
|
||||||
.pipe( sourcemaps.write( './' ) )
|
.pipe(sourcemaps.write(undefined, { sourceRoot: null }))
|
||||||
.pipe( gulp.dest( paths.css ) )
|
.pipe( gulp.dest( paths.css ) )
|
||||||
|
return stream;
|
||||||
|
});
|
||||||
|
|
||||||
gulp.src( paths.css + '/custom-editor-style.css' )
|
// Run:
|
||||||
|
// gulp watch
|
||||||
|
// Starts watcher. Watcher runs gulp sass task on changes
|
||||||
|
gulp.task( 'watch', function() {
|
||||||
|
gulp.watch( paths.sass + '/**/*.scss', ['styles'] );
|
||||||
|
gulp.watch( [paths.dev + '/js/**/*.js', 'js/**/*.js', '!js/theme.js', '!js/theme.min.js'], ['scripts'] );
|
||||||
|
|
||||||
|
//Inside the watch task.
|
||||||
|
gulp.watch( paths.imgsrc + '/**', ['imagemin-watch'] );
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ensures the 'imagemin' task is complete before reloading browsers
|
||||||
|
* @verbose
|
||||||
|
*/
|
||||||
|
gulp.task( 'imagemin-watch', ['imagemin'], function( ) {
|
||||||
|
browserSync.reload();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Run:
|
||||||
|
// gulp imagemin
|
||||||
|
// Running image optimizing task
|
||||||
|
gulp.task( 'imagemin', function() {
|
||||||
|
gulp.src( paths.imgsrc + '/**' )
|
||||||
|
.pipe( imagemin() )
|
||||||
|
.pipe( gulp.dest( paths.img ) );
|
||||||
|
});
|
||||||
|
|
||||||
|
// Run:
|
||||||
|
// gulp cssnano
|
||||||
|
// Minifies CSS files
|
||||||
|
gulp.task( 'cssnano', function() {
|
||||||
|
return gulp.src( paths.css + '/theme.css' )
|
||||||
|
.pipe( sourcemaps.init( { loadMaps: true } ) )
|
||||||
|
.pipe( plumber( {
|
||||||
|
errorHandler: function( err ) {
|
||||||
|
console.log( err );
|
||||||
|
this.emit( 'end' );
|
||||||
|
}
|
||||||
|
} ) )
|
||||||
|
.pipe( rename( { suffix: '.min' } ) )
|
||||||
|
.pipe( cssnano( { discardComments: { removeAll: true } } ) )
|
||||||
|
.pipe( sourcemaps.write( './' ) )
|
||||||
|
.pipe( gulp.dest( paths.css ) );
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task( 'minifycss', function() {
|
||||||
|
return gulp.src( paths.css + '/theme.css' )
|
||||||
.pipe( sourcemaps.init( { loadMaps: true } ) )
|
.pipe( sourcemaps.init( { loadMaps: true } ) )
|
||||||
.pipe( cleanCSS( { compatibility: '*' } ) )
|
.pipe( cleanCSS( { compatibility: '*' } ) )
|
||||||
|
.pipe( plumber( {
|
||||||
|
errorHandler: function( err ) {
|
||||||
|
console.log( err ) ;
|
||||||
|
this.emit( 'end' );
|
||||||
|
}
|
||||||
|
} ) )
|
||||||
.pipe( rename( { suffix: '.min' } ) )
|
.pipe( rename( { suffix: '.min' } ) )
|
||||||
.pipe( sourcemaps.write( './' ) )
|
.pipe( sourcemaps.write( './' ) )
|
||||||
.pipe( gulp.dest( paths.css ) );
|
.pipe( gulp.dest( paths.css ) );
|
||||||
|
});
|
||||||
|
|
||||||
done();
|
gulp.task( 'cleancss', function() {
|
||||||
};
|
return gulp.src( paths.css + '/*.min.css', { read: false } ) // Much faster
|
||||||
|
.pipe( ignore( 'theme.css' ) )
|
||||||
|
.pipe( rimraf() );
|
||||||
|
});
|
||||||
|
|
||||||
exports.minifycss = minifycss;
|
gulp.task( 'styles', function( callback ) {
|
||||||
|
gulpSequence( 'sass', 'minifycss' )( callback );
|
||||||
|
} );
|
||||||
|
|
||||||
// Concatinate scripts and minify them
|
// Run:
|
||||||
function scripts( done ) {
|
// gulp browser-sync
|
||||||
|
// Starts browser-sync task for starting the server.
|
||||||
|
gulp.task( 'browser-sync', function() {
|
||||||
|
browserSync.init( cfg.browserSyncWatchFiles, cfg.browserSyncOptions );
|
||||||
|
} );
|
||||||
|
|
||||||
|
// Run:
|
||||||
|
// gulp watch-bs
|
||||||
|
// Starts watcher with browser-sync. Browser-sync reloads page automatically on your browser
|
||||||
|
gulp.task( 'watch-bs', ['browser-sync', 'watch', 'scripts'], function() {
|
||||||
|
} );
|
||||||
|
|
||||||
|
// Run:
|
||||||
|
// gulp scripts.
|
||||||
|
// Uglifies and concat all JS files into one
|
||||||
|
gulp.task( 'scripts', function() {
|
||||||
var scripts = [
|
var scripts = [
|
||||||
|
|
||||||
|
// Start - All BS4 stuff
|
||||||
paths.dev + '/js/bootstrap4/bootstrap.js',
|
paths.dev + '/js/bootstrap4/bootstrap.js',
|
||||||
|
|
||||||
|
// End - All BS4 stuff
|
||||||
|
|
||||||
paths.dev + '/js/skip-link-focus-fix.js',
|
paths.dev + '/js/skip-link-focus-fix.js',
|
||||||
|
|
||||||
// Adding currently empty javascript file to add on for your own themes´ customizations
|
// Adding currently empty javascript file to add on for your own themes´ customizations
|
||||||
// Please add any customizations to this .js file only!
|
// Please add any customizations to this .js file only!
|
||||||
paths.dev + '/js/custom-javascript.js'
|
paths.dev + '/js/custom-javascript.js'
|
||||||
];
|
];
|
||||||
|
|
||||||
gulp.src( scripts )
|
|
||||||
.pipe( concat( 'theme.js' ) )
|
|
||||||
.pipe( gulp.dest( paths.js ) )
|
|
||||||
|
|
||||||
gulp.src( scripts )
|
gulp.src( scripts )
|
||||||
.pipe( concat( 'theme.min.js' ) )
|
.pipe( concat( 'theme.min.js' ) )
|
||||||
.pipe( uglify() )
|
.pipe( uglify() )
|
||||||
.pipe( gulp.dest( paths.js ) );
|
.pipe( gulp.dest( paths.js ) );
|
||||||
|
|
||||||
done();
|
gulp.src( scripts )
|
||||||
}
|
.pipe( concat( 'theme.js' ) )
|
||||||
|
.pipe( gulp.dest( paths.js ) );
|
||||||
|
});
|
||||||
|
|
||||||
exports.scripts = scripts;
|
// Deleting any file inside the /src folder
|
||||||
|
gulp.task( 'clean-source', function() {
|
||||||
// Compress image assets
|
return del( ['src/**/*'] );
|
||||||
function imagemin() {
|
});
|
||||||
return gulp.src( paths.imgsrc + '/**' )
|
|
||||||
.pipe( imagemin() )
|
|
||||||
.pipe( gulp.dest( paths.img ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.imagemin = imagemin;
|
|
||||||
|
|
||||||
// Run:
|
// Run:
|
||||||
// gulp copy-assets.
|
// gulp copy-assets.
|
||||||
// Copy all needed dependency assets files from bower_component assets to themes /js, /scss and /fonts folder. Run this task after bower install or bower update
|
// Copy all needed dependency assets files from bower_component assets to themes /js, /scss and /fonts folder. Run this task after bower install or bower update
|
||||||
|
|
||||||
////////////////// All Bootstrap SASS Assets /////////////////////////
|
////////////////// All Bootstrap SASS Assets /////////////////////////
|
||||||
gulp.task( 'copy-assets', function(done) {
|
gulp.task( 'copy-assets', function() {
|
||||||
|
|
||||||
|
|
||||||
////////////////// All Bootstrap 4 Assets /////////////////////////
|
////////////////// All Bootstrap 4 Assets /////////////////////////
|
||||||
// Copy all JS files
|
// Copy all JS files
|
||||||
gulp.src( paths.node + 'bootstrap/dist/js/**/*.js' )
|
var stream = gulp.src( paths.node + 'bootstrap/dist/js/**/*.js' )
|
||||||
.pipe( gulp.dest( paths.dev + '/js/bootstrap4' ) );
|
.pipe( gulp.dest( paths.dev + '/js/bootstrap4' ) );
|
||||||
|
|
||||||
// Copy all Bootstrap SCSS files
|
// Copy all Bootstrap SCSS files
|
||||||
|
@ -131,61 +203,39 @@ gulp.task( 'copy-assets', function(done) {
|
||||||
.pipe( gulp.dest( paths.js + paths.vendor ) );
|
.pipe( gulp.dest( paths.js + paths.vendor ) );
|
||||||
gulp.src( paths.node + 'popper.js/dist/umd/popper.js' )
|
gulp.src( paths.node + 'popper.js/dist/umd/popper.js' )
|
||||||
.pipe( gulp.dest( paths.js + paths.vendor ) );
|
.pipe( gulp.dest( paths.js + paths.vendor ) );
|
||||||
|
return stream;
|
||||||
done();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Deleting any file inside the /src folder
|
// Deleting the files distributed by the copy-assets task
|
||||||
gulp.task( 'clean-source', function() {
|
gulp.task( 'clean-vendor-assets', function() {
|
||||||
return del( ['src/**/*', '!src'] );
|
return del( [paths.dev + '/js/bootstrap4/**', paths.dev + '/sass/bootstrap4/**', './fonts/*wesome*.{ttf,woff,woff2,eot,svg}', paths.dev + '/sass/fontawesome/**', paths.dev + '/sass/underscores/**', paths.dev + '/js/skip-link-focus-fix.js', paths.js + '/**/skip-link-focus-fix.js', paths.js + '/**/popper.min.js', paths.js + '/**/popper.js', ( paths.vendor !== ''?( paths.js + paths.vendor + '/**' ):'' )] );
|
||||||
});
|
});
|
||||||
|
|
||||||
// Deleting any file inside the /dist folder
|
|
||||||
gulp.task( 'clean-dist', function() {
|
|
||||||
return del( ['dist/**/*', '!dist'] );
|
|
||||||
});
|
|
||||||
|
|
||||||
function revision( done ) {
|
|
||||||
// by default, gulp would pick `assets/css` as the base,
|
|
||||||
// so we need to set it explicitly:
|
|
||||||
gulp.src([paths.css + '/theme.min.css', paths.js + '/theme.min.js'], {base: './'})
|
|
||||||
.pipe(rev())
|
|
||||||
.pipe(gulp.dest('./')) // write rev'd assets to build dir
|
|
||||||
.pipe(rev.manifest())
|
|
||||||
.pipe(revDel({dest: './'}))
|
|
||||||
.pipe(gulp.dest('./')); // write manifest to build dir
|
|
||||||
done();
|
|
||||||
};
|
|
||||||
|
|
||||||
exports.revision = revision;
|
|
||||||
|
|
||||||
// Run
|
// Run
|
||||||
// gulp dist
|
// gulp dist
|
||||||
// Copies the files to the /dist folder for distribution as simple theme
|
// Copies the files to the /dist folder for distribution as simple theme
|
||||||
gulp.task( 'dist', gulp.series( 'clean-dist', function(done) {
|
gulp.task( 'dist', ['clean-dist'], function() {
|
||||||
|
return gulp.src( ['**/*', '!' + paths.bower, '!' + paths.bower + '/**', '!' + paths.node, '!' + paths.node + '/**', '!' + paths.dev, '!' + paths.dev + '/**', '!' + paths.dist, '!' + paths.dist + '/**', '!' + paths.distprod, '!' + paths.distprod + '/**', '!' + paths.sass, '!' + paths.sass + '/**', '!readme.txt', '!readme.md', '!package.json', '!package-lock.json', '!gulpfile.js', '!gulpconfig.json', '!CHANGELOG.md', '!.travis.yml', '!jshintignore', '!codesniffer.ruleset.xml', '*'], { 'buffer': false } )
|
||||||
gulp.src( ['**/*', '!' + paths.bower, '!' + paths.bower + '/**', '!' + paths.node, '!' + paths.node + '/**', '!' + paths.dev, '!' + paths.dev + '/**', '!' + paths.dist, '!' + paths.dist + '/**', '!' + paths.distprod, '!' + paths.distprod + '/**', '!' + paths.sass, '!' + paths.sass + '/**', '!readme.txt', '!readme.md', '!package.json', '!package-lock.json', '!gulpfile.js', '!gulpconfig.json', '!CHANGELOG.md', '!.travis.yml', '!jshintignore', '!codesniffer.ruleset.xml', 'rev-manifest.json', '*'], { 'buffer': false } )
|
|
||||||
.pipe( replace( '/js/jquery.slim.min.js', '/js' + paths.vendor + '/jquery.slim.min.js', { 'skipBinary': true } ) )
|
.pipe( replace( '/js/jquery.slim.min.js', '/js' + paths.vendor + '/jquery.slim.min.js', { 'skipBinary': true } ) )
|
||||||
.pipe( replace( '/js/popper.min.js', '/js' + paths.vendor + '/popper.min.js', { 'skipBinary': true } ) )
|
.pipe( replace( '/js/popper.min.js', '/js' + paths.vendor + '/popper.min.js', { 'skipBinary': true } ) )
|
||||||
|
.pipe( replace( '/js/skip-link-focus-fix.js', '/js' + paths.vendor + '/skip-link-focus-fix.js', { 'skipBinary': true } ) )
|
||||||
.pipe( gulp.dest( paths.dist ) );
|
.pipe( gulp.dest( paths.dist ) );
|
||||||
done();
|
});
|
||||||
|
|
||||||
}));
|
// Deleting any file inside the /dist folder
|
||||||
|
gulp.task( 'clean-dist', function() {
|
||||||
// BrowserSync reload helper function
|
return del( [paths.dist + '/**'] );
|
||||||
function reload( done ){
|
});
|
||||||
browserSync.reload();
|
|
||||||
done();
|
// Run
|
||||||
}
|
// gulp dist-product
|
||||||
|
// Copies the files to the /dist-prod folder for distribution as theme with all assets
|
||||||
// BrowserSync main task
|
gulp.task( 'dist-product', ['clean-dist-product'], function() {
|
||||||
gulp.task( 'watch-bs', function( done ) {
|
return gulp.src( ['**/*', '!' + paths.bower, '!' + paths.bower + '/**', '!' + paths.node, '!' + paths.node + '/**', '!' + paths.dist, '!' + paths.dist +'/**', '!' + paths.distprod, '!' + paths.distprod + '/**', '*'] )
|
||||||
browserSync.init( cfg.browserSyncWatchFiles, cfg.browserSyncOptions );
|
.pipe( gulp.dest( paths.distprod ) );
|
||||||
gulp.watch( paths.sass + '/**/*.scss', gulp.series(scss, minifycss, revision, reload) );
|
} );
|
||||||
gulp.watch( [paths.dev + '/js/**/*.js', 'js/**/*.js', '!js/theme.js', '!js/theme.min.js'], gulp.series( scripts, revision, reload ) );
|
|
||||||
|
// Deleting any file inside the /dist-product folder
|
||||||
//Inside the watch task.
|
gulp.task( 'clean-dist-product', function() {
|
||||||
gulp.watch( paths.imgsrc + '/**', gulp.series( imagemin, reload ) );
|
return del( [paths.distprod + '/**'] );
|
||||||
done();
|
|
||||||
|
|
||||||
} );
|
} );
|
||||||
|
|
|
@ -102,9 +102,9 @@ if ( ! function_exists( 'understrap_widgets_init' ) ) {
|
||||||
) );
|
) );
|
||||||
|
|
||||||
register_sidebar( array(
|
register_sidebar( array(
|
||||||
'name' => __( 'Bottom Full', 'understrap' ),
|
'name' => __( 'Footer Full', 'understrap' ),
|
||||||
'id' => 'footerfull',
|
'id' => 'footerfull',
|
||||||
'description' => 'Full bottom widget with dynmic grid',
|
'description' => 'Full sized footer widget with dynamic grid',
|
||||||
'before_widget' => '<div id="%1$s" class="footer-widget %2$s '. understrap_slbd_count_widgets( 'footerfull' ) .'">',
|
'before_widget' => '<div id="%1$s" class="footer-widget %2$s '. understrap_slbd_count_widgets( 'footerfull' ) .'">',
|
||||||
'after_widget' => '</div><!-- .footer-widget -->',
|
'after_widget' => '</div><!-- .footer-widget -->',
|
||||||
'before_title' => '<h3 class="widget-title">',
|
'before_title' => '<h3 class="widget-title">',
|
||||||
|
|
60
js/theme.js
60
js/theme.js
|
@ -1,5 +1,5 @@
|
||||||
/*!
|
/*!
|
||||||
* Bootstrap v4.1.0 (https://getbootstrap.com/)
|
* Bootstrap v4.1.1 (https://getbootstrap.com/)
|
||||||
* Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
* Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
*/
|
*/
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
* Bootstrap (v4.1.0): util.js
|
* Bootstrap (v4.1.1): util.js
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -203,7 +203,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
* Bootstrap (v4.1.0): alert.js
|
* Bootstrap (v4.1.1): alert.js
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -215,7 +215,7 @@
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
var NAME = 'alert';
|
var NAME = 'alert';
|
||||||
var VERSION = '4.1.0';
|
var VERSION = '4.1.1';
|
||||||
var DATA_KEY = 'bs.alert';
|
var DATA_KEY = 'bs.alert';
|
||||||
var EVENT_KEY = "." + DATA_KEY;
|
var EVENT_KEY = "." + DATA_KEY;
|
||||||
var DATA_API_KEY = '.data-api';
|
var DATA_API_KEY = '.data-api';
|
||||||
|
@ -252,9 +252,11 @@
|
||||||
|
|
||||||
// Public
|
// Public
|
||||||
_proto.close = function close(element) {
|
_proto.close = function close(element) {
|
||||||
element = element || this._element;
|
var rootElement = this._element;
|
||||||
|
|
||||||
var rootElement = this._getRootElement(element);
|
if (element) {
|
||||||
|
rootElement = this._getRootElement(element);
|
||||||
|
}
|
||||||
|
|
||||||
var customEvent = this._triggerCloseEvent(rootElement);
|
var customEvent = this._triggerCloseEvent(rootElement);
|
||||||
|
|
||||||
|
@ -376,7 +378,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
* Bootstrap (v4.1.0): button.js
|
* Bootstrap (v4.1.1): button.js
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -388,7 +390,7 @@
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
var NAME = 'button';
|
var NAME = 'button';
|
||||||
var VERSION = '4.1.0';
|
var VERSION = '4.1.1';
|
||||||
var DATA_KEY = 'bs.button';
|
var DATA_KEY = 'bs.button';
|
||||||
var EVENT_KEY = "." + DATA_KEY;
|
var EVENT_KEY = "." + DATA_KEY;
|
||||||
var DATA_API_KEY = '.data-api';
|
var DATA_API_KEY = '.data-api';
|
||||||
|
@ -540,7 +542,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
* Bootstrap (v4.1.0): carousel.js
|
* Bootstrap (v4.1.1): carousel.js
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -552,7 +554,7 @@
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
var NAME = 'carousel';
|
var NAME = 'carousel';
|
||||||
var VERSION = '4.1.0';
|
var VERSION = '4.1.1';
|
||||||
var DATA_KEY = 'bs.carousel';
|
var DATA_KEY = 'bs.carousel';
|
||||||
var EVENT_KEY = "." + DATA_KEY;
|
var EVENT_KEY = "." + DATA_KEY;
|
||||||
var DATA_API_KEY = '.data-api';
|
var DATA_API_KEY = '.data-api';
|
||||||
|
@ -1041,7 +1043,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
* Bootstrap (v4.1.0): collapse.js
|
* Bootstrap (v4.1.1): collapse.js
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -1053,7 +1055,7 @@
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
var NAME = 'collapse';
|
var NAME = 'collapse';
|
||||||
var VERSION = '4.1.0';
|
var VERSION = '4.1.1';
|
||||||
var DATA_KEY = 'bs.collapse';
|
var DATA_KEY = 'bs.collapse';
|
||||||
var EVENT_KEY = "." + DATA_KEY;
|
var EVENT_KEY = "." + DATA_KEY;
|
||||||
var DATA_API_KEY = '.data-api';
|
var DATA_API_KEY = '.data-api';
|
||||||
|
@ -1324,7 +1326,7 @@
|
||||||
var $this = $$$1(this);
|
var $this = $$$1(this);
|
||||||
var data = $this.data(DATA_KEY);
|
var data = $this.data(DATA_KEY);
|
||||||
|
|
||||||
var _config = _objectSpread({}, Default, $this.data(), typeof config === 'object' && config);
|
var _config = _objectSpread({}, Default, $this.data(), typeof config === 'object' && config ? config : {});
|
||||||
|
|
||||||
if (!data && _config.toggle && /show|hide/.test(config)) {
|
if (!data && _config.toggle && /show|hide/.test(config)) {
|
||||||
_config.toggle = false;
|
_config.toggle = false;
|
||||||
|
@ -1401,7 +1403,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
* Bootstrap (v4.1.0): dropdown.js
|
* Bootstrap (v4.1.1): dropdown.js
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -1413,7 +1415,7 @@
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
var NAME = 'dropdown';
|
var NAME = 'dropdown';
|
||||||
var VERSION = '4.1.0';
|
var VERSION = '4.1.1';
|
||||||
var DATA_KEY = 'bs.dropdown';
|
var DATA_KEY = 'bs.dropdown';
|
||||||
var EVENT_KEY = "." + DATA_KEY;
|
var EVENT_KEY = "." + DATA_KEY;
|
||||||
var DATA_API_KEY = '.data-api';
|
var DATA_API_KEY = '.data-api';
|
||||||
|
@ -1883,7 +1885,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
* Bootstrap (v4.1.0): modal.js
|
* Bootstrap (v4.1.1): modal.js
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -1895,7 +1897,7 @@
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
var NAME = 'modal';
|
var NAME = 'modal';
|
||||||
var VERSION = '4.1.0';
|
var VERSION = '4.1.1';
|
||||||
var DATA_KEY = 'bs.modal';
|
var DATA_KEY = 'bs.modal';
|
||||||
var EVENT_KEY = "." + DATA_KEY;
|
var EVENT_KEY = "." + DATA_KEY;
|
||||||
var DATA_API_KEY = '.data-api';
|
var DATA_API_KEY = '.data-api';
|
||||||
|
@ -2371,7 +2373,7 @@
|
||||||
return this.each(function () {
|
return this.each(function () {
|
||||||
var data = $$$1(this).data(DATA_KEY);
|
var data = $$$1(this).data(DATA_KEY);
|
||||||
|
|
||||||
var _config = _objectSpread({}, Modal.Default, $$$1(this).data(), typeof config === 'object' && config);
|
var _config = _objectSpread({}, Default, $$$1(this).data(), typeof config === 'object' && config ? config : {});
|
||||||
|
|
||||||
if (!data) {
|
if (!data) {
|
||||||
data = new Modal(this, _config);
|
data = new Modal(this, _config);
|
||||||
|
@ -2461,7 +2463,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
* Bootstrap (v4.1.0): tooltip.js
|
* Bootstrap (v4.1.1): tooltip.js
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -2473,7 +2475,7 @@
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
var NAME = 'tooltip';
|
var NAME = 'tooltip';
|
||||||
var VERSION = '4.1.0';
|
var VERSION = '4.1.1';
|
||||||
var DATA_KEY = 'bs.tooltip';
|
var DATA_KEY = 'bs.tooltip';
|
||||||
var EVENT_KEY = "." + DATA_KEY;
|
var EVENT_KEY = "." + DATA_KEY;
|
||||||
var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
|
var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
|
||||||
|
@ -2978,7 +2980,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._getConfig = function _getConfig(config) {
|
_proto._getConfig = function _getConfig(config) {
|
||||||
config = _objectSpread({}, this.constructor.Default, $$$1(this.element).data(), config);
|
config = _objectSpread({}, this.constructor.Default, $$$1(this.element).data(), typeof config === 'object' && config ? config : {});
|
||||||
|
|
||||||
if (typeof config.delay === 'number') {
|
if (typeof config.delay === 'number') {
|
||||||
config.delay = {
|
config.delay = {
|
||||||
|
@ -3128,7 +3130,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
* Bootstrap (v4.1.0): popover.js
|
* Bootstrap (v4.1.1): popover.js
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -3140,7 +3142,7 @@
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
var NAME = 'popover';
|
var NAME = 'popover';
|
||||||
var VERSION = '4.1.0';
|
var VERSION = '4.1.1';
|
||||||
var DATA_KEY = 'bs.popover';
|
var DATA_KEY = 'bs.popover';
|
||||||
var EVENT_KEY = "." + DATA_KEY;
|
var EVENT_KEY = "." + DATA_KEY;
|
||||||
var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
|
var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
|
||||||
|
@ -3325,7 +3327,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
* Bootstrap (v4.1.0): scrollspy.js
|
* Bootstrap (v4.1.1): scrollspy.js
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -3337,7 +3339,7 @@
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
var NAME = 'scrollspy';
|
var NAME = 'scrollspy';
|
||||||
var VERSION = '4.1.0';
|
var VERSION = '4.1.1';
|
||||||
var DATA_KEY = 'bs.scrollspy';
|
var DATA_KEY = 'bs.scrollspy';
|
||||||
var EVENT_KEY = "." + DATA_KEY;
|
var EVENT_KEY = "." + DATA_KEY;
|
||||||
var DATA_API_KEY = '.data-api';
|
var DATA_API_KEY = '.data-api';
|
||||||
|
@ -3464,7 +3466,7 @@
|
||||||
|
|
||||||
|
|
||||||
_proto._getConfig = function _getConfig(config) {
|
_proto._getConfig = function _getConfig(config) {
|
||||||
config = _objectSpread({}, Default, config);
|
config = _objectSpread({}, Default, typeof config === 'object' && config ? config : {});
|
||||||
|
|
||||||
if (typeof config.target !== 'string') {
|
if (typeof config.target !== 'string') {
|
||||||
var id = $$$1(config.target).attr('id');
|
var id = $$$1(config.target).attr('id');
|
||||||
|
@ -3637,7 +3639,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
* Bootstrap (v4.1.0): tab.js
|
* Bootstrap (v4.1.1): tab.js
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -3649,7 +3651,7 @@
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
var NAME = 'tab';
|
var NAME = 'tab';
|
||||||
var VERSION = '4.1.0';
|
var VERSION = '4.1.1';
|
||||||
var DATA_KEY = 'bs.tab';
|
var DATA_KEY = 'bs.tab';
|
||||||
var EVENT_KEY = "." + DATA_KEY;
|
var EVENT_KEY = "." + DATA_KEY;
|
||||||
var DATA_API_KEY = '.data-api';
|
var DATA_API_KEY = '.data-api';
|
||||||
|
@ -3885,7 +3887,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
* Bootstrap (v4.0.0): index.js
|
* Bootstrap (v4.1.1): index.js
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
35
package.json
35
package.json
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "understrap",
|
"name": "understrap",
|
||||||
"version": "0.8.3",
|
"version": "0.8.2",
|
||||||
"description": "WordPress Theme framework",
|
"description": "WordPress Theme framework",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -23,30 +23,35 @@
|
||||||
"author": "Holger Koenemann",
|
"author": "Holger Koenemann",
|
||||||
"license": "GPL-2.0",
|
"license": "GPL-2.0",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/understrap/understrap/issues"
|
"url": "https://github.com/holger1411/understrap/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://understrap.com",
|
"homepage": "https://understrap.com",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"autoprefixer": "^8.6.4",
|
|
||||||
"bootstrap": "4.1.1",
|
"bootstrap": "4.1.1",
|
||||||
"browser-sync": "^2.24.5",
|
"browser-sync": "^2.23.6",
|
||||||
"del": "^3.0.0",
|
"del": "^3.0.0",
|
||||||
"font-awesome": "^4.7.0",
|
"font-awesome": "^4.7.0",
|
||||||
"gulp": "4.0.0",
|
"gulp": "3.9.1",
|
||||||
"gulp-clean-css": "^3.9.4",
|
"gulp-clean-css": "^3.9.2",
|
||||||
|
"gulp-clone": "2.0.1",
|
||||||
"gulp-concat": "^2.6.1",
|
"gulp-concat": "^2.6.1",
|
||||||
|
"gulp-cssnano": "^2.1.2",
|
||||||
|
"gulp-ignore": "^2.0.2",
|
||||||
"gulp-imagemin": "^4.1.0",
|
"gulp-imagemin": "^4.1.0",
|
||||||
"gulp-postcss": "^7.0.1",
|
"gulp-merge": "^0.1.1",
|
||||||
"gulp-rename": "^1.3.0",
|
"gulp-plumber": "^1.2.0",
|
||||||
"gulp-replace": "^1.0.0",
|
"gulp-rename": "^1.2.2",
|
||||||
"gulp-rev": "^8.1.1",
|
"gulp-replace": "^0.6.1",
|
||||||
"gulp-sass": "^4.0.1",
|
"gulp-rimraf": "^0.2.2",
|
||||||
|
"gulp-sass": "4.0.1",
|
||||||
|
"gulp-sequence": "1.0.0",
|
||||||
"gulp-sourcemaps": "2.6.4",
|
"gulp-sourcemaps": "2.6.4",
|
||||||
"gulp-uglify": "^3.0.0",
|
"gulp-uglify": "^3.0.0",
|
||||||
"gulp-watch": "5.0.0",
|
"gulp-watch": "5.0.0",
|
||||||
"merge2": "^1.2.2",
|
"merge2": "^1.2.1",
|
||||||
"popper.js": "^1.14.3",
|
"popper.js": "^1.12.9",
|
||||||
"rev-del": "^1.0.5",
|
"run-sequence": "^2.2.1",
|
||||||
"undescores-for-npm": "^1.0.0"
|
"undescores-for-npm": "^1.0.0",
|
||||||
|
"gulp-autoprefixer": "^5.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue