Skip to content
Snippets Groups Projects
Commit ddaaa356 authored by David Miller's avatar David Miller
Browse files

gulpfile cleanup and semantic version update

parent d1a74f2f
No related branches found
No related tags found
No related merge requests found
// Assigning modules to local variables
var gulp = require('gulp');
var less = require('gulp-less');
var browserSync = require('browser-sync').create();
......@@ -17,10 +16,7 @@ var banner = ['/*!\n',
''
].join('');
// Default task
gulp.task('default', ['less', 'minify-css', 'minify-js', 'copy']);
// Less task to compile the less files and add the banner
// Compile LESS files from /less into /css
gulp.task('less', function() {
return gulp.src('less/freelancer.less')
.pipe(less())
......@@ -31,7 +27,7 @@ gulp.task('less', function() {
}))
});
// Minify CSS
// Minify compiled CSS
gulp.task('minify-css', ['less'], function() {
return gulp.src('css/freelancer.css')
.pipe(cleanCSS({ compatibility: 'ie8' }))
......@@ -54,21 +50,15 @@ gulp.task('minify-js', function() {
}))
});
// Copy Bootstrap core files from node_modules to vendor directory
gulp.task('bootstrap', function() {
return gulp.src(['node_modules/bootstrap/dist/**/*', '!**/npm.js', '!**/bootstrap-theme.*', '!**/*.map'])
// Copy vendor libraries from /node_modules into /vendor
gulp.task('copy', function() {
gulp.src(['node_modules/bootstrap/dist/**/*', '!**/npm.js', '!**/bootstrap-theme.*', '!**/*.map'])
.pipe(gulp.dest('vendor/bootstrap'))
})
// Copy jQuery core files from node_modules to vendor directory
gulp.task('jquery', function() {
return gulp.src(['node_modules/jquery/dist/jquery.js', 'node_modules/jquery/dist/jquery.min.js'])
gulp.src(['node_modules/jquery/dist/jquery.js', 'node_modules/jquery/dist/jquery.min.js'])
.pipe(gulp.dest('vendor/jquery'))
})
// Copy Font Awesome core files from node_modules to vendor directory
gulp.task('fontawesome', function() {
return gulp.src([
gulp.src([
'node_modules/font-awesome/**',
'!node_modules/font-awesome/**/*.map',
'!node_modules/font-awesome/.npmignore',
......@@ -79,8 +69,8 @@ gulp.task('fontawesome', function() {
.pipe(gulp.dest('vendor/font-awesome'))
})
// Copy all third party dependencies from node_modules to vendor directory
gulp.task('copy', ['bootstrap', 'jquery', 'fontawesome']);
// Run everything
gulp.task('default', ['less', 'minify-css', 'minify-js', 'copy']);
// Configure the browserSync task
gulp.task('browserSync', function() {
......@@ -91,7 +81,7 @@ gulp.task('browserSync', function() {
})
})
// Watch Task that compiles LESS and watches for HTML or JS changes and reloads with browserSync
// Dev task with browserSync
gulp.task('dev', ['browserSync', 'less', 'minify-css', 'minify-js'], function() {
gulp.watch('less/*.less', ['less']);
gulp.watch('css/*.css', ['minify-css']);
......
......@@ -19,8 +19,8 @@
});
// Closes the Responsive Menu on Menu Item Click
$('.navbar-collapse ul li a:not(.dropdown-toggle)').click(function() {
$('.navbar-toggle:visible').click();
$('.navbar-collapse ul li a').click(function(){
$('.navbar-toggle:visible').click();
});
// Offset for Main Navigation
......
......@@ -3,4 +3,4 @@
* Copyright 2013-2016 Start Bootstrap
* Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap/blob/gh-pages/LICENSE)
*/
!function(o){"use strict";o(".page-scroll a").bind("click",function(t){var l=o(this);o("html, body").stop().animate({scrollTop:o(l.attr("href")).offset().top-50},1250,"easeInOutExpo"),t.preventDefault()}),o("body").scrollspy({target:".navbar-fixed-top",offset:51}),o(".navbar-collapse ul li a:not(.dropdown-toggle)").click(function(){o(".navbar-toggle:visible").click()}),o("#mainNav").affix({offset:{top:100}}),o(function(){o("body").on("input propertychange",".floating-label-form-group",function(t){o(this).toggleClass("floating-label-form-group-with-value",!!o(t.target).val())}).on("focus",".floating-label-form-group",function(){o(this).addClass("floating-label-form-group-with-focus")}).on("blur",".floating-label-form-group",function(){o(this).removeClass("floating-label-form-group-with-focus")})})}(jQuery);
\ No newline at end of file
!function(o){"use strict";o(".page-scroll a").bind("click",function(t){var l=o(this);o("html, body").stop().animate({scrollTop:o(l.attr("href")).offset().top-50},1250,"easeInOutExpo"),t.preventDefault()}),o("body").scrollspy({target:".navbar-fixed-top",offset:51}),o(".navbar-collapse ul li a").click(function(){o(".navbar-toggle:visible").click()}),o("#mainNav").affix({offset:{top:100}}),o(function(){o("body").on("input propertychange",".floating-label-form-group",function(t){o(this).toggleClass("floating-label-form-group-with-value",!!o(t.target).val())}).on("focus",".floating-label-form-group",function(){o(this).addClass("floating-label-form-group-with-focus")}).on("blur",".floating-label-form-group",function(){o(this).removeClass("floating-label-form-group-with-focus")})})}(jQuery);
\ No newline at end of file
{
"name": "freelancer",
"title": "Freelancer",
"version": "1.1.1",
"version": "3.3.7",
"homepage": "http://startbootstrap.com/template-overviews/freelancer",
"author": "Start Bootstrap",
"license": {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment