1 Star 0 Fork 0

Solo / markdown

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
gulpfile.js 1.09 KB
一键复制 编辑 原始数据 按行查看 历史
Solo 提交于 2018-10-09 17:09 . nit commit
'use strict';
const fs = require('fs');
const gulp = require('gulp');
const packager = require('electron-packager');
const config = JSON.parse(fs.readFileSync('package.json'));
const appVersion = config.version;
const electronVersion = config.devDependencies['electron'].match(/[\d.]+/)[0];
const options = {
asar: true,
dir: '.',
icon: './app/img/markdownify.icns',
name: 'Markdownify',
out: 'dist',
overwrite: true,
prune: true,
version: electronVersion,
'app-version': appVersion
};
gulp.task('build:osx', (done) => {
options.arch = 'x64';
options.platform = 'darwin';
options['app-bundle-id'] = 'com.amitmerchant.markdownify';
options['helper-bundle-id'] = 'com.amitmerchant.markdownify.helper';
packager(options, (err, paths) => {
if (err) {
console.error(err);
}
done();
});
});
gulp.task('build:linux', () => {
// @TODO
});
gulp.task('build:windows', () => {
options.arch = 'x64';
options.platform = 'win32';
packager(options, (err, paths) => {
if (err) {
console.error(err);
}
done();
});
});
gulp.task('build', ['build:osx', 'build:linux', 'build:windows']);
1
https://gitee.com/geliang/markdown.git
git@gitee.com:geliang/markdown.git
geliang
markdown
markdown
master

搜索帮助