2020-05-02 19:54:47 +02:00
|
|
|
// prettier-ignore
|
|
|
|
|
2019-01-06 14:32:31 +01:00
|
|
|
module.exports = function(grunt) {
|
|
|
|
grunt.registerTask('default', 'Default: build web app', [
|
2019-09-23 20:32:56 +02:00
|
|
|
'build-web-app'
|
2019-01-06 14:32:31 +01:00
|
|
|
]);
|
|
|
|
|
|
|
|
grunt.registerTask('dev', 'Build project and start web server and watcher', [
|
|
|
|
'build-web-app',
|
|
|
|
'devsrv'
|
|
|
|
]);
|
|
|
|
|
|
|
|
grunt.registerTask('devsrv', 'Start web server and watcher', [
|
2019-08-16 18:45:11 +02:00
|
|
|
'webpack-dev-server'
|
2019-01-06 14:32:31 +01:00
|
|
|
]);
|
|
|
|
|
|
|
|
grunt.registerTask('desktop', 'Build web and desktop apps for all platforms', [
|
2019-10-12 14:22:39 +02:00
|
|
|
'test',
|
2019-01-06 14:32:31 +01:00
|
|
|
'default',
|
|
|
|
'build-desktop'
|
|
|
|
]);
|
|
|
|
|
2020-04-04 10:52:53 +02:00
|
|
|
grunt.registerTask('desktop-linux', 'Build desktop apps on linux', [
|
|
|
|
'clean:desktop',
|
|
|
|
'build-desktop-app-content',
|
|
|
|
'build-desktop-executables-linux',
|
|
|
|
'build-desktop-archives-linux',
|
|
|
|
'build-desktop-dist-linux'
|
|
|
|
]);
|
|
|
|
|
2020-04-04 20:07:26 +02:00
|
|
|
grunt.registerTask('desktop-darwin', 'Build desktop apps on macos', [
|
|
|
|
'clean:desktop',
|
|
|
|
'build-desktop-app-content',
|
|
|
|
'build-desktop-executables-darwin',
|
|
|
|
'build-desktop-dist-darwin'
|
|
|
|
]);
|
|
|
|
|
2020-04-04 21:15:07 +02:00
|
|
|
grunt.registerTask('desktop-win32', 'Build desktop apps on windows', [
|
|
|
|
'clean:desktop',
|
|
|
|
'build-desktop-app-content',
|
|
|
|
'build-desktop-executables-win32',
|
|
|
|
'build-desktop-archives-win32',
|
|
|
|
'build-desktop-dist-win32'
|
|
|
|
]);
|
|
|
|
|
2020-04-08 08:02:59 +02:00
|
|
|
grunt.registerTask('finish-release', 'Complete the release started with desktop-*', [
|
|
|
|
'sign-dist'
|
|
|
|
]);
|
|
|
|
|
2020-05-14 20:11:41 +02:00
|
|
|
grunt.registerTask('dev-desktop-darwin', 'Build a macOS app in dev environment', [
|
|
|
|
'default',
|
|
|
|
'build-desktop-app-content',
|
2020-11-30 20:52:09 +01:00
|
|
|
'electron:darwin-x64',
|
2021-02-06 14:46:24 +01:00
|
|
|
'electron-patch:darwin-x64',
|
2021-01-10 11:55:00 +01:00
|
|
|
'build-darwin-installer',
|
2020-11-30 20:52:09 +01:00
|
|
|
'copy:desktop-darwin-installer-helper-x64',
|
2021-04-13 22:39:07 +02:00
|
|
|
'copy:native-modules-darwin-x64',
|
2021-04-20 17:07:50 +02:00
|
|
|
'copy:native-messaging-host-darwin-x64'
|
2020-05-14 20:11:41 +02:00
|
|
|
]);
|
|
|
|
|
2021-01-10 11:55:00 +01:00
|
|
|
grunt.registerTask('dev-desktop-darwin-signed', 'Build a signed macOS app in dev environment', [
|
|
|
|
'dev-desktop-darwin',
|
|
|
|
'osx-sign:desktop-x64'
|
|
|
|
]);
|
|
|
|
|
2020-05-15 21:38:33 +02:00
|
|
|
grunt.registerTask('dev-desktop-win32', 'Build a Windows app in dev environment', [
|
|
|
|
'default',
|
|
|
|
'build-desktop-app-content',
|
|
|
|
'electron:win32-x64',
|
2021-04-13 22:39:07 +02:00
|
|
|
'copy:native-modules-win32-x64',
|
2021-04-20 17:07:50 +02:00
|
|
|
'copy:native-messaging-host-win32-x64'
|
2020-05-15 21:38:33 +02:00
|
|
|
]);
|
|
|
|
|
|
|
|
grunt.registerTask('dev-desktop-linux', 'Build a Linux app in dev environment', [
|
|
|
|
'default',
|
|
|
|
'build-desktop-app-content',
|
|
|
|
'electron:linux',
|
2020-06-02 13:58:25 +02:00
|
|
|
'chmod:linux-desktop-x64',
|
2021-04-13 22:39:07 +02:00
|
|
|
'copy:native-modules-linux-x64',
|
2021-04-20 17:07:50 +02:00
|
|
|
'copy:native-messaging-host-linux-x64'
|
2020-05-15 21:38:33 +02:00
|
|
|
]);
|
2020-11-29 17:10:56 +01:00
|
|
|
|
2019-10-12 13:24:37 +02:00
|
|
|
grunt.registerTask('test', 'Build and run tests', [
|
2019-10-12 14:22:39 +02:00
|
|
|
'build-test',
|
|
|
|
'run-test'
|
2019-10-12 13:24:37 +02:00
|
|
|
]);
|
2019-01-06 14:32:31 +01:00
|
|
|
};
|