-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
53 lines (47 loc) · 1.3 KB
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
var gulp = require('gulp');
var sass = require('gulp-sass');
var minifyCSS = require('gulp-css');
var sourcemaps = require('gulp-sourcemaps');
var babel = require('gulp-babel');
var uglify = require('gulp-uglify');
var concat = require('gulp-concat');
gulp.task('css', function() {
return gulp.src('etherep/src/scss/etherep.scss')
.pipe(sass({
includePaths: ['node_modules']
}))
.pipe(minifyCSS())
.pipe(gulp.dest('etherep/dist/css'))
});
gulp.task('deps', () => {
return gulp.src([
'node_modules/web3/dist/web3.min.js',
'node_modules/mustache/mustache.js',
'node_modules/identicon.js/identicon.js',
])
.pipe(gulp.dest('etherep/dist/js'));
});
gulp.task('images', () => {
return gulp.src('etherep/src/images/*.{gif,jpg,svg,png}')
.pipe(gulp.dest('etherep/dist/images'));
});
gulp.task('js', () => {
return gulp.src([
'node_modules/page/page.js',
'etherep/src/js/*.js'
])
.pipe(sourcemaps.init())
.pipe(babel({
presets: ['es2015']
}))
.pipe(concat('etherep.js'))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('etherep/dist/js'));
});
gulp.task('html', () => {
gulp.src([
'etherep/src/templates/index.html'
])
.pipe(gulp.dest('etherep/dist/'))
});
gulp.task('default', [ 'css', 'deps', 'js', 'images', 'html' ]);