summaryrefslogtreecommitdiff
path: root/searx/static/themes/simple/gruntfile.js
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2019-08-06 12:25:25 +0200
committerGitHub <noreply@github.com>2019-08-06 12:25:25 +0200
commit8e62f7600f4582b913c92d56ffbafc22e37abe3b (patch)
tree48d64f887e762423ba588ce03cdd4453ee30c088 /searx/static/themes/simple/gruntfile.js
parente4e8e6da4c90d3d65418aeaf1d7ebfc64c497685 (diff)
parent6fbba63c83b18a652e571ce5a803773cd72e5b6a (diff)
Merge pull request #1647 from dalf/no-inline-script
No inline script for oscar and simple theme
Diffstat (limited to 'searx/static/themes/simple/gruntfile.js')
-rw-r--r--searx/static/themes/simple/gruntfile.js49
1 files changed, 26 insertions, 23 deletions
diff --git a/searx/static/themes/simple/gruntfile.js b/searx/static/themes/simple/gruntfile.js
index a0f9fd75a..c372ec730 100644
--- a/searx/static/themes/simple/gruntfile.js
+++ b/searx/static/themes/simple/gruntfile.js
@@ -10,21 +10,36 @@ module.exports = function(grunt) {
tasks: ['jshint', 'concat', 'uglify', 'webfont', 'less:development', 'less:production']
}
},
- concat: {
+ jshint: {
+ files: ['js/searx_src/*.js', 'js/searx_header/*.js'],
options: {
- separator: ';'
- },
- dist: {
- src: ['js/searx_src/*.js'],
- dest: 'js/searx.js'
+ reporterOutput: "",
+ proto: true,
+ // options here to override JSHint defaults
+ globals: {
+ browser: true,
+ jQuery: false,
+ devel: true
+ }
+ }
+ },
+ 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'
- },
+ output: {
+ comments: 'some'
+ },
ie8: false,
warnings: true,
compress: false,
@@ -33,20 +48,8 @@ module.exports = function(grunt) {
},
dist: {
files: {
- 'js/searx.min.js': ['<%= concat.dist.dest %>']
- }
- }
- },
- jshint: {
- files: ['js/searx_src/*.js'],
- options: {
- reporterOutput: "",
- proto: true,
- // options here to override JSHint defaults
- globals: {
- browser: true,
- jQuery: false,
- devel: true
+ 'js/searx.head.min.js': ['js/searx.head.js'],
+ 'js/searx.min.js': ['js/searx.js']
}
}
},