Skip to content

Commit

Permalink
decafeeinate
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-t committed Nov 21, 2018
1 parent f2c9c3d commit 7b4facb
Show file tree
Hide file tree
Showing 5 changed files with 699 additions and 689 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
node_modules
test/test.chocolat.js
66 changes: 0 additions & 66 deletions gulpfile.coffee

This file was deleted.

60 changes: 60 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
const gulp = require('gulp');
const gutil = require('gulp-util');
const rename = require('gulp-rename');
const uglify = require('gulp-uglify');
const bump = require('gulp-bump');
const mochaPhantomJS = require('gulp-mocha-phantomjs');

gulp.task('testing', () =>
gulp.src('./test/index.html')
.pipe(mochaPhantomJS())
);

gulp.task('build-js', () =>
gulp.src('./src/js/jquery.chocolat.js')
.pipe(gulp.dest('./dist/js/'))
.pipe(rename('jquery.chocolat.min.js'))
.pipe(uglify())
.pipe(gulp.dest('./dist/js/'))
);

gulp.task('build-css', () =>
gulp.src('./src/css/chocolat.css')
.pipe(gulp.dest('./dist/css/'))
);

gulp.task('build-images', () =>
gulp.src('./src/images/*')
.pipe(gulp.dest('./dist/images/'))
);

gulp.task('lint', () =>
gulp.src('./src/js/jquery.chocolat.js')
.pipe(jshint())
.pipe(jshint.reporter('default'))
);

gulp.task('bump', () =>
gulp.src(['./package.json', './bower.json'])
.pipe(bump())
.pipe(gulp.dest('./'))
);

gulp.task('watch-test',() => gulp.watch(['./test/*.js', './src/js/*.js', './src/css/*.css'], ['test']));

gulp.task('watch-src',() => gulp.watch(['./src/js/*.js', './src/css/*.css'], ['build-js', 'build-css']));

gulp.task('test', [
'build',
'testing',
'watch-test'
]);
gulp.task('build', [
'build-js',
'build-css',
'build-images'
]);
gulp.task('default', [
'build',
'watch-src'
]);
Loading

0 comments on commit 7b4facb

Please sign in to comment.