Skip to content

Commit

Permalink
automatic project update
Browse files Browse the repository at this point in the history
  • Loading branch information
jdubois committed Aug 17, 2016
1 parent 208e587 commit 3aefd9b
Show file tree
Hide file tree
Showing 459 changed files with 47,774 additions and 28,216 deletions.
2 changes: 1 addition & 1 deletion .yo-rc.json
Expand Up @@ -24,7 +24,7 @@
"en"
],
"serverPort": 8080,
"jhipsterVersion": "3.5.1",
"jhipsterVersion": "3.6.0",
"enableSocialSignIn": false,
"useSass": false,
"jhiPrefix": "jhi"
Expand Down
45 changes: 22 additions & 23 deletions bower.json
Expand Up @@ -4,49 +4,49 @@
"appPath": "src/main/webapp/",
"testPath": "src/test/javascript/spec",
"dependencies": {
"angular": "1.5.5",
"angular-aria": "1.5.5",
"angular": "1.5.8",
"angular-aria": "1.5.8",
"angular-bootstrap": "1.3.3",
"angular-cache-buster": "0.4.3",
"angular-cookies": "1.5.5",
"angular-cookies": "1.5.8",
"angular-dynamic-locale": "0.1.32",
"angular-i18n": "1.5.5",
"angular-i18n": "1.5.8",
"ngstorage": "0.3.10",
"angular-loading-bar": "0.9.0",
"angular-resource": "1.5.5",
"angular-sanitize": "1.5.5",
"angular-translate": "2.11.0",
"angular-translate-interpolation-messageformat": "2.11.0",
"angular-translate-loader-partial": "2.11.0",
"angular-translate-storage-cookie": "2.11.0",
"angular-ui-router": "0.3.0",
"angular-resource": "1.5.8",
"angular-sanitize": "1.5.8",
"angular-translate": "2.11.1",
"angular-translate-interpolation-messageformat": "2.11.1",
"angular-translate-loader-partial": "2.11.1",
"angular-translate-storage-cookie": "2.11.1",
"angular-ui-router": "0.3.1",
"bootstrap": "3.3.6",
"bootstrap-ui-datetime-picker": "2.4.0",
"jquery": "2.2.4",
"bootstrap-ui-datetime-picker": "2.4.3",
"jquery": "3.1.0",
"json3": "3.3.2",
"messageformat": "0.3.1",
"modernizr": "3.3.1",
"ng-file-upload": "12.0.4",
"ngInfiniteScroll": "1.2.2",
"swagger-ui": "2.1.4"
"ngInfiniteScroll": "1.3.0",
"swagger-ui": "2.1.5"
},
"devDependencies": {
"angular-mocks": "1.5.5"
"angular-mocks": "1.5.8"
},
"overrides": {
"angular": {
"dependencies": {
"jquery": "2.2.4"
"jquery": "3.1.0"
}
},
"angular-cache-buster": {
"dependencies": {
"angular": "1.5.5"
"angular": "1.5.8"
}
},
"angular-dynamic-locale": {
"dependencies": {
"angular": "1.5.5"
"angular": "1.5.8"
}
},
"bootstrap": {
Expand All @@ -56,9 +56,8 @@
}
},
"resolutions": {
"angular": "1.5.5",
"angular-cookies": "1.5.5",
"angular-bootstrap": "1.3.3",
"jquery": "2.2.4"
"angular": "1.5.8",
"angular-bootstrap": "2.0.0",
"jquery": "3.1.0"
}
}
7 changes: 4 additions & 3 deletions gulp/build.js
@@ -1,3 +1,5 @@
'use strict';

var fs = require('fs'),
gulp = require('gulp'),
lazypipe = require('lazypipe'),
Expand All @@ -13,13 +15,12 @@ var fs = require('fs'),
revReplace = require("gulp-rev-replace"),
plumber = require('gulp-plumber'),
gulpIf = require('gulp-if'),
handleErrors = require('./handleErrors');
handleErrors = require('./handle-errors');

var config = require('./config');

var initTask = lazypipe()
.pipe(sourcemaps.init)
.pipe(footer, ';');
.pipe(sourcemaps.init);
var jsTask = lazypipe()
.pipe(ngAnnotate)
.pipe(uglify);
Expand Down
3 changes: 3 additions & 0 deletions gulp/config.js
@@ -1,6 +1,9 @@
'use strict';

module.exports = {
app: 'src/main/webapp/',
dist: 'target/www/',
swaggerDist: 'target/www/swagger-ui/',
test: 'src/test/javascript/',
bower: 'src/main/webapp/bower_components/',
tmp: 'target/tmp',
Expand Down
102 changes: 102 additions & 0 deletions gulp/copy.js
@@ -0,0 +1,102 @@
'use strict';

var gulp = require('gulp'),
rev = require('gulp-rev'),
plumber = require('gulp-plumber'),
es = require('event-stream'),
flatten = require('gulp-flatten'),
replace = require('gulp-replace'),
bowerFiles = require('main-bower-files'),
changed = require('gulp-changed');

var handleErrors = require('./handle-errors');
var config = require('./config');

module.exports = {
i18n: i18n,
languages: languages,
fonts: fonts,
common: common,
swagger: swagger,
images: images
}

var yorc = require('../.yo-rc.json')['generator-jhipster'];

function i18n() {
return gulp.src(config.app + 'i18n/**')
.pipe(plumber({errorHandler: handleErrors}))
.pipe(changed(config.dist + 'i18n/'))
.pipe(gulp.dest(config.dist + 'i18n/'));
}

function languages() {
var locales = yorc.languages.map(function (locale) {
return config.bower + 'angular-i18n/angular-locale_' + locale + '.js';
});
return gulp.src(locales)
.pipe(plumber({errorHandler: handleErrors}))
.pipe(changed(config.app + 'i18n/'))
.pipe(gulp.dest(config.app + 'i18n/'));
}

function fonts() {
return es.merge(gulp.src(config.bower + 'bootstrap/fonts/*.*')
.pipe(plumber({errorHandler: handleErrors}))
.pipe(changed(config.dist + 'content/fonts/'))
.pipe(rev())
.pipe(gulp.dest(config.dist + 'content/fonts/'))
.pipe(rev.manifest(config.revManifest, {
base: config.dist,
merge: true
}))
.pipe(gulp.dest(config.dist)),
gulp.src(config.app + 'content/**/*.{woff,woff2,svg,ttf,eot,otf}')
.pipe(plumber({errorHandler: handleErrors}))
.pipe(changed(config.dist + 'content/fonts/'))
.pipe(flatten())
.pipe(rev())
.pipe(gulp.dest(config.dist + 'content/fonts/'))
.pipe(rev.manifest(config.revManifest, {
base: config.dist,
merge: true
}))
.pipe(gulp.dest(config.dist))
);
}

function common() {
return gulp.src([config.app + 'robots.txt', config.app + 'favicon.ico', config.app + '.htaccess'], { dot: true })
.pipe(plumber({errorHandler: handleErrors}))
.pipe(changed(config.dist))
.pipe(gulp.dest(config.dist));
}

function swagger() {
return es.merge(
gulp.src([config.bower + 'swagger-ui/dist/**',
'!' + config.bower + 'swagger-ui/dist/index.html',
'!' + config.bower + 'swagger-ui/dist/swagger-ui.min.js',
'!' + config.bower + 'swagger-ui/dist/swagger-ui.js'])
.pipe(plumber({errorHandler: handleErrors}))
.pipe(changed(config.swaggerDist))
.pipe(gulp.dest(config.swaggerDist)),
gulp.src(config.app + 'swagger-ui/index.html')
.pipe(plumber({errorHandler: handleErrors}))
.pipe(changed(config.swaggerDist))
.pipe(replace('../bower_components/swagger-ui/dist/', ''))
.pipe(replace('swagger-ui.js', 'lib/swagger-ui.min.js'))
.pipe(gulp.dest(config.swaggerDist)),
gulp.src(config.bower + 'swagger-ui/dist/swagger-ui.min.js')
.pipe(plumber({errorHandler: handleErrors}))
.pipe(changed(config.swaggerDist + 'lib/'))
.pipe(gulp.dest(config.swaggerDist + 'lib/'))
);
}

function images() {
return gulp.src(bowerFiles({filter: ['**/*.{gif,jpg,png}']}), { base: config.bower })
.pipe(plumber({errorHandler: handleErrors}))
.pipe(changed(config.dist + 'bower_components'))
.pipe(gulp.dest(config.dist + 'bower_components'));
}
22 changes: 22 additions & 0 deletions gulp/handle-errors.js
@@ -0,0 +1,22 @@
'use strict';

var notify = require("gulp-notify");
var argv = require('yargs').argv;

module.exports = function() {

var args = Array.prototype.slice.call(arguments);
var notification = argv.notification === undefined ? true : argv.notification;
// Send error to notification center with gulp-notify
if(notification) {
notify.onError({
title: "JHipster Gulp Build",
subtitle: "Failure!",
message: "Error: <%= error.message %>",
sound: "Beep"
}).apply(this, args);
}
// Keep gulp from hanging on this task
this.emit('end');

};
68 changes: 68 additions & 0 deletions gulp/inject.js
@@ -0,0 +1,68 @@
'use strict';

var gulp = require('gulp'),
plumber = require('gulp-plumber'),
inject = require('gulp-inject'),
es = require('event-stream'),
naturalSort = require('gulp-natural-sort'),
angularFilesort = require('gulp-angular-filesort'),
bowerFiles = require('main-bower-files');

var handleErrors = require('./handle-errors');

var config = require('./config');

module.exports = {
app: app,
vendor: vendor,
test: test,
troubleshoot: troubleshoot
}

function app() {
return gulp.src(config.app + 'index.html')
.pipe(inject(gulp.src(config.app + 'app/**/*.js')
.pipe(naturalSort())
.pipe(angularFilesort()), {relative: true}))
.pipe(gulp.dest(config.app));
}

function vendor() {
var stream = gulp.src(config.app + 'index.html')
.pipe(plumber({errorHandler: handleErrors}))
.pipe(inject(gulp.src(bowerFiles(), {read: false}), {
name: 'bower',
relative: true
}))
.pipe(gulp.dest(config.app));

return stream;
}

function test() {
return gulp.src(config.test + 'karma.conf.js')
.pipe(plumber({errorHandler: handleErrors}))
.pipe(inject(gulp.src(bowerFiles({includeDev: true, filter: ['**/*.js']}), {read: false}), {
starttag: '// bower:js',
endtag: '// endbower',
transform: function (filepath) {
return '\'' + filepath.substring(1, filepath.length) + '\',';
}
}))
.pipe(gulp.dest(config.test));
}

function troubleshoot() {
/* this task removes the troubleshooting content from index.html*/
return gulp.src(config.app + 'index.html')
.pipe(plumber({errorHandler: handleErrors}))
/* having empty src as we dont have to read any files*/
.pipe(inject(gulp.src('', {read: false}), {
starttag: '<!-- inject:troubleshoot -->',
removeTags: true,
transform: function () {
return '<!-- Angular views -->';
}
}))
.pipe(gulp.dest(config.app));
}
2 changes: 2 additions & 0 deletions gulp/serve.js
@@ -1,3 +1,5 @@
'use strict';

var gulp = require('gulp'),
util = require('./utils'),
url = require('url'),
Expand Down

0 comments on commit 3aefd9b

Please sign in to comment.