Skip to content

Commit

Permalink
prep for 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Wafford committed Feb 3, 2015
1 parent d5581ff commit 4cafbf8
Show file tree
Hide file tree
Showing 14 changed files with 3,466 additions and 53 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.jscsrc
.DS_Store
/node_modules
jquery.bxslider.zip
111 changes: 75 additions & 36 deletions Gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,43 +1,82 @@
var gulp = require( 'gulp' )
, uglify = require( 'gulp-uglify' )
, umd = require( 'gulp-wrap-umd' )
, rename = require( 'gulp-rename' )
, less = require( 'gulp-less' )
, path = require( 'path' )
, lessCleanCSS = require( 'less-plugin-clean-css' )
, jshint = require( 'gulp-jshint' )
, livereload = require( 'gulp-livereload' )
, gutil = require('gulp-util');

var cleancss = new lessCleanCSS( {advanced: true} );

gulp.task( 'copyAssets', function() {

gulp.src( 'src/images/*' )
.pipe( gulp.dest( 'dist/images' ) )
})

gulp.task( 'buildJS', function() {

gulp.src( 'src/jquery.bxslider.js')
.pipe( jshint() )
.pipe( jshint.reporter('jshint-stylish') )
.pipe( uglify().on('error', gutil.log) )
.pipe( rename( 'jquery.bxslider.min.js' ) )
.pipe( gulp.dest( 'dist' ) );
// ## Globals
/*global $:true*/
var $ = require('gulp-load-plugins')();
var gulp = require('gulp');

// ### Styles
// `gulp styles` - compiles and optimizes css.
gulp.task('styles', function() {
return gulp.src('./src/less/*.less')
.pipe($.less())
.pipe($.pleeease({
autoprefixer: {
browsers: [
'last 2 versions', 'ie 8', 'ie 9', 'android 2.3', 'android 4',
'opera 12'
]
},
minifier: false
}))
.pipe(gulp.dest('./dist/'));
});

// ### Scripts
// `gulp scripts` - runs jshint and uglify
gulp.task('scripts', ['jshint'], function() {
return gulp.src('./src/js/*.js')
.pipe(gulp.dest('./dist/'))
.pipe($.uglify({
preserveComments: function (node, comment) {
if (/^\*\*/.test(comment.value) && /\*\*$/.test(comment.value)) {

console.log('Found tri-star comment. Preserving.');
return true;
}
}
}))
.pipe($.rename({extname: '.min.js'}))
.pipe(gulp.dest('./dist/'));
});

gulp.task( 'buildCSS', function () {
// ### Vendor Scripts
// `gulp vendor` - runs uglify on 3rd party plugins
gulp.task('vendor', function() {
return gulp.src('./src/vendor/*.js')
.pipe(gulp.dest('./dist/vendor'));
});

// ### Images
// `gulp images` - run lossless compression on all the images.
gulp.task('images', function() {
return gulp.src('./src/images/*')
.pipe($.imagemin({
progressive: true,
interlaced: true
}))
.pipe(gulp.dest('./dist/images'));
});

gulp.src( 'src/less/*.less')
.pipe( less() )
.pipe( gulp.dest('dist') );
// ### JsHint
// `gulp jshint` - lints configuration JSON and project javascript
gulp.task('jshint', function() {
return gulp.src([ 'bower.json', 'gulpfile.js', './src/*.js' ])
.pipe($.jshint())
.pipe($.jshint.reporter('jshint-stylish'))
.pipe($.jshint.reporter('fail'));
});

gulp.task( 'default', function() {
// ### Clean
// `gulp clean` - deletes the build folder entirely
gulp.task('clean', require('del').bind(null, ['dist/']));

// ### Build
// `gulp build` - Run all the build tasks but don't clean up beforehand.
// Generally you should be running `gulp` instead of `gulp build`.
gulp.task('build', ['styles', 'scripts', 'images', 'vendor']);

livereload.listen()
gulp.watch( [ 'docs/*.html', 'docs/examples/*.html', 'src/*.js' ] ).on( 'change', livereload.changed )
})

gulp.task( 'build', [ 'buildJS', 'buildCSS', 'copyAssets' ] )
// ### Gulp
// `gulp` - Run a complete build. To compile for production run `gulp --production`.
gulp.task('default', ['clean'], function() {
gulp.start('build');
});
13 changes: 7 additions & 6 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "bxslider-4",
"version": "4.1.2",
"version": "4.2.0",
"homepage": "http://bxslider.com",
"license": "MIT",
"main": [
"jquery.bxslider.js",
"jquery.bxslider.css",
"images/bx_loader.gif",
"images/controls.png"
"dist/jquery.bxslider.js",
"dist/jquery.bxslider.css",
"dist/images/bx_loader.gif",
"dist/images/controls.png"
],
"keywords": [
"bxslider",
Expand All @@ -16,7 +16,8 @@
"library"
],
"ignore": [
"**/.*",
"src/**/*.*",
"docs/**/.*",
"*.md"
],
"dependencies": {
Expand Down
9 changes: 3 additions & 6 deletions dist/jquery.bxslider.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* BxSlider v4.1.3 - Fully loaded, responsive content slider
/***
* BxSlider v4.2.0 - Fully loaded, responsive content slider
* http://bxslider.com
*
* Written by: Steven Wanderski, 2014
Expand All @@ -8,7 +8,7 @@
*
* CEO and founder of bxCreative, LTD
* http://bxcreative.com
*/
***/
/** RESET AND LAYOUT
===================================*/
.bx-wrapper {
Expand All @@ -32,7 +32,6 @@
/** THEME
===================================*/
.bx-wrapper {
-moz-box-shadow: 0 0 5px #ccc;
-webkit-box-shadow: 0 0 5px #ccc;
box-shadow: 0 0 5px #ccc;
border: 5px solid #fff;
Expand Down Expand Up @@ -72,8 +71,6 @@
height: 10px;
margin: 0 5px;
outline: 0;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
}
.bx-wrapper .bx-pager.bx-default-pager a:hover,
Expand Down
Loading

0 comments on commit 4cafbf8

Please sign in to comment.