-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgulpfile.js
45 lines (39 loc) · 1.24 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
var gulp = require('gulp'),
less = require('gulp-less'),
browserify = require('gulp-browserify'),
concat = require('gulp-concat'),
notify = require('gulp-notify');
gulp.task('browserify', function() {
gulp.src('client/js/main.js')
.pipe(browserify({transform: 'reactify'}))
.pipe(concat('app.js'))
.pipe(gulp.dest('resources/public/js'))
.pipe(notify('Browserification Completed'));
});
gulp.task('build_sdk', function() {
gulp.src('client/js/sdk.js')
.pipe(browserify({transform: 'reactify'}))
.pipe(concat('sdk.js'))
.pipe(gulp.dest('resources/public/js'))
.pipe(notify('Built SDK'));
});
gulp.task('less', function () {
gulp.src('client/less/styles.less')
.pipe(less())
.pipe(gulp.dest('resources/public/css'))
.pipe(notify('Less files converted'));
});
gulp.task('images', function() {
gulp.src('client/images/**')
.pipe(gulp.dest('resources/public/images'))
.pipe(notify('copied images'))
});
gulp.task('fonts', function() {
gulp.src('node_modules/font-awesome/fonts/**')
.pipe(gulp.dest('resources/public/fonts'))
.pipe(notify('copied fonts'))
});
gulp.task('default', ['browserify', 'build_sdk', 'less', 'images', 'fonts']);
gulp.task('watch', function() {
gulp.watch('client/**/*', ['default']);
});