-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
62 lines (50 loc) · 1.61 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
54
55
56
57
58
59
60
61
62
var gulp = require('gulp')
var gutil = require('gulp-util')
var exec = require('child_process').exec
// TODO reduce the deps by removing nix-shell and js/gulp and leave only python
// TODO reduce the deps by removing nix-shell and js/gulp and leave only python
// TODO reduce the deps by removing nix-shell and js/gulp and leave only python
// https://www.npmjs.com/package/multispinner
// TODO gaze.js error
// By default, the maximum number of files that Mac OS X can open is set to 12,288 and the maximum number of files a given process can open is 10,240
//
// # On RHEL
// sudo vim /etc/sysctl.conf
// fs.inotify.max_user_watches=65536 # up from 16384
// sudo sysctl --system
//
// # Didn't try these. If increasing user_watch doesnt work try these.
// kern.maxfiles=20480
// kern.maxfilesperproc=24576
gulp.task('clear_terminal', function () {
process.stdout.write('\033c')
})
// Compile Our Dotfiles
gulp.task('bootstrap', function (cb) {
gulp.start('clear_terminal')
exec('sh bootstrap/bootstrap.sh', function (err, stdout, stderr) {
console.log(stdout)
console.log(stderr)
cb(err)
})
})
// Watch Files For Changes
// Template filenames must match end with *.tpl
gulp.task('watch', function () {
// Run once at start.
gulp.start('bootstrap')
const watchedDirs = [
'**/*.tpl',
'shell/**',
'!.git/*',
'!build/**',
'!**/*.md',
'!**/*.txt'
]
gulp.watch(watchedDirs, ['bootstrap'])
// gulp.watch('./**/*', gulp.parallel('concat', 'uglify'));
// gulp.watch('js/*.js', ['lint', 'scripts']);
})
gutil.log('Gulp is running!')
// Default Task
gulp.task('default', ['watch'])