oscar and simple themes: no inline script (allow A+ Content-Security-Policy)

This commit is contained in:
Dalf 2019-07-23 14:13:38 +02:00
parent 90b24f1060
commit 6fbba63c83
22 changed files with 2763 additions and 71 deletions

View file

@ -10,35 +10,8 @@ module.exports = function(grunt) {
tasks: ['jshint', 'concat', 'uglify', 'webfont', 'less:development', 'less:production']
}
},
concat: {
options: {
separator: ';'
},
dist: {
src: ['js/searx_src/*.js'],
dest: 'js/searx.js'
}
},
uglify: {
options: {
banner: '/*! simple/searx.min.js | <%= grunt.template.today("dd-mm-yyyy") %> | https://github.com/asciimoo/searx */\n',
output: {
comments: 'some'
},
ie8: false,
warnings: true,
compress: false,
mangle: true,
sourceMap: true
},
dist: {
files: {
'js/searx.min.js': ['<%= concat.dist.dest %>']
}
}
},
jshint: {
files: ['js/searx_src/*.js'],
files: ['js/searx_src/*.js', 'js/searx_header/*.js'],
options: {
reporterOutput: "",
proto: true,
@ -50,6 +23,36 @@ module.exports = function(grunt) {
}
}
},
concat: {
head_and_body: {
options: {
separator: ';'
},
files: {
'js/searx.head.js': ['js/searx_head/*.js'],
'js/searx.js': ['js/searx_src/*.js']
}
}
},
uglify: {
options: {
banner: '/*! simple/searx.min.js | <%= grunt.template.today("dd-mm-yyyy") %> | https://github.com/asciimoo/searx */\n',
output: {
comments: 'some'
},
ie8: false,
warnings: true,
compress: false,
mangle: true,
sourceMap: true
},
dist: {
files: {
'js/searx.head.min.js': ['js/searx.head.js'],
'js/searx.min.js': ['js/searx.js']
}
}
},
less: {
development: {
options: {