summaryrefslogtreecommitdiff
path: root/searx/static/themes/simple/gruntfile.js
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2021-06-16 10:31:11 +0200
committerAlexandre Flament <alex@al-f.net>2021-06-16 12:44:07 +0200
commitb4a47cacd8f9471fea9fb4099ad647a69169db5c (patch)
tree5886c85730072168b01701432a41a66006f1dcdf /searx/static/themes/simple/gruntfile.js
parent6288b549e268e7e82a3f20278642343656ec2fc1 (diff)
[mod] simple theme: leaflet becomes a packages.json dependency
the build of the themes updates: * js/leaflet.js ( was leaflet/leaflet.js ) * css/leaflet.css ( was leaflet/leaflet.css ) * css/images ( was leaflet/images )
Diffstat (limited to 'searx/static/themes/simple/gruntfile.js')
-rw-r--r--searx/static/themes/simple/gruntfile.js38
1 files changed, 37 insertions, 1 deletions
diff --git a/searx/static/themes/simple/gruntfile.js b/searx/static/themes/simple/gruntfile.js
index d4af12e65..d11ee6822 100644
--- a/searx/static/themes/simple/gruntfile.js
+++ b/searx/static/themes/simple/gruntfile.js
@@ -23,6 +23,41 @@ module.exports = function(grunt) {
}
}
},
+ copy: {
+ js: {
+ expand: true,
+ cwd: './node_modules',
+ dest: './js/',
+ flatten: true,
+ filter: 'isFile',
+ timestamp: true,
+ src: [
+ './leaflet/dist/leaflet.js',
+ ]
+ },
+ css: {
+ expand: true,
+ cwd: './node_modules',
+ dest: './css/',
+ flatten: true,
+ filter: 'isFile',
+ timestamp: true,
+ src: [
+ './leaflet/dist/leaflet.css',
+ ]
+ },
+ leaflet_images: {
+ expand: true,
+ cwd: './node_modules',
+ dest: './css/images/',
+ flatten: true,
+ filter: 'isFile',
+ timestamp: true,
+ src: [
+ './leaflet/dist/images/*.png',
+ ]
+ },
+ },
concat: {
head_and_body: {
options: {
@@ -149,6 +184,7 @@ module.exports = function(grunt) {
});
grunt.loadNpmTasks('grunt-contrib-watch');
+ grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-concat');
@@ -158,5 +194,5 @@ module.exports = function(grunt) {
grunt.registerTask('test', ['jshint']);
- grunt.registerTask('default', ['jshint', 'concat', 'uglify', 'less:development', 'less:production']);
+ grunt.registerTask('default', ['jshint', 'copy', 'concat', 'uglify', 'less:development', 'less:production']);
};