# HG changeset patch
# User rougeronj
# Date 1432199254 -7200
# Node ID 2db951a4a04c39e61a8d9f1f86f35243ea6e54f1
# Parent 7b43de480a11832caba8fd4d43a4cbd90a793396
updates dependencies and add main-bower-file to gulpfile to concatenate the vendorJs
Refactors gulpfile
diff -r 7b43de480a11 -r 2db951a4a04c client/app/index.html
--- a/client/app/index.html Thu Apr 23 18:17:58 2015 +0200
+++ b/client/app/index.html Thu May 21 11:07:34 2015 +0200
@@ -8,8 +8,8 @@
Ammico : Home
-
-
+
+
@@ -23,7 +23,7 @@
-
+
@@ -69,9 +69,9 @@
-
-
-
+
+
+
'
- },
- css: {
- src: ['lib.css', 'app.css'],
- tpl: ''
- },
- imgLogo: {
- src: 'ammico_logo_small.png',
- tpl: '
'
- },
- imgFooter: {
- src: 'logo_IRI_footer.png',
- tpl: '
'
- }
- }))
- .pipe(gulp.dest('./../server/ammico/templates'));
+ gulp.src(buildFolder+'/img/**/*')
+ .pipe(gulp.dest(staticFolder+'/img'));
+ gulp.src(buildFolder+'/fonts/**/*')
+ .pipe(gulp.dest(staticFolder+'/fonts'));
+ gulp.src(buildFolder+'/js/*.js')
+ .pipe(gulp.dest(staticFolder+'/js'));
+ gulp.src(buildFolder+'/css/*.css')
+ .pipe(gulp.dest(staticFolder+'/css'));
+ gulp.src(buildFolder+'/index.html')
+ .pipe(htmlreplace({
+ django: '{% load static %}',
+ js:{
+ src: ['lib.js', 'templates.js', 'app.js'],
+ tpl: ''
+ },
+ css: {
+ src: ['lib.css', 'app.css'],
+ tpl: ''
+ },
+ imgLogo: {
+ src: 'ammico_logo_small.png',
+ tpl: '
'
+ },
+ imgFooter: {
+ src: 'logo_IRI_footer.png',
+ tpl: '
'
+ }
+ }))
+ .pipe(gulp.dest(templateFolder+'/templates'));
});
gulp.task('watch',function(){
gulp.watch([
- 'build/**/*.html',
- 'build/**/*.js',
- 'build/**/*.css'
+ buildFolder+'/**/*.html',
+ buildFolder+'/**/*.js',
+ buildFolder+'/**/*.css'
], function(event) {
return gulp.src(event.path)
.pipe(plugins.connect.reload());
@@ -164,13 +156,17 @@
gulp.watch('./app/index.html',['copy-index']);
gulp.watch('./data/**/*',['copy-data']);
gulp.watch('./img/**/*',['copy-img']);
-
});
-gulp.task('connect', plugins.connect.server({
- root: ['build'],
- port: 9000,
- livereload: true
-}));
-gulp.task('default',['connect','scripts','templates','css','copy-index','copy-data','copy-img','vendorJS','vendorCSS','vendorFonts','watch']);
+gulp.task('connect', function() {
+ plugins.connect.server({
+ root: buildFolder,
+ port: 9000,
+ livereload: true
+ });
+});
+
+gulp.task('default',['connect','scripts','css', 'templates','copy-index','copy-data','copy-img','vendorJS','vendorCSS','vendorFonts','watch']);
+gulp.task('copy-server',['scripts','css', 'templates','copy-index','copy-data','copy-img','vendorJS','vendorCSS','vendorFonts','minimify','copy-server']);
+
diff -r 7b43de480a11 -r 2db951a4a04c client/package.json
--- a/client/package.json Thu Apr 23 18:17:58 2015 +0200
+++ b/client/package.json Thu May 21 11:07:34 2015 +0200
@@ -10,25 +10,26 @@
"author": "IRI",
"license": "Cecill-C",
"devDependencies": {
- "bower": "^1.3.4",
+ "bower": "^1.3.12",
"grunt-cli": "^0.1.13",
- "gulp": "~3.5.5",
- "gulp-angular-templatecache": "^1.1.0",
- "gulp-clean": "^0.3.0",
- "gulp-concat": "~2.1.7",
- "gulp-connect": "^1.0.7",
- "gulp-csslint": "^0.1.4",
+ "gulp": "~3.8.8",
+ "gulp-angular-templatecache": "^1.4.2",
+ "gulp-concat": "~2.4.1",
+ "gulp-connect": "^2.2.0",
+ "gulp-csslint": "^0.1.5",
"gulp-filesize": "0.0.6",
- "gulp-flatten": "0.0.2",
+ "gulp-flatten": "0.0.4",
"gulp-html-replace": "^1.4.4",
- "gulp-jshint": "~1.5.0",
- "gulp-load-plugins": "~0.4.0",
- "gulp-minify-css": "^0.3.4",
+ "gulp-jshint": "~1.8.5",
+ "gulp-load-plugins": "~0.7.0",
+ "gulp-minify-css": "^0.3.10",
"gulp-rename": "^1.2.0",
- "gulp-uglify": "^0.3.0",
- "gulp-util": "^2.2.16",
- "karma": "^0.12.1",
- "karma-chrome-launcher": "^0.1.2",
- "karma-jasmine": "^0.1.5"
+ "gulp-uglify": "^1.0.1",
+ "gulp-util": "^3.0.1",
+ "gulp-webserver": "^0.8.3",
+ "karma": "^0.12.23",
+ "karma-chrome-launcher": "^0.1.4",
+ "karma-jasmine": "^0.1.5",
+ "main-bower-files": "^2.8.0"
}
}