Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

Commit

Permalink
updated dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
DavideTriso committed Oct 22, 2018
1 parent 449fb44 commit fdc5bff
Show file tree
Hide file tree
Showing 5 changed files with 4,152 additions and 1,559 deletions.
2 changes: 1 addition & 1 deletion dist/aria-tabs.min.css

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

2 changes: 1 addition & 1 deletion dist/aria-tabs.min.js

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

91 changes: 24 additions & 67 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,106 +8,63 @@ var gulp = require('gulp'),
concat = require('gulp-concat'),
notify = require('gulp-notify');


//SCSS -> CSS
//Compile SCSS and save compiled + minified CSS file to 'dist' folder
gulp.task('scssDist', function () {
return sass('src/scss/*.scss', {
style: 'expanded'
})
.pipe(autoprefixer('last 5 version'))
.pipe(gulp.dest('dist'))
.pipe(rename({
suffix: '.min'
}))
.pipe(cssnano())
.pipe(gulp.dest('dist'))
.pipe(notify({
message: 'scssDist task complete'
}));
gulp.task('scssDist', function (done) {
sass('src/scss/*.scss', { style: 'expanded' }).pipe(autoprefixer('last 5 version')).pipe(gulp.dest('dist')).pipe(rename({ suffix: '.min' })).pipe(cssnano()).pipe(gulp.dest('dist')).pipe(notify({ message: 'scssDist task complete' }));
done();
});

//Save a copy of compiled CSS in 'docs' folder
gulp.task('scssDocs', function () {
return sass('src/scss/*.scss', {
style: 'expanded'
})
.pipe(autoprefixer('last 5 version'))
.pipe(gulp.dest('docs'))
.pipe(rename({
suffix: '.min'
}))
.pipe(notify({
message: 'scssDocs task complete'
}));
gulp.task('scssDocs', function (done) {
sass('src/scss/*.scss', { style: 'expanded' }).pipe(autoprefixer('last 5 version')).pipe(gulp.dest('docs')).pipe(rename({ suffix: '.min' })).pipe(notify({ message: 'scssDocs task complete' }));
done();
});

//Task alias
gulp.task('scss', ['scssDist', 'scssDocs']);

gulp.task('scss', gulp.parallel('scssDist', 'scssDocs'));

//JS -> JS + MIN.JS
//Put a copy and a minified version of JS file in 'dist' folder
gulp.task('jsDist', function () {
gulp.src('src/js/*.js')
.pipe(gulp.dest('dist'))
.pipe(rename({
suffix: '.min'
}))
.pipe(uglify())
.pipe(gulp.dest('dist'))
.pipe(notify({
message: 'jsDist task complete'
}));
gulp.task('jsDist', function (done) {
gulp.src('src/js/*.js').pipe(gulp.dest('dist')).pipe(rename({ suffix: '.min' })).pipe(uglify()).pipe(gulp.dest('dist')).pipe(notify({ message: 'jsDist task complete' }));
done();
});

//Put a copy of JS file in 'docs' folder
gulp.task('jsDocs', function () {
gulp.src('src/js/*.js')
.pipe(gulp.dest('docs'))
.pipe(notify({
message: 'jsDocs task complete'
}));
gulp.task('jsDocs', function (done) {
gulp.src('src/js/*.js').pipe(gulp.dest('docs')).pipe(notify({ message: 'jsDocs task complete' }));
done();
});

//Task alias
gulp.task('js', ['jsDist', 'jsDocs']);


gulp.task('js', gulp.parallel('jsDist', 'jsDocs'));

//HTML -> HTML
//Put a copy of HTML file to 'dist' folder
gulp.task('htmlDist', function () {
gulp.src('src/html/*.html')
.pipe(gulp.dest('dist'))
.pipe(notify({
message: 'htmlDist task complete'
}));
gulp.task('htmlDist', function (done) {
gulp.src('src/html/*.html').pipe(gulp.dest('dist')).pipe(notify({ message: 'htmlDist task complete' }));
done();
});


gulp.task('html', ['htmlDist']);


gulp.task('html', gulp.parallel('htmlDist'));

//WATCH TASKS

gulp.task('watchScss', function () {
gulp.watch('src/scss/*.scss', ['scss']);
gulp.watch('src/scss/**/*.scss', gulp.parallel('scss'));
});


gulp.task('watchJS', function () {
gulp.watch('src/js/*.js', ['js']);
gulp.watch('src/js/*.js', gulp.parallel('js'));
});

gulp.task('watchHTML', function () {
gulp.watch('src/html/*.html', ['html']);
gulp.watch('src/html/*.html', gulp.parallel('html'));
});


gulp.task('watchAll', function () {
gulp.watch('src/js/*.js', ['js']);
gulp.watch('src/scss/**/*.scss', ['scss']);
gulp.watch('src/html/*.html', ['html']);
gulp.watch('src/js/*.js', gulp.parallel('js'));
gulp.watch('src/scss/**/*.scss', gulp.parallel('scss'));
gulp.watch('src/html/*.html', gulp.parallel('html'));
});
Loading

0 comments on commit fdc5bff

Please sign in to comment.