Commit fb8394b2 authored by Tasso Evangelista's avatar Tasso Evangelista

Update gulp

parent 042a3508
{
"Test": "http://localhost:3000"
}
import { expect } from 'chai';
import { describe, it } from 'mocha';
import { getAppIconPath, getTrayIconPath, getAppIconImage, getTrayIconImage } from './icon';
const { describe, it } = global;
describe('icon', () => {
......
/* eslint-env node, mocha */
import { Menu } from 'electron';
import { expect } from 'chai';
import { Menu } from 'electron';
import sinon from 'sinon';
import menus from './menus';
const { beforeEach, describe, it } = global;
describe('menus', () => {
let menu;
......
......@@ -28,7 +28,7 @@ gulp.task('less', () => gulp.src('src/stylesheets/main.less')
.pipe(less())
.pipe(gulp.dest('app/stylesheets')));
gulp.task('build-app', ['public', 'i18n', 'bundle', 'less']);
gulp.task('build-app', gulp.series('public', 'i18n', 'bundle', 'less'));
gulp.task('watch', () => {
const run = (taskName) => batch((event, done) => gulp.start(taskName, done));
......@@ -39,16 +39,16 @@ gulp.task('watch', () => {
watch('src/**/*.less', run('less'));
});
gulp.task('build-unit-tests', ['build-app'], async() => {
gulp.task('build-unit-tests', gulp.series('build-app', async() => {
await bundle.many('src', 'background/*.spec.js', 'app/main.specs.js', { env });
await bundle.many('src', ['*.spec.js', '!background/*.spec.js'], 'app/renderer.specs.js', { env });
});
}));
gulp.task('build-coverage-tests', ['build-app'], async() => {
gulp.task('build-coverage-tests', gulp.series('build-app', async() => {
await bundle.many('src', 'background/*.spec.js', 'app/main.specs.js', { coverage: true, env });
await bundle.many('src', ['*.spec.js', '!background/*.spec.js'], 'app/renderer.specs.js', { coverage: true, env });
});
}));
gulp.task('build-e2e-tests', ['build-app'], async() => {
gulp.task('build-e2e-tests', gulp.series('build-app', async() => {
await bundle.many('src', '*.e2e.js', 'app/e2e.js', { env });
});
}));
const { build } = require('electron-builder');
const gulp = require('gulp');
const minimist = require('minimist');
const runSequence = require('run-sequence');
const config = require('../electron-builder.json');
const { env } = minimist(process.argv, { default: { env: 'development' } });
......@@ -15,4 +14,4 @@ gulp.task('release:linux', async() => {
await build({ publish, ia32: true, linux: allLinuxTargetsButSnap, c: { productName: 'rocketchat' } });
});
gulp.task('release', (cb) => runSequence('build-app', `release:${ process.platform }`, cb));
gulp.task('release', gulp.series('build-app', `release:${ process.platform }`));
'use strict';
const gulp = require('gulp');
const childProcess = require('child_process');
const electron = require('electron');
gulp.task('start', ['build-app', 'watch'], () => {
childProcess.spawn(electron, ['.'], { stdio: 'inherit' })
.on('close', () => process.exit());
});
const spawnElectron = () => (
childProcess
.spawn(electron, ['.'], { stdio: 'inherit' })
.on('close', spawnElectron)
);
gulp.task('start', gulp.parallel('watch', gulp.series('build-app', spawnElectron)));
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment