mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
run bower during maven build
This commit is contained in:
21
gulpfile.js
21
gulpfile.js
@@ -4,7 +4,6 @@ var revReplace = require('gulp-rev-replace');
|
|||||||
var minifyCSS = require('gulp-minify-css');
|
var minifyCSS = require('gulp-minify-css');
|
||||||
var uglify = require('gulp-uglify');
|
var uglify = require('gulp-uglify');
|
||||||
var filter = require('gulp-filter');
|
var filter = require('gulp-filter');
|
||||||
var bower = require('gulp-bower');
|
|
||||||
var connect = require('gulp-connect');
|
var connect = require('gulp-connect');
|
||||||
var modRewrite = require('connect-modrewrite');
|
var modRewrite = require('connect-modrewrite');
|
||||||
var sass = require('gulp-sass');
|
var sass = require('gulp-sass');
|
||||||
@@ -15,16 +14,6 @@ var SRC_DIR = 'src/main/app/';
|
|||||||
var TEMP_DIR = 'target/gulp/'
|
var TEMP_DIR = 'target/gulp/'
|
||||||
var BUILD_DIR = 'target/classes/assets/';
|
var BUILD_DIR = 'target/classes/assets/';
|
||||||
|
|
||||||
gulp.task('bower_prune', function() {
|
|
||||||
return bower({
|
|
||||||
cmd : 'prune'
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task('bower', ['bower_prune'], function() {
|
|
||||||
return bower();
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task('images', function() {
|
gulp.task('images', function() {
|
||||||
return gulp.src(SRC_DIR + 'images/**/*').pipe(gulp.dest(BUILD_DIR + 'images'));
|
return gulp.src(SRC_DIR + 'images/**/*').pipe(gulp.dest(BUILD_DIR + 'images'));
|
||||||
});
|
});
|
||||||
@@ -44,20 +33,20 @@ gulp.task('sass', function() {
|
|||||||
return gulp.src(SRC_DIR + 'sass/app.scss').pipe(sass()).pipe(gulp.dest(TEMP_DIR + 'css'));
|
return gulp.src(SRC_DIR + 'sass/app.scss').pipe(sass()).pipe(gulp.dest(TEMP_DIR + 'css'));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('fonts', ['bower'], function() {
|
gulp.task('fonts', function() {
|
||||||
var font_awesome = SRC_DIR + 'lib/font-awesome/font/fontawesome-webfont.*';
|
var font_awesome = SRC_DIR + 'lib/font-awesome/font/fontawesome-webfont.*';
|
||||||
var zocial = SRC_DIR + 'lib/zocial-less/css/zocial-regular-*';
|
var zocial = SRC_DIR + 'lib/zocial-less/css/zocial-regular-*';
|
||||||
var readabilicons = SRC_DIR + 'lib/readabilicons/webfont/fonts/readabilicons-*';
|
var readabilicons = SRC_DIR + 'lib/readabilicons/webfont/fonts/readabilicons-*';
|
||||||
return gulp.src([font_awesome, zocial, readabilicons]).pipe(gulp.dest(BUILD_DIR + 'font'));
|
return gulp.src([font_awesome, zocial, readabilicons]).pipe(gulp.dest(BUILD_DIR + 'font'));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('select2', ['bower'], function() {
|
gulp.task('select2', function() {
|
||||||
var gif = SRC_DIR + 'lib/select2/*.gif';
|
var gif = SRC_DIR + 'lib/select2/*.gif';
|
||||||
var png = SRC_DIR + 'lib/select2/*.png';
|
var png = SRC_DIR + 'lib/select2/*.png';
|
||||||
return gulp.src([gif, png]).pipe(gulp.dest(BUILD_DIR + 'css'));
|
return gulp.src([gif, png]).pipe(gulp.dest(BUILD_DIR + 'css'));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('swagger-ui', ['bower'], function() {
|
gulp.task('swagger-ui', function() {
|
||||||
var index_html = SRC_DIR + 'api/index.html';
|
var index_html = SRC_DIR + 'api/index.html';
|
||||||
var lib = SRC_DIR + 'lib/swagger-ui/dist/**/*';
|
var lib = SRC_DIR + 'lib/swagger-ui/dist/**/*';
|
||||||
return gulp.src([lib, index_html]).pipe(gulp.dest(BUILD_DIR + 'api'));
|
return gulp.src([lib, index_html]).pipe(gulp.dest(BUILD_DIR + 'api'));
|
||||||
@@ -71,7 +60,7 @@ gulp.task('template-cache', function() {
|
|||||||
return gulp.src(SRC_DIR + 'templates/**/*.html').pipe(templateCache(options)).pipe(gulp.dest(TEMP_DIR + 'js'));
|
return gulp.src(SRC_DIR + 'templates/**/*.html').pipe(templateCache(options)).pipe(gulp.dest(TEMP_DIR + 'js'));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('build-dev', ['images', 'i18n', 'favicons', 'sass', 'fonts', 'select2', 'swagger-ui', 'template-cache', 'bower'], function() {
|
gulp.task('build-dev', ['images', 'i18n', 'favicons', 'sass', 'fonts', 'select2', 'swagger-ui', 'template-cache'], function() {
|
||||||
var assets = useref.assets({
|
var assets = useref.assets({
|
||||||
searchPath : [SRC_DIR, TEMP_DIR]
|
searchPath : [SRC_DIR, TEMP_DIR]
|
||||||
});
|
});
|
||||||
@@ -81,7 +70,7 @@ gulp.task('build-dev', ['images', 'i18n', 'favicons', 'sass', 'fonts', 'select2'
|
|||||||
revReplace()).pipe(gulp.dest(BUILD_DIR)).pipe(connect.reload());
|
revReplace()).pipe(gulp.dest(BUILD_DIR)).pipe(connect.reload());
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('build', ['images', 'i18n', 'favicons', 'sass', 'fonts', 'select2', 'swagger-ui', 'template-cache', 'bower'], function() {
|
gulp.task('build', ['images', 'i18n', 'favicons', 'sass', 'fonts', 'select2', 'swagger-ui', 'template-cache'], function() {
|
||||||
var assets = useref.assets({
|
var assets = useref.assets({
|
||||||
searchPath : [SRC_DIR, TEMP_DIR]
|
searchPath : [SRC_DIR, TEMP_DIR]
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"private": true,
|
"private": true,
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"bower": "1.3.12",
|
||||||
"gulp": "3.8.10",
|
"gulp": "3.8.10",
|
||||||
"gulp-rev": "2.0.1",
|
"gulp-rev": "2.0.1",
|
||||||
"gulp-rev-replace": "0.3.1",
|
"gulp-rev-replace": "0.3.1",
|
||||||
"gulp-minify-css": "0.3.11",
|
"gulp-minify-css": "0.3.11",
|
||||||
"gulp-uglify": "1.0.2",
|
"gulp-uglify": "1.0.2",
|
||||||
"gulp-filter": "1.0.2",
|
"gulp-filter": "1.0.2",
|
||||||
"gulp-bower": "0.0.7",
|
|
||||||
"gulp-connect": "2.2.0",
|
"gulp-connect": "2.2.0",
|
||||||
"connect-modrewrite": "0.7.9",
|
"connect-modrewrite": "0.7.9",
|
||||||
"gulp-sass": "1.2.4",
|
"gulp-sass": "1.2.4",
|
||||||
|
|||||||
11
pom.xml
11
pom.xml
@@ -99,7 +99,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>com.github.eirslett</groupId>
|
<groupId>com.github.eirslett</groupId>
|
||||||
<artifactId>frontend-maven-plugin</artifactId>
|
<artifactId>frontend-maven-plugin</artifactId>
|
||||||
<version>0.0.19</version>
|
<version>0.0.20</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>install node and npm</id>
|
<id>install node and npm</id>
|
||||||
@@ -119,6 +119,15 @@
|
|||||||
</goals>
|
</goals>
|
||||||
<phase>generate-resources</phase>
|
<phase>generate-resources</phase>
|
||||||
</execution>
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>bower install</id>
|
||||||
|
<goals>
|
||||||
|
<goal>bower</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<arguments>install</arguments>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
<execution>
|
<execution>
|
||||||
<id>gulp build</id>
|
<id>gulp build</id>
|
||||||
<goals>
|
<goals>
|
||||||
|
|||||||
Reference in New Issue
Block a user