mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fix path for images and fonts, include jquery-ui.min.js from the right path and be sure to print if a warning if resources are missing when running grunt
This commit is contained in:
parent
a0beab55c2
commit
b5b3216760
28
Gruntfile.js
28
Gruntfile.js
@ -3,10 +3,21 @@ module.exports = function(grunt) {
|
|||||||
grunt.initConfig({
|
grunt.initConfig({
|
||||||
pkg: grunt.file.readJSON('package.json'),
|
pkg: grunt.file.readJSON('package.json'),
|
||||||
concat: {
|
concat: {
|
||||||
|
options: {
|
||||||
|
process: function(src, filepath) {
|
||||||
|
// Fix path for image and font resources
|
||||||
|
if(filepath.indexOf('.css', filepath.length - 4) !== -1) {
|
||||||
|
return src.replace(/\.\.\/(images|fonts)\//g, '$1/');
|
||||||
|
// Don't do anything for unknown file types
|
||||||
|
} else {
|
||||||
|
return src;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
js: {
|
js: {
|
||||||
src: [
|
src: [
|
||||||
'public/vendor/jquery/dist/jquery.js',
|
'public/vendor/jquery/dist/jquery.js',
|
||||||
'public/vendor/jquery-ui/ui/minified/jquery-ui.min.js',
|
'public/vendor/jquery-ui/jquery-ui.min.js',
|
||||||
'public/vendor/bootstrap/dist/js/bootstrap.min.js',
|
'public/vendor/bootstrap/dist/js/bootstrap.min.js',
|
||||||
'public/vendor/datatables/media/js/jquery.dataTables.js',
|
'public/vendor/datatables/media/js/jquery.dataTables.js',
|
||||||
'public/vendor/datatables-bootstrap3/BS3/assets/js/datatables.js',
|
'public/vendor/datatables-bootstrap3/BS3/assets/js/datatables.js',
|
||||||
@ -24,7 +35,8 @@ module.exports = function(grunt) {
|
|||||||
//'public/js/jspdf.plugin.split_text_to_size.js',
|
//'public/js/jspdf.plugin.split_text_to_size.js',
|
||||||
'public/js/script.js',
|
'public/js/script.js',
|
||||||
],
|
],
|
||||||
dest: 'public/built.js'
|
dest: 'public/built.js',
|
||||||
|
nonull: true
|
||||||
},
|
},
|
||||||
css: {
|
css: {
|
||||||
src: [
|
src: [
|
||||||
@ -37,8 +49,9 @@ module.exports = function(grunt) {
|
|||||||
'public/css/bootstrap-combobox.css',
|
'public/css/bootstrap-combobox.css',
|
||||||
'public/css/typeahead.js-bootstrap.css',
|
'public/css/typeahead.js-bootstrap.css',
|
||||||
'public/css/style.css',
|
'public/css/style.css',
|
||||||
],
|
],
|
||||||
dest: 'public/built.css'
|
dest: 'public/built.css',
|
||||||
|
nonull: true
|
||||||
},
|
},
|
||||||
css_public: {
|
css_public: {
|
||||||
src: [
|
src: [
|
||||||
@ -46,13 +59,14 @@ module.exports = function(grunt) {
|
|||||||
'public/css/bootstrap.splash.css',
|
'public/css/bootstrap.splash.css',
|
||||||
'public/css/splash.css',
|
'public/css/splash.css',
|
||||||
],
|
],
|
||||||
dest: 'public/built.public.css'
|
dest: 'public/built.public.css',
|
||||||
|
nonull: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
grunt.loadNpmTasks('grunt-contrib-concat');
|
grunt.loadNpmTasks('grunt-contrib-concat');
|
||||||
|
|
||||||
grunt.registerTask('default', ['concat']);
|
grunt.registerTask('default', ['concat']);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user