代码拉取完成,页面将自动刷新
'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']);
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。