mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fix for Grunt
This commit is contained in:
parent
6bcdc98d08
commit
ecd6422156
16
Gruntfile.js
16
Gruntfile.js
@ -4,12 +4,12 @@ module.exports = function(grunt) {
|
|||||||
pkg: grunt.file.readJSON('package.json'),
|
pkg: grunt.file.readJSON('package.json'),
|
||||||
dump_dir: (function() {
|
dump_dir: (function() {
|
||||||
var out = {};
|
var out = {};
|
||||||
|
|
||||||
grunt.file.expand({ filter: 'isDirectory'}, 'public/fonts/invoice-fonts/*').forEach(function(path) {
|
grunt.file.expand({ filter: 'isDirectory'}, 'public/fonts/invoice-fonts/*').forEach(function(path) {
|
||||||
var fontName = /[^/]*$/.exec(path)[0],
|
var fontName = /[^/]*$/.exec(path)[0],
|
||||||
files = {},
|
files = {},
|
||||||
license='';
|
license='';
|
||||||
|
|
||||||
// Add license text
|
// Add license text
|
||||||
grunt.file.expand({ filter: 'isFile'}, path+'/*.txt').forEach(function(path) {
|
grunt.file.expand({ filter: 'isFile'}, path+'/*.txt').forEach(function(path) {
|
||||||
var licenseText = grunt.file.read(path);
|
var licenseText = grunt.file.read(path);
|
||||||
@ -19,10 +19,10 @@ module.exports = function(grunt) {
|
|||||||
|
|
||||||
license += "/*\n"+licenseText+"\n*/";
|
license += "/*\n"+licenseText+"\n*/";
|
||||||
});
|
});
|
||||||
|
|
||||||
// Create files list
|
// Create files list
|
||||||
files['public/js/vfs_fonts/'+fontName+'.js'] = [path+'/*.ttf'];
|
files['public/js/vfs_fonts/'+fontName+'.js'] = [path+'/*.ttf'];
|
||||||
|
|
||||||
out[fontName] = {
|
out[fontName] = {
|
||||||
options: {
|
options: {
|
||||||
pre: license+'window.ninjaFontVfs=window.ninjaFontVfs||{};window.ninjaFontVfs.'+fontName+'=',
|
pre: license+'window.ninjaFontVfs=window.ninjaFontVfs||{};window.ninjaFontVfs.'+fontName+'=',
|
||||||
@ -30,8 +30,8 @@ module.exports = function(grunt) {
|
|||||||
},
|
},
|
||||||
files: files
|
files: files
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
// Return the computed object
|
// Return the computed object
|
||||||
return out;
|
return out;
|
||||||
}()),
|
}()),
|
||||||
@ -162,8 +162,8 @@ module.exports = function(grunt) {
|
|||||||
nonull: true,
|
nonull: true,
|
||||||
options: {
|
options: {
|
||||||
process: false
|
process: false
|
||||||
}*/
|
}
|
||||||
},
|
},*/
|
||||||
/*js_pdf: {
|
/*js_pdf: {
|
||||||
src: [
|
src: [
|
||||||
'public/js/pdf_viewer.js',
|
'public/js/pdf_viewer.js',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user