This repository was archived by the owner on Sep 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgulpfile.js
More file actions
53 lines (41 loc) · 1.38 KB
/
Copy pathgulpfile.js
File metadata and controls
53 lines (41 loc) · 1.38 KB
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')
gulp.task('js', function () {
var react = require('gulp-react')
return gulp.src('src/**/*.js')
.pipe(react())
.pipe(gulp.dest('js'))
})
gulp.task('clean', function () {
var del = require('del')
return del.sync(['build', 'js'])
})
gulp.task('build', ['js'], function () {
var filesToMove = [
'js/**/*.js',
'css/**/*.css',
'*.json',
'*.html'
]
return gulp.src(filesToMove, { base : './' })
.pipe(gulp.dest('build'))
})
gulp.task('blabla', function () {
var gutil = require('gulp-util')
, chalk = require('chalk')
gutil.log([
chalk.blue('Howdy mate o/'),
"This here is taking care of handling and compiling your react stuff, and all",
"The only thing you have to handle manually (because I haven't found out how to do otherwise)",
"is run the node app yourself by using : ",
chalk.red("nodewebkit build"),
"Come on, give it a try (and keep this running)",
'',
chalk.bgBlue.gray("Protip :") + ' you can simply use the reload button on nodewebkit to enjoy the modifs :)'
].join("\n"))
return gulp.src('')
pipe(gutil.noop())
})
gulp.task('dev', ['clean', 'blabla', 'build'], function () {
gulp.watch(['src/**/*.js', 'css/**/*.css', '*.html', '*.json'], ['lr'])
})
gulp.task('default', ['dev'])