forked from mrhorin/epcviewer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
71 lines (65 loc) · 1.65 KB
/
gulpfile.js
File metadata and controls
71 lines (65 loc) · 1.65 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
var gulp = require('gulp');
var plumber = require('gulp-plumber');
var pug = require("gulp-pug");
var del = require('del');
var packager = require('electron-packager');
var package = require("./package.json");
gulp.task('watch', function(){
gulp.watch(['src/pug/**/*.pug'], ['pug']);
});
// pugコンパイル
gulp.task('pug', function(cb){
gulp.src('src/pug/**/*.pug')
.pipe(plumber())
.pipe(pug({
pretty: true
}))
.pipe(gulp.dest('dist/html/'));
cb();
});
// distを空に
gulp.task('clean', function(cb) {
del(['dist', '**/*.log'], cb);
cb();
});
gulp.task('default', gulp.series('pug', function (cb) {
cb();
}));
// macOS用にパッケージ化
gulp.task('package:darwin', gulp.series('default', function (cb) {
packager({
dir: './',
out: 'release/darwin',
name: package["name"],
icon: "./src/img/darwin/icon_1024x1024.png.icns",
"app-version": package["version"],
"app-copyright": "Copyright (C) 2019 "+package["author"]+".",
arch: 'x64',
platform: 'darwin',
overwrite: true,
version: package['version'],
ignore: ['release']
}, function (err, path) {
cb();
});
cb();
}));
// // Linux用にパッケージ化
gulp.task('package:linux', gulp.series('default', function (cb) {
packager({
dir: './',
out: 'release/linux',
name: package["name"],
icon: "./src/img/darwin/icon_1024x1024.png.icns",
"app-version": package["version"],
"app-copyright": "Copyright (C) 2017 "+package["author"]+".",
arch: 'x64',
platform: 'linux',
overwrite: true,
version: package['version'],
ignore: ['release']
}, function (err, path) {
cb();
});
cb();
}));