Fixed build in generator
diff --git a/views/ngXosViews/sampleView/env/default.js b/views/ngXosViews/sampleView/env/default.js
index 5b198ec..353973a 100644
--- a/views/ngXosViews/sampleView/env/default.js
+++ b/views/ngXosViews/sampleView/env/default.js
@@ -7,7 +7,7 @@
// (works only for local environment as both application are served on the same domain)
module.exports = {
- host: '',
- xoscsrftoken: '',
- xossessionid: ''
+ host: 'http://xos.dev:9999/',
+ xoscsrftoken: 'jkKF9NebQoyaxKFT42l1EFjGx6ESPuP4',
+ xossessionid: 'kvq9qxycbu0298wxfg8v11at94q9m819'
};
diff --git a/views/ngXosViews/sampleView/gulp/build.js b/views/ngXosViews/sampleView/gulp/build.js
index 65048e0..714f89f 100644
--- a/views/ngXosViews/sampleView/gulp/build.js
+++ b/views/ngXosViews/sampleView/gulp/build.js
@@ -13,7 +13,7 @@
var uglify = require('gulp-uglify');
var templateCache = require('gulp-angular-templatecache');
var runSequence = require('run-sequence');
-var concat = require('gulp-concat');
+var concat = require('gulp-concat-util');
var del = require('del');
var wiredep = require('wiredep');
var angularFilesort = require('gulp-angular-filesort');
@@ -23,6 +23,13 @@
var rename = require('gulp-rename');
var replace = require('gulp-replace');
+const TEMPLATE_FOOTER = `
+angular.module('xos.sampleView')
+.run(['$location', function(a){
+ a.path('/');
+}])
+`
+
module.exports = function(options){
// delete previous builded file
@@ -66,7 +73,7 @@
// copy css in correct folder
gulp.task('copyCss', ['css'], function(){
return gulp.src([`${options.tmp}/css/*.css`])
- .pipe(concat('xosDiagnostic.css'))
+ .pipe(concat('xosSampleView.css'))
.pipe(gulp.dest(options.static + 'css/'))
});
@@ -78,6 +85,8 @@
.pipe(ngAnnotate())
.pipe(angularFilesort())
.pipe(concat('xosSampleView.js'))
+ .pipe(concat.header('//Autogenerated, do not edit!!!\n'))
+ .pipe(concat.footer(TEMPLATE_FOOTER))
.pipe(uglify())
.pipe(gulp.dest(options.static + 'js/'));
});