Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 26 additions & 10 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,17 +111,33 @@ module.exports = function (grunt) {
}
},

zip: {
compress: {
images: {
src: ['images/**'],
dest: 'build/dist/images.zip',
compression: 'DEFLATE'
options: {
archive: 'build/dist/images.zip',
mode: 'zip',
level: 9
Copy link

Copilot AI Jul 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Using the maximum compression level (9) can slow down build times; consider using a lower level or the default setting if ultra-high compression isn’t required.

Suggested change
level: 9
level: 6

Copilot uses AI. Check for mistakes.
},
files: [
{
expand: true,
src: ['images/**']
Copy link

Copilot AI Jul 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] For consistency with the dist task and to ensure a predictable folder structure inside the archive, consider adding cwd: 'images' and changing src to ['**'] under the images files block.

Suggested change
src: ['images/**']
cwd: 'images',
src: ['**']

Copilot uses AI. Check for mistakes.
}
]
},
dist: {
cwd: 'build/dist',
src: ['build/dist/**'],
dest: 'build/WebWorldWind-Distribution-<%= pkg.version %>.zip',
compression: 'DEFLATE'
options: {
archive: 'build/WebWorldWind-Distribution-<%= pkg.version %>.zip',
mode: 'zip',
level: 9
},
files: [
{
expand: true,
cwd: 'build/dist',
src: ['**/*']
}
]
}
}
});
Expand All @@ -131,7 +147,7 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-requirejs');
grunt.loadNpmTasks('grunt-jsdoc');
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-zip');
grunt.loadNpmTasks('grunt-contrib-compress');

grunt.registerTask('default', ['clean', 'karma', 'jsdoc', 'requirejs', 'copy', 'zip']);
grunt.registerTask('default', ['clean', 'karma', 'jsdoc', 'requirejs', 'copy', 'compress']);
};
Loading