Skip to content

Commit

Permalink
Added gulp.js build
Browse files Browse the repository at this point in the history
  • Loading branch information
Rainer Simon committed Sep 19, 2017
1 parent 1d21c58 commit ce11500
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist
node_modules
30 changes: 30 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
var gulp = require('gulp'),
concat = require('gulp-concat'),
rename = require('gulp-rename'),
uglify = require('gulp-uglify'),
cleanCSS = require('gulp-clean-css'),
es = require('event-stream');

var src = 'src/**/*.js',
dest = 'dist';

gulp.task('scripts', function() {
var js = gulp.src(src)
.pipe(concat('timerange-selector.js'))
.pipe(gulp.dest('dist'))
.pipe(rename('timerange-selector.min.js'))
.pipe(uglify())
.pipe(gulp.dest('dist'));

var font = gulp.src('src/griphandle.ttf')
.pipe(gulp.dest('dist'));

var css = gulp.src('src/timerange-selector.css')
.pipe(cleanCSS())
.pipe(rename('timerange-selector.min.css'))
.pipe(gulp.dest('dist'));

return es.concat(js, font, css);
});

gulp.task('default', ['scripts'], function() {});

0 comments on commit ce11500

Please sign in to comment.