Skip to content

Commit

Permalink
gulp & package.son changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ComputerWolf committed Apr 23, 2015
1 parent 932923c commit 1228653
Show file tree
Hide file tree
Showing 7 changed files with 103 additions and 16 deletions.
24 changes: 20 additions & 4 deletions dist/jquery.slicknav.js
@@ -1,8 +1,8 @@
/*!
SlickNav Responsive Mobile Menu v1.0.2
(c) 2015 Josh Cope
licensed under MIT
*/
* SlickNav Responsive Mobile Menu v1.0.2
* (c) 2015 [object Object]
* licensed under MIT
*/
;(function ($, document, window) {
var
// default settings object.
Expand All @@ -20,6 +20,8 @@
allowParentLinks: false,
nestedParentLinks: true,
showChildren: false,
removeIds: false,
removeClasses: false,
brand: '',
init: function () {},
open: function () {},
Expand Down Expand Up @@ -60,6 +62,20 @@
});
} else {
$this.mobileNav = menu;

// remove ids if set
$this.mobileNav.removeAttr('id');
$this.mobileNav.find('*').each(function (i, e) {
$(e).removeAttr('id');
});
}

// remove classes if set
if (settings.removeClasses) {
$this.mobileNav.removeAttr('class');
$this.mobileNav.find('*').each(function (i, e) {
$(e).removeAttr('class');
});
}

// styling class for the button
Expand Down
10 changes: 5 additions & 5 deletions dist/jquery.slicknav.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions dist/slicknav.css
@@ -1,3 +1,8 @@
/*!
* SlickNav Responsive Mobile Menu v1.0.2
* (c) 2015 [object Object]
* licensed under MIT
*/
.slicknav_btn {
position: relative;
display: block;
Expand Down
6 changes: 5 additions & 1 deletion dist/slicknav.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion gulpfile.js
@@ -1,12 +1,21 @@
var gulp = require('gulp'),
var pkg = require('./package.json'),
gulp = require('gulp'),
header = require('gulp-header'),
sass = require('gulp-ruby-sass'),
rename = require('gulp-rename'),
uglify = require('gulp-uglify'),
minify = require('gulp-minify-css');
banner = ['/*!',
' * SlickNav Responsive Mobile Menu v<%= pkg.version %>',
' * (c) <%= new Date().getFullYear() %> <%= pkg.author %>',
' * licensed under <%= pkg.licenses[0].type %>',
' */',
''].join('\n');

gulp.task('sass', function() {
return sass('scss/slicknav.scss')
.on('error', function(err) { console.error('Error!', err.message); })
.pipe(header(banner, { pkg : pkg } ))
.pipe(gulp.dest('dist'))
.pipe(minify({compatibility: 'ie8'}))
.pipe(rename({suffix: '.min'}))
Expand All @@ -19,6 +28,7 @@ gulp.task('watch', function() {

gulp.task('js', function() {
return gulp.src('jquery.slicknav.js')
.pipe(header(banner, { pkg : pkg } ))
.pipe(gulp.dest('dist'))
.pipe(uglify({preserveComments: 'some'}))
.pipe(rename({suffix: '.min'}))
Expand Down

0 comments on commit 1228653

Please sign in to comment.