[mod] simple theme: smaller build

remove:
* searx/static/themes/simple/js/searxng.head.js
* searx/static/themes/simple/js/searxng.js
* searx/static/themes/simple/css/searxng-rtl.css
* searx/static/themes/simple/css/searxng.css

These files are never used.
About the js files: the .map files references the sources instead of the concated version.
This commit is contained in:
Alexandre Flament 2021-11-30 23:04:37 +01:00
parent 632ae7d175
commit 28b22a0f98
2 changed files with 7 additions and 33 deletions

View File

@ -16,10 +16,8 @@ module.exports = function(grunt) {
tasks: [ tasks: [
'eslint', 'eslint',
'copy', 'copy',
'concat',
'uglify', 'uglify',
'less:development', 'less',
'less:production',
'image', 'image',
'svg2png', 'svg2png',
'svg2jinja' 'svg2jinja'
@ -81,21 +79,6 @@ module.exports = function(grunt) {
] ]
}, },
}, },
concat: {
head_and_body: {
options: {
separator: ';'
},
files: {
'js/searxng.head.js': ['src/js/head/*.js'],
'js/searxng.js': [
'src/js/main/*.js',
'../__common__/js/*.js',
'./node_modules/autocomplete-js/dist/autocomplete.js'
]
}
}
},
uglify: { uglify: {
options: { options: {
output: { output: {
@ -110,20 +93,15 @@ module.exports = function(grunt) {
dist: { dist: {
files: { files: {
'js/searxng.head.min.js': ['js/searxng.head.js'], 'js/searxng.head.min.js': ['js/searxng.head.js'],
'js/searxng.min.js': ['js/searxng.js'] 'js/searxng.min.js': [
'src/js/main/*.js',
'../__common__/js/*.js',
'./node_modules/autocomplete-js/dist/autocomplete.js'
]
} }
} }
}, },
less: { less: {
development: {
options: {
paths: ["less"],
},
files: {
"css/searxng.css": "src/less/style.less",
"css/searxng-rtl.css": "src/less/style-rtl.less"
}
},
production: { production: {
options: { options: {
paths: ["less"], paths: ["less"],
@ -288,7 +266,6 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-image'); grunt.loadNpmTasks('grunt-image');
grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-less'); grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-cssmin'); grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-stylelint'); grunt.loadNpmTasks('grunt-stylelint');
@ -300,10 +277,8 @@ module.exports = function(grunt) {
'eslint', 'eslint',
'stylelint', 'stylelint',
'copy', 'copy',
'concat',
'uglify', 'uglify',
'less:development', 'less',
'less:production',
'image', 'image',
'svg2png', 'svg2png',
'svg2jinja', 'svg2jinja',

View File

@ -2,7 +2,6 @@
"devDependencies": { "devDependencies": {
"eslint": "^8.0.1", "eslint": "^8.0.1",
"grunt": "~1.4.1", "grunt": "~1.4.1",
"grunt-contrib-concat": "~2.0.0",
"grunt-contrib-copy": "^1.0.0", "grunt-contrib-copy": "^1.0.0",
"grunt-contrib-cssmin": "^4.0.0", "grunt-contrib-cssmin": "^4.0.0",
"grunt-contrib-jshint": "~3.1.1", "grunt-contrib-jshint": "~3.1.1",