[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 )
@ -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']);
|
||||
};
|
||||
|
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 696 B |
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 618 B |
@ -31,8 +31,8 @@
|
||||
var map_boundingbox = JSON.parse(this.dataset.mapBoundingbox);
|
||||
var map_geojson = JSON.parse(this.dataset.mapGeojson);
|
||||
|
||||
searx.loadStyle('leaflet/leaflet.css');
|
||||
searx.loadScript('leaflet/leaflet.js', function() {
|
||||
searx.loadStyle('css/leaflet.css');
|
||||
searx.loadScript('js/leaflet.js', function() {
|
||||
var map_bounds = null;
|
||||
if(map_boundingbox) {
|
||||
var southWest = L.latLng(map_boundingbox[0], map_boundingbox[2]);
|
||||
|