mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
[mod] oscar: get leaflet and jquery from NPM
easy to upgrade (package.json)
This commit is contained in:
parent
c7133efb12
commit
44407353ef
25 changed files with 702 additions and 115 deletions
|
|
@ -2,6 +2,42 @@ module.exports = function(grunt) {
|
|||
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
copy: {
|
||||
js: {
|
||||
expand: true,
|
||||
cwd: './node_modules',
|
||||
dest: './js/',
|
||||
flatten: true,
|
||||
filter: 'isFile',
|
||||
timestamp: true,
|
||||
src: [
|
||||
'./jquery/dist/jquery.min.js',
|
||||
'./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: {
|
||||
options: {
|
||||
separator: ';'
|
||||
|
|
@ -55,6 +91,7 @@ module.exports = function(grunt) {
|
|||
sourceMap: true,
|
||||
},
|
||||
files: {
|
||||
"css/leaflet.min.css": "css/leaflet.css",
|
||||
"css/pointhi.min.css": "src/less/pointhi/oscar.less",
|
||||
"css/logicodev.min.css": "src/less/logicodev/oscar.less",
|
||||
"css/logicodev-dark.min.css": "src/less/logicodev-dark/oscar.less"
|
||||
|
|
@ -77,6 +114,7 @@ module.exports = function(grunt) {
|
|||
}
|
||||
});
|
||||
|
||||
grunt.loadNpmTasks('grunt-contrib-copy');
|
||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||
grunt.loadNpmTasks('grunt-contrib-jshint');
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
|
|
@ -85,7 +123,7 @@ module.exports = function(grunt) {
|
|||
|
||||
grunt.registerTask('test', ['jshint']);
|
||||
|
||||
grunt.registerTask('default', ['jshint', 'concat', 'uglify', 'less']);
|
||||
grunt.registerTask('default', ['copy', 'jshint', 'concat', 'uglify', 'less']);
|
||||
|
||||
grunt.registerTask('styles', ['less']);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue