mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-02-10 18:05:32 +08:00
[build] remove comments from source script
This commit is contained in:
@ -452,6 +452,9 @@ module.exports = function(grunt) {
|
||||
},
|
||||
|
||||
inline: {
|
||||
options: {
|
||||
uglify: true
|
||||
},
|
||||
dist: {
|
||||
src: '<%= pkg.main.copy.indexhtml[0].dest %>/*.html'
|
||||
}
|
||||
|
||||
@ -135,7 +135,15 @@ module.exports = function(grunt) {
|
||||
let c = rawstr;
|
||||
|
||||
if ( options.uglify ) {
|
||||
const uglstr = UglifyJS.minify(rawstr);
|
||||
const opts = {
|
||||
output: {
|
||||
comments: false,
|
||||
beautify: false,
|
||||
},
|
||||
mangle: false,
|
||||
compress: false,
|
||||
};
|
||||
const uglstr = UglifyJS.minify(rawstr, opts);
|
||||
if ( uglstr.error == undefined )
|
||||
c = uglstr.code;
|
||||
else grunt.log.error("uglify error " + uglstr.code);
|
||||
|
||||
Reference in New Issue
Block a user