Commit 063cffef authored by Matija Obreza's avatar Matija Obreza

Use 2016 GUI by default

parent 4ae89628
......@@ -8,17 +8,16 @@ module.exports = function(grunt) {
// require('jit-grunt')(grunt);
grunt.initConfig({
app : {
source : 'src/main/sourceapp/0',
source1 : 'src/main/sourceapp/1',
dist : 'src/main/webapp/html/0',
dist1 : 'src/main/webapp/html/1'
dist1 : 'src/main/webapp/html/1',
source2 : 'src/main/sourceapp/2',
dist2 : 'src/main/webapp/html/2'
},
clean : {
dist : [ '.tmp', '<%= app.dist %>', '<%= app.dist1 %>' ]
dist : [ '.tmp', '<%= app.dist1 %>', '<%= app.dist2 %>' ]
},
// Compiles Sass to CSS and generates necessary files if requested
compass : {
options : {
......@@ -32,16 +31,6 @@ module.exports = function(grunt) {
assetCacheBuster : false,
raw : 'Sass::Script::Number.precision = 10\n'
},
dist : {
options : {
sassDir : '<%= app.source %>/styles',
imagesDir : '<%= app.source %>/images',
javascriptsDir : '<%= app.source %>/scripts',
fontsDir : '<%= app.source %>/styles/fonts',
cssDir : '<%= app.dist %>/styles',
generatedImagesDir : '<%= app.dist %>/images/generated'
}
},
dist1 : {
options : {
sassDir : '<%= app.source1 %>/styles',
......@@ -53,206 +42,100 @@ module.exports = function(grunt) {
}
}
},
// Copies remaining files to places other tasks can use
copy : {
dist : {
dist1 : {
files : [ {
expand : true,
dot : true,
cwd : '<%= app.source %>',
dest : '<%= app.dist %>',
cwd : '<%= app.source1 %>',
dest : '<%= app.dist1 %>',
src : [ '*.css', 'images/**/*', 'js/{,*/}*.js', '*.{ico,png,txt}', 'styles/fonts/{,*/}*.*' ]
}, {
expand : true,
cwd : '.tmp/images',
dest : '<%= app.dist %>/images',
dest : '<%= app.dist1 %>/images',
src : [ 'generated/*' ]
}, {
expand : true,
cwd : 'bower_components/bootstrap-sass/assets/fonts/bootstrap/',
src : '*',
dest : '<%= app.dist %>/styles/fonts'
dest : '<%= app.dist1 %>/styles/fonts'
}, {
expand : true,
cwd : 'bower_components/fontawesome/fonts/',
src : '*',
dest : '<%= app.dist %>/styles/fonts'
dest : '<%= app.dist1 %>/styles/fonts'
}, {
expand : true,
cwd : 'bower_components/fontawesome/css/',
src : '*',
dest : '<%= app.dist %>/styles/'
dest : '<%= app.dist1 %>/styles/'
}, {
expand : true,
cwd : 'bower_components/webfont-notosans/regular/',
src : '*',
dest : '<%= app.dist %>/styles/fonts'
},{
expand : true,
cwd : 'bower_components/jquery-ui/themes/base/',
src : [ 'jquery-ui.css' ],
dest : '<%= app.dist %>/styles'
dest : '<%= app.dist1 %>/styles/fonts'
}, {
// tinyMCE
expand : true,
cwd : 'bower_components/tinymce/skins',
src : [ '**' ],
dest : '<%= app.dist %>/js/skins'
dest : '<%= app.dist1 %>/js/skins'
}, {
// leaflet
expand : true,
cwd : 'bower_components/leaflet/dist/',
src : [ 'leaflet.css', 'images/*.png' ],
dest : '<%= app.dist %>/styles'
dest : '<%= app.dist1 %>/styles'
}, {
// simplecolorpicker
expand : true,
cwd : 'bower_components/jquery-simplecolorpicker/',
src : [ 'jquery.simplecolorpicker.css', 'jquery.simplecolorpicker-regularfont.css' ],
dest : '<%= app.dist %>/styles'
},
{
// scooch
expand : true,
cwd : 'src/main/sourceapp/styles/',
src : [ 'pages.css' ],
dest : '<%= app.dist %>/styles'
} ]
},
dist1 : {
files : [ {
expand : true,
dot : true,
cwd : '<%= app.source1 %>',
dest : '<%= app.dist1 %>',
src : [ '*.css', 'images/**/*', 'js/{,*/}*.js', '*.{ico,png,txt}', 'styles/fonts/{,*/}*.*' ]
}, {
expand : true,
cwd : '.tmp/images',
dest : '<%= app.dist1 %>/images',
src : [ 'generated/*' ]
}, {
expand : true,
cwd : 'bower_components/bootstrap-sass/assets/fonts/bootstrap/',
src : '*',
dest : '<%= app.dist1 %>/styles/fonts'
}, {
expand : true,
cwd : 'bower_components/fontawesome/fonts/',
src : '*',
dest : '<%= app.dist1 %>/styles/fonts'
}, {
expand : true,
cwd : 'bower_components/fontawesome/css/',
src : '*',
dest : '<%= app.dist1 %>/styles/'
}, {
expand : true,
cwd : 'bower_components/webfont-notosans/regular/',
src : '*',
dest : '<%= app.dist1 %>/styles/fonts'
}, {
// tinyMCE
expand : true,
cwd : 'bower_components/tinymce/skins',
src : [ '**' ],
dest : '<%= app.dist1 %>/js/skins'
}, {
// leaflet
expand : true,
cwd : 'bower_components/leaflet/dist/',
src : [ 'leaflet.css', 'images/*.png' ],
dest : '<%= app.dist1 %>/styles'
dest : '<%= app.dist1 %>/styles'
}, {
// simplecolorpicker
expand : true,
cwd : 'bower_components/jquery-simplecolorpicker/',
src : [ 'jquery.simplecolorpicker.css', 'jquery.simplecolorpicker-regularfont.css' ],
dest : '<%= app.dist1 %>/styles'
}, {
expand : true,
cwd : 'bower_components/jquery-ui/themes/base/',
src : [ 'jquery-ui.css' ],
dest : '<%= app.dist1 %>/styles'
} ]
},
// styles : {
// expand : true,
// cwd : '<%= app.source %>/styles',
// dest : '.tmp/styles/',
// src : '{,*/}*.css'
// }
},
// styles : {
// expand : true,
// cwd : '<%= app.source %>/styles',
// dest : '.tmp/styles/',
// src : '{,*/}*.css'
// }
},
// Make sure code styles are up to par and there are no obvious mistakes
jshint : {
options : {
jshintrc : '.jshintrc',
//reporter : require('jshint-stylish')
},
dist : {
src : [ '<%= app.source %>/js/{,*/}*.js' ]
// reporter : require('jshint-stylish')
},
dist1 : {
src : [ '<%= app.source1 %>/js/{,*/}*.js' ]
},
dist2 : {
src : [ '<%= app.source2 %>/js/{,*/}*.js' ]
},
},
concat : {
options : {
// separator: ';',
},
dist : {
src : [ 'bower_components/jquery/dist/jquery.js', 'bower_components/modernizr/modernizr.js', 'bower_components/jquery-flot/jquery.flot.js', 'bower_components/jquery-flot/jquery.flot.pie.js',
'bower_components/jquery-flot/jquery.flot.fillbetween.js',
// simplecolorpicker
'bower_components/jquery-simplecolorpicker/jquery.simplecolorpicker.js',
// TinyMCE
'bower_components/tinymce/tinymce.js', 'bower_components/tinymce/tinymce.jquery.js',
// TinyMCE plugins: link, autolink, code
'bower_components/tinymce/themes/modern/theme.js', 'bower_components/tinymce/plugins/link/plugin.js', 'bower_components/tinymce/plugins/autolink/plugin.js',
'bower_components/tinymce/plugins/code/plugin.js',
// Leaflet
'bower_components/leaflet/dist/leaflet.js', 'bower_components/leaflet-locationfilter/src/locationfilter.js', 'bower_components/bootstrap-sass/assets/javascripts/bootstrap.js',
'bower_components/jquery-ui/jquery-ui.js', 'bower_components/jquery-ui/ui/autocomplete.js',
//
'bower_components/dyn-css/lib/dyncss.js', 'bower_components/jstree/dist/jstree.min.js'],
dest : '<%= app.dist %>/js/libraries.js',
},
app : {
src : [ '<%= app.source %>/js/main.js', '<%= app.source %>/js/crophub.js', '<%= app.source %>/js/custom.js' ],
dest : '<%= app.dist %>/js/genesys.js'
},
world : {
src: [ 'bower_components/highmaps-beta/highmaps.src.js', 'bower_components/highcharts/modules/data.src.js', '<%= app.source %>/js/world.js'],
dest : '<%= app.dist %>/js/genesyshighcharts.js'
},
dist1 : {
src : [ 'bower_components/jquery/dist/jquery.js',
'bower_components/modernizr/modernizr.js',
'bower_components/jquery-flot/jquery.flot.js',
'bower_components/jquery-flot/jquery.flot.pie.js',
'bower_components/jquery-flot/jquery.flot.fillbetween.js',
'bower_components/jquery-simplecolorpicker/jquery.simplecolorpicker.js',
'bower_components/tinymce/tinymce.js',
'bower_components/tinymce/tinymce.jquery.js',
'bower_components/tinymce/themes/modern/theme.js',
'bower_components/tinymce/plugins/link/plugin.js',
'bower_components/tinymce/plugins/autolink/plugin.js',
'bower_components/tinymce/plugins/code/plugin.js',
'bower_components/leaflet/dist/leaflet.js',
'bower_components/leaflet-locationfilter/src/locationfilter.js',
'bower_components/bootstrap-sass/assets/javascripts/bootstrap.js',
'bower_components/jquery-ui/jquery-ui.js',
'bower_components/jquery-ui/ui/autocomplete.js',
'bower_components/dyn-css/lib/dyncss.js',
'bower_components/jstree/dist/jstree.min.js' ],
src : [ 'bower_components/jquery/dist/jquery.js', 'bower_components/modernizr/modernizr.js', 'bower_components/jquery-flot/jquery.flot.js', 'bower_components/jquery-flot/jquery.flot.pie.js',
'bower_components/jquery-flot/jquery.flot.fillbetween.js', 'bower_components/jquery-simplecolorpicker/jquery.simplecolorpicker.js', 'bower_components/tinymce/tinymce.js',
'bower_components/tinymce/tinymce.jquery.js', 'bower_components/tinymce/themes/modern/theme.js', 'bower_components/tinymce/plugins/link/plugin.js',
'bower_components/tinymce/plugins/autolink/plugin.js', 'bower_components/tinymce/plugins/code/plugin.js', 'bower_components/leaflet/dist/leaflet.js',
'bower_components/leaflet-locationfilter/src/locationfilter.js', 'bower_components/bootstrap-sass/assets/javascripts/bootstrap.js', 'bower_components/jquery-ui/jquery-ui.js',
'bower_components/jquery-ui/ui/autocomplete.js', 'bower_components/dyn-css/lib/dyncss.js', 'bower_components/jstree/dist/jstree.min.js' ],
dest : '<%= app.dist1 %>/js/libraries.js',
},
app1 : {
......@@ -260,7 +143,7 @@ module.exports = function(grunt) {
dest : '<%= app.dist1 %>/js/genesys.js'
},
world1 : {
src: [ 'bower_components/highmaps-beta/highmaps.src.js', 'bower_components/highcharts/modules/data.src.js', '<%= app.source1 %>/js/world.js'],
src : [ 'bower_components/highmaps-beta/highmaps.src.js', 'bower_components/highcharts/modules/data.src.js', '<%= app.source1 %>/js/world.js' ],
dest : '<%= app.dist1 %>/js/genesyshighcharts.js'
}
},
......@@ -269,15 +152,6 @@ module.exports = function(grunt) {
options : {
browsers : [ 'last 3 versions' ]
},
dist : {
files : [ {
expand : true,
cwd : '<%= app.dist %>/styles',
src : '**/*.css',
dest : '<%= app.dist %>/styles'
} ]
},
dist1 : {
files : [ {
expand : true,
......@@ -292,47 +166,21 @@ module.exports = function(grunt) {
options : {
keepSpecialComments : 0
},
dist : {
files : {
'<%= app.dist %>/styles/bootstrap.min.css' : [ '<%= app.dist %>/styles/bootstrap.css' ],
'<%= app.dist %>/styles/other.min.css' : [ '<%= app.dist %>/styles/jquery-ui.css', '<%= app.dist %>/styles/forza.css', '<%= app.dist %>/styles/leaflet.css',
'<%= app.dist %>/styles/jquery.simplecolorpicker.css', '<%= app.dist %>/styles/jquery.simplecolorpicker-regularfont.css' ],
'<%= app.dist %>/styles/genesys.min.css' : [ '<%= app.dist %>/styles/genesys.css' ],
'<%= app.dist %>/styles/pages.min.css' : [ '<%= app.dist %>/styles/pages.css' ],
'<%= app.dist %>/styles/all.min.css' : [ '<%= app.dist %>/styles/bootstrap.css', '<%= app.dist %>/styles/jquery-ui.css', '<%= app.dist %>/styles/forza.css',
'<%= app.dist %>/styles/leaflet.css', '<%= app.dist %>/styles/jquery.simplecolorpicker.css', '<%= app.dist %>/styles/jquery.simplecolorpicker-regularfont.css', '<%= app.dist %>/styles/genesys.css', '<%= app.dist %>/styles/pages.css' ],
}
},
dist1 : {
files : {
'<%= app.dist1 %>/styles/bootstrap.min.css' : [ '<%= app.dist1 %>/styles/bootstrap.css' ],
'<%= app.dist1 %>/styles/other.min.css' : [ '<%= app.dist1 %>/styles/jquery-ui.css', '<%= app.dist1 %>/styles/forza.css', '<%= app.dist1 %>/styles/leaflet.css',
'<%= app.dist1 %>/styles/jquery.simplecolorpicker.css', '<%= app.dist1 %>/styles/jquery.simplecolorpicker-regularfont.css' ],
'<%= app.dist1 %>/styles/other.min.css' : [ '<%= app.dist1 %>/styles/jquery-ui.css', '<%= app.dist1 %>/styles/forza.css', '<%= app.dist1 %>/styles/leaflet.css',
'<%= app.dist1 %>/styles/jquery.simplecolorpicker.css', '<%= app.dist1 %>/styles/jquery.simplecolorpicker-regularfont.css' ],
'<%= app.dist1 %>/styles/genesys.min.css' : [ '<%= app.dist1 %>/styles/genesys.css' ],
'<%= app.dist1 %>/styles/all.min.css' : [ '<%= app.dist1 %>/styles/bootstrap.css', '<%= app.dist1 %>/styles/jquery-ui.css',
'<%= app.dist1 %>/styles/forza.css', '<%= app.dist1 %>/styles/leaflet.css',
'<%= app.dist1 %>/styles/jquery.simplecolorpicker.css', '<%= app.dist1 %>/styles/jquery.simplecolorpicker-regularfont.css',
'<%= app.dist1 %>/styles/genesys.css'],
'<%= app.dist1 %>/styles/all.min.css' : [ '<%= app.dist1 %>/styles/bootstrap.css', '<%= app.dist1 %>/styles/jquery-ui.css', '<%= app.dist1 %>/styles/forza.css',
'<%= app.dist1 %>/styles/leaflet.css', '<%= app.dist1 %>/styles/jquery.simplecolorpicker.css', '<%= app.dist1 %>/styles/jquery.simplecolorpicker-regularfont.css',
'<%= app.dist1 %>/styles/genesys.css' ],
}
}
},
// JS min
uglify : {
dist : {
options : {
compress : false,
preserveComments : false,
report : 'min'
},
files : {
'<%= app.dist %>/js/libraries.min.js' : [ '<%= app.dist %>/js/libraries.js' ],
'<%= app.dist %>/js/genesys.min.js' : [ '<%= app.dist %>/js/genesys.js' ],
'<%= app.dist %>/js/all.min.js' : [ '<%= app.dist %>/js/libraries.js', '<%= app.dist %>/js/genesys.js' ],
'<%= app.dist %>/js/genesyshighcharts.min.js' : [ '<%= app.dist %>/js/genesyshighcharts.js' ]
}
},
dist1 : {
options : {
compress : false,
......@@ -346,49 +194,51 @@ module.exports = function(grunt) {
'<%= app.dist1 %>/js/genesyshighcharts.min.js' : [ '<%= app.dist1 %>/js/genesyshighcharts.js' ]
}
}
},