summaryrefslogtreecommitdiff
path: root/searx/static/themes/simple/gruntfile.js
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarIT.de>2021-11-15 16:02:05 +0100
committerGitHub <noreply@github.com>2021-11-15 16:02:05 +0100
commit56c61ba734904981385418e06ce0abd3014ccccd (patch)
tree9450a9f5e034dedd1c84da1775662d5f4bb6f311 /searx/static/themes/simple/gruntfile.js
parentc6dcedb911b0fc3c0982fcf8294a19389e5a2ac9 (diff)
parent3c05530518dcc4f64724c1173a90f17d07030a09 (diff)
Merge pull request #503 from return42/fix-svg
[fix] ] Optimize SVG for WEB usage / CSP 'style-src self'
Diffstat (limited to 'searx/static/themes/simple/gruntfile.js')
-rw-r--r--searx/static/themes/simple/gruntfile.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/searx/static/themes/simple/gruntfile.js b/searx/static/themes/simple/gruntfile.js
index f1ece95c5..f85f92a13 100644
--- a/searx/static/themes/simple/gruntfile.js
+++ b/searx/static/themes/simple/gruntfile.js
@@ -9,7 +9,7 @@ module.exports = function(grunt) {
watch: {
scripts: {
files: ['gruntfile.js', 'src/**'],
- tasks: ['eslint', 'copy', 'concat', 'svg2jinja', 'uglify', 'htmlmin', 'less:development', 'less:production']
+ tasks: ['eslint', 'copy', 'concat', 'svg2jinja', 'uglify', 'image', 'less:development', 'less:production']
}
},
eslint: {
@@ -18,6 +18,7 @@ module.exports = function(grunt) {
failOnError: false
},
target: [
+ 'svg4web.svgo.js',
'src/js/main/*.js',
'src/js/head/*.js',
'../__common__/js/*.js'
@@ -95,11 +96,10 @@ module.exports = function(grunt) {
}
}
},
- htmlmin: {
- dist: {
+ image: {
+ svg4web: {
options: {
- removeComments: true,
- collapseWhitespace: true
+ svgo: ['--config', 'svg4web.svgo.js']
},
files: {
'../../../templates/__common__/searxng-wordmark.min.svg': 'src/svg/searxng-wordmark.svg'
@@ -221,7 +221,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-uglify');
- grunt.loadNpmTasks('grunt-contrib-htmlmin');
+ grunt.loadNpmTasks('grunt-image');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-less');
@@ -238,7 +238,7 @@ module.exports = function(grunt) {
'concat',
'svg2jinja',
'uglify',
- 'htmlmin',
+ 'image',
'less:development',
'less:production'
]);