moved grunt stuff

This commit is contained in:
antelle 2019-01-06 14:32:31 +01:00
parent 8208bf1d04
commit e8088b232a
3 changed files with 130 additions and 132 deletions

View File

@ -567,136 +567,4 @@ module.exports = function(grunt) {
}
}
});
// compound builder tasks
grunt.registerTask('build-web-app', [
'gitinfo',
'clean',
'eslint',
'copy:html',
'copy:favicon',
'copy:icons',
'copy:manifest',
'copy:fonts',
'webpack',
'uglify',
'sass',
'postcss',
'inline',
'htmlmin',
'string-replace:manifest-html',
'string-replace:manifest',
'copy:dist-icons',
'copy:dist-manifest',
'sign-html'
]);
grunt.registerTask('build-desktop-app-content', [
'copy:desktop-app-content',
'string-replace:desktop-public-key',
'string-replace:desktop-html'
]);
grunt.registerTask('build-desktop-update', [
'copy:desktop-update',
'copy:desktop-update-helper',
'sign-desktop-files:desktop-update',
'compress:desktop-update',
'sign-archive:desktop-update',
'validate-desktop-update'
]);
grunt.registerTask('build-desktop-executables', [
'electron',
'sign-exe:win32-build-x64',
'sign-exe:win32-build-ia32',
'copy:desktop-darwin-helper-x64',
'copy:desktop-darwin-installer',
'copy:desktop-windows-helper-ia32',
'copy:desktop-windows-helper-x64',
'codesign:app'
]);
grunt.registerTask('build-desktop-archives', [
'compress:win32-x64',
'compress:win32-ia32',
'compress:linux-x64',
'compress:linux-ia32'
]);
grunt.registerTask('build-desktop-dist-darwin', [
'appdmg',
'codesign:dmg'
]);
grunt.registerTask('build-desktop-dist-win32', [
'nsis:win32-un-x64',
'nsis:win32-un-ia32',
'sign-exe:win32-uninst-x64',
'sign-exe:win32-uninst-ia32',
'nsis:win32-x64',
'nsis:win32-ia32',
'sign-exe:win32-installer-x64',
'sign-exe:win32-installer-ia32',
'copy:desktop-win32-dist-x64',
'copy:desktop-win32-dist-ia32'
]);
grunt.registerTask('build-desktop-dist-linux', [
'deb:linux-x64',
'deb:linux-ia32'
]);
grunt.registerTask('build-desktop-dist', [
'build-desktop-dist-darwin',
'build-desktop-dist-win32',
'build-desktop-dist-linux'
]);
grunt.registerTask('build-desktop', [
'gitinfo',
'clean:desktop',
'build-desktop-app-content',
'build-desktop-executables',
'build-desktop-update',
'build-desktop-archives',
'build-desktop-dist',
'sign-dist'
]);
grunt.registerTask('build-cordova-app-content', [
'string-replace:cordova-html'
]);
grunt.registerTask('build-cordova', [
'gitinfo',
'clean:cordova',
'build-cordova-app-content'
]);
// entry point tasks
grunt.registerTask('default', 'Default: build web app', [
'build-web-app'
]);
grunt.registerTask('dev', 'Build project and start web server and watcher', [
'build-web-app',
'devsrv'
]);
grunt.registerTask('devsrv', 'Start web server and watcher', [
'concurrent:dev-server'
]);
grunt.registerTask('desktop', 'Build web and desktop apps for all platforms', [
'default',
'build-desktop'
]);
grunt.registerTask('cordova', 'Build cordova app', [
'default',
'build-cordova'
]);
};

25
grunt.entrypoints.js Normal file
View File

@ -0,0 +1,25 @@
module.exports = function(grunt) {
grunt.registerTask('default', 'Default: build web app', [
'build-web-app',
'sign-html'
]);
grunt.registerTask('dev', 'Build project and start web server and watcher', [
'build-web-app',
'devsrv'
]);
grunt.registerTask('devsrv', 'Start web server and watcher', [
'concurrent:dev-server'
]);
grunt.registerTask('desktop', 'Build web and desktop apps for all platforms', [
'default',
'build-desktop'
]);
grunt.registerTask('cordova', 'Build cordova app', [
'default',
'build-cordova'
]);
};

105
grunt.tasks.js Normal file
View File

@ -0,0 +1,105 @@
module.exports = function(grunt) {
grunt.registerTask('build-web-app', [
'gitinfo',
'clean',
'eslint',
'copy:html',
'copy:favicon',
'copy:icons',
'copy:manifest',
'copy:fonts',
'webpack',
'uglify',
'sass',
'postcss',
'inline',
'htmlmin',
'string-replace:manifest-html',
'string-replace:manifest',
'copy:dist-icons',
'copy:dist-manifest'
]);
grunt.registerTask('build-desktop-app-content', [
'copy:desktop-app-content',
'string-replace:desktop-public-key',
'string-replace:desktop-html'
]);
grunt.registerTask('build-desktop-update', [
'copy:desktop-update',
'copy:desktop-update-helper',
'sign-desktop-files:desktop-update',
'compress:desktop-update',
'sign-archive:desktop-update',
'validate-desktop-update'
]);
grunt.registerTask('build-desktop-executables', [
'electron',
'sign-exe:win32-build-x64',
'sign-exe:win32-build-ia32',
'copy:desktop-darwin-helper-x64',
'copy:desktop-darwin-installer',
'copy:desktop-windows-helper-ia32',
'copy:desktop-windows-helper-x64',
'codesign:app'
]);
grunt.registerTask('build-desktop-archives', [
'compress:win32-x64',
'compress:win32-ia32',
'compress:linux-x64',
'compress:linux-ia32'
]);
grunt.registerTask('build-desktop-dist-darwin', [
'appdmg',
'codesign:dmg'
]);
grunt.registerTask('build-desktop-dist-win32', [
'nsis:win32-un-x64',
'nsis:win32-un-ia32',
'sign-exe:win32-uninst-x64',
'sign-exe:win32-uninst-ia32',
'nsis:win32-x64',
'nsis:win32-ia32',
'sign-exe:win32-installer-x64',
'sign-exe:win32-installer-ia32',
'copy:desktop-win32-dist-x64',
'copy:desktop-win32-dist-ia32'
]);
grunt.registerTask('build-desktop-dist-linux', [
'deb:linux-x64',
'deb:linux-ia32'
]);
grunt.registerTask('build-desktop-dist', [
'build-desktop-dist-darwin',
'build-desktop-dist-win32',
'build-desktop-dist-linux'
]);
grunt.registerTask('build-desktop', [
'gitinfo',
'clean:desktop',
'build-desktop-app-content',
'build-desktop-executables',
'build-desktop-update',
'build-desktop-archives',
'build-desktop-dist',
'sign-dist'
]);
grunt.registerTask('build-cordova-app-content', [
'string-replace:cordova-html'
]);
grunt.registerTask('build-cordova', [
'gitinfo',
'clean:cordova',
'build-cordova-app-content'
]);
};