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

Use 2016 GUI by default

parent 4ae89628
......@@ -8,15 +8,14 @@ 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
......@@ -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',
......@@ -56,71 +45,6 @@ module.exports = function(grunt) {
// Copies remaining files to places other tasks can use
copy : {
dist : {
files : [ {
expand : true,
dot : true,
cwd : '<%= app.source %>',
dest : '<%= app.dist %>',
src : [ '*.css', 'images/**/*', 'js/{,*/}*.js', '*.{ico,png,txt}', 'styles/fonts/{,*/}*.*' ]
}, {
expand : true,
cwd : '.tmp/images',
dest : '<%= app.dist %>/images',
src : [ 'generated/*' ]
}, {
expand : true,
cwd : 'bower_components/bootstrap-sass/assets/fonts/bootstrap/',
src : '*',
dest : '<%= app.dist %>/styles/fonts'
}, {
expand : true,
cwd : 'bower_components/fontawesome/fonts/',
src : '*',
dest : '<%= app.dist %>/styles/fonts'
}, {
expand : true,
cwd : 'bower_components/fontawesome/css/',
src : '*',
dest : '<%= app.dist %>/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'
}, {
// tinyMCE
expand : true,
cwd : 'bower_components/tinymce/skins',
src : [ '**' ],
dest : '<%= app.dist %>/js/skins'
}, {
// leaflet
expand : true,
cwd : 'bower_components/leaflet/dist/',
src : [ 'leaflet.css', 'images/*.png' ],
dest : '<%= app.dist %>/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,
......@@ -179,80 +103,39 @@ module.exports = function(grunt) {
} ]
},
// 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/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,
......@@ -348,47 +196,49 @@ module.exports = function(grunt) {
}
},
connect: {
server: {
options: {
port: 9000,
base: 'src/main/webapp',
livereload: true
connect : {
server : {
options : {
port : 9000,
base : 'src/main/webapp',
livereload : true
}
}
},
watch: {
compassdist1: {
files: ['src/main/sourceapp/1/{,*/}*.scss'],
tasks: ['compass:dist1', 'cssmin:dist1'],
options: {
livereload: true
watch : {
compassdist1 : {
files : [ 'src/main/sourceapp/1/{,*/}*.scss' ],
tasks : [ 'compass:dist1', 'cssmin:dist1' ],
options : {
livereload : true
}
},
js1: {
files: ['src/main/sourceapp/1/{,*/}*.js'],
tasks: ['newer:jshint:dist1','concat:world1', 'concat:app1'],
options: {
livereload: true
js1 : {
files : [ 'src/main/sourceapp/1/{,*/}*.js' ],
tasks : [ 'newer:jshint:dist1', 'concat:world1', 'concat:app1' ],
options : {
livereload : true
}
}
}
});
// grunt.registerTask('serve', [ 'clean', 'copy:css', 'compass:server', 'autoprefixer', 'uglify:server' ]);
// grunt.loadNpmTasks('grunt-contrib-sass');
// grunt.loadNpmTasks('grunt-contrib-watch');
// grunt.loadNpmTasks('grunt-newer');
// grunt.registerTask('serve', [ 'clean', 'copy:css', 'compass:server',
// 'autoprefixer', 'uglify:server' ]);
// grunt.loadNpmTasks('grunt-contrib-sass');
// grunt.loadNpmTasks('grunt-contrib-watch');
// grunt.loadNpmTasks('grunt-newer');
grunt.registerTask('build0', [ 'newer:jshint:dist', 'compass:dist', 'copy:dist', 'concat:dist', 'concat:world', 'concat:app', 'autoprefixer:dist', 'uglify:dist', 'cssmin:dist' ]);
grunt.registerTask('build1', [ 'newer:jshint:dist1', 'compass:dist1', 'copy:dist1', 'concat:dist1', 'concat:world1', 'concat:app1', 'autoprefixer:dist1', 'uglify:dist1', 'cssmin:dist1' ]);
// grunt.registerTask('js', [ 'jshint:all', 'copy:dist', 'concat', 'autoprefixer', 'uglify:dist' ]);
// grunt.registerTask('css', [ 'compass:dist', 'copy:dist', 'concat', 'autoprefixer', 'cssmin' ]);
grunt.registerTask('default', [ 'build0', 'build1' ]);
grunt.registerTask('build', [ 'build0', 'build1' ]);
// grunt.registerTask('js', [ 'jshint:all', 'copy:dist', 'concat',
// 'autoprefixer', 'uglify:dist' ]);
// grunt.registerTask('css', [ 'compass:dist', 'copy:dist', 'concat',
// 'autoprefixer', 'cssmin' ]);
grunt.registerTask('build', [ 'build1' ]);
grunt.registerTask('default', [ 'build' ]);
// Start web server
grunt.registerTask('serve', ['build','connect:server','watch']);