Update GNUmakefile for WebServerResources
This commit is contained in:
parent
87a2a762cc
commit
ccc651c583
|
@ -4,7 +4,15 @@ include ../common.make
|
|||
|
||||
WEBSERVER_RESOURCE_DIRS = css fonts img js
|
||||
|
||||
all ::
|
||||
build-static-files:
|
||||
@if [ -d bower_components ]; then \
|
||||
bower update; \
|
||||
else \
|
||||
bower install; \
|
||||
fi
|
||||
grunt build
|
||||
|
||||
all :: build-static-files
|
||||
|
||||
install ::
|
||||
@if [ -L "$(SOGO_WEBSERVERRESOURCESDIR)" ]; then \
|
||||
|
|
|
@ -34,23 +34,20 @@ module.exports = function(grunt) {
|
|||
grunt.loadNpmTasks('grunt-sass');
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
|
||||
grunt.registerTask('build', ['sass']);
|
||||
grunt.registerTask('default', ['build','watch']);
|
||||
grunt.registerTask('static', function(dev) {
|
||||
grunt.task.registerTask('static', function() {
|
||||
var options = {
|
||||
'src': 'bower_components',
|
||||
'js_dest': 'js/vendor/',
|
||||
'fonts_dest': 'fonts/',
|
||||
'min': (dev? '' : '.min')
|
||||
'fonts_dest': 'fonts/'
|
||||
};
|
||||
var js = [
|
||||
'<%= src %>/angular/angular<%= min %>.js{,.map}',
|
||||
'<%= src %>/angular-animate/angular-animate<%= min %>.js{,.map}',
|
||||
'<%= src %>/angular-sanitize/angular-sanitize<%= min %>.js{,.map}',
|
||||
'<%= src %>/angular-ui-router/release/angular-ui-router<%= min %>.js',
|
||||
'<%= src %>/angular-foundation/mm-foundation-tpls<%= min %>.js',
|
||||
'<%= src %>/foundation/js/foundation<%= min %>.js',
|
||||
'<%= src %>/ionic/release/js/ionic<%= min %>.js',
|
||||
'<%= src %>/angular/angular{,.min}.js{,.map}',
|
||||
'<%= src %>/angular-animate/angular-animate{,.min}.js{,.map}',
|
||||
'<%= src %>/angular-sanitize/angular-sanitize{,.min}.js{,.map}',
|
||||
'<%= src %>/angular-ui-router/release/angular-ui-router{,.min}.js',
|
||||
'<%= src %>/angular-foundation/mm-foundation-tpls{,.min}.js',
|
||||
'<%= src %>/foundation/js/foundation{,.min}.js',
|
||||
'<%= src %>/ionic/release/js/ionic{,.min}.js',
|
||||
'<%= src %>/underscore/underscore-min.{js,map}'
|
||||
];
|
||||
for (var j = 0; j < js.length; j++) {
|
||||
|
@ -75,4 +72,6 @@ module.exports = function(grunt) {
|
|||
grunt.log.ok("copy " + src + " => " + dest);
|
||||
}
|
||||
});
|
||||
grunt.task.registerTask('build', ['static', 'sass']);
|
||||
grunt.task.registerTask('default', ['build','watch']);
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"angular-ui-router": "~0.2",
|
||||
"angular-foundation": "~0.3",
|
||||
"foundation": "~5.3",
|
||||
"ionic": "1.0.0-beta.10",
|
||||
"ionic": "1.0.0-beta.11",
|
||||
"underscore": "~1.6"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue