-
Notifications
You must be signed in to change notification settings - Fork 2
/
gulpfile.js
45 lines (40 loc) · 1017 Bytes
/
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
const gulp = require('gulp');
const merge = require('gulp-merge-json');
const json5 = require('gulp-json5-to-json');
gulp.task('default', () => { });
gulp.task('compile-go', () => {
gulp.src('./src/go/*.json5')
.pipe(merge({
fileName: "go.tmLanguage.json",
json5: true,
}))
.pipe(json5({
beautify: true,
}))
.pipe(gulp.dest('./syntaxes'));
});
gulp.task('compile-gotemplate', () => {
gulp.src('./src/gotemplate/*.json5')
.pipe(merge({
fileName: "gotemplate.tmLanguage.json",
json5: true,
}))
.pipe(json5({
beautify: true,
}))
.pipe(gulp.dest('./syntaxes'));
});
gulp.task('compile-gohtml', () => {
gulp.src('./src/gohtml/*.json5')
.pipe(merge({
fileName: "gohtml.tmLanguage.json",
json5: true,
}))
.pipe(json5({
beautify: true,
}))
.pipe(gulp.dest('./syntaxes'));
});
gulp.task('watch', () => {
gulp.watch('./src/**/*.json5', [ 'compile-go', 'compile-gohtml', 'compile-gotemplate' ]);
});