You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ja...@apache.org on 2015/08/09 21:54:10 UTC
ambari git commit: AMBARI-12684. Ambari web stylesheet should be
overridable on build time. (jaimin)
Repository: ambari
Updated Branches:
refs/heads/branch-2.1 3ba078d53 -> 0d86fec1c
AMBARI-12684. Ambari web stylesheet should be overridable on build time. (jaimin)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0d86fec1
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0d86fec1
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0d86fec1
Branch: refs/heads/branch-2.1
Commit: 0d86fec1cc78daa223f1d2928b92cbbf568292f7
Parents: 3ba078d
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Sun Aug 9 12:53:40 2015 -0700
Committer: Jaimin Jetly <ja...@hortonworks.com>
Committed: Sun Aug 9 12:53:40 2015 -0700
----------------------------------------------------------------------
ambari-admin/pom.xml | 1 +
.../src/main/resources/ui/admin-web/gulpfile.js | 71 +++++++++++---------
.../main/resources/ui/admin-web/package.json | 2 +
ambari-web/config.coffee | 8 +--
4 files changed, 45 insertions(+), 37 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/0d86fec1/ambari-admin/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-admin/pom.xml b/ambari-admin/pom.xml
index 9125fb3..a8971e4 100644
--- a/ambari-admin/pom.xml
+++ b/ambari-admin/pom.xml
@@ -202,6 +202,7 @@
<exclude>src/main/resources/ui/admin-web/.bowerrc</exclude>
<exclude>src/main/resources/ui/admin-web/package.json</exclude>
<exclude>src/main/resources/ui/admin-web/.jshintrc</exclude>
+ <exclude>src/main/resources/ui/admin-web/.idea/**</exclude>
</excludes>
</configuration>
<executions>
http://git-wip-us.apache.org/repos/asf/ambari/blob/0d86fec1/ambari-admin/src/main/resources/ui/admin-web/gulpfile.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/gulpfile.js b/ambari-admin/src/main/resources/ui/admin-web/gulpfile.js
index a4339b2..8b3dd8c 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/gulpfile.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/gulpfile.js
@@ -24,60 +24,65 @@ var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
gulp.task('styles', function () {
- return gulp.src('app/styles/main.css')
- .pipe($.autoprefixer('last 1 version'))
- .pipe(gulp.dest('.tmp/styles'))
- .pipe($.size());
+ return gulp.src('app/styles/*.css')
+ .pipe($.order([
+ 'app/styles/main.css',
+ 'app/styles/custom-admin-ui.css' // This should always be the last stylesheet. So it can be dropped and be effective on build time
+ ], { base: './' }))
+ .pipe($.concat('main.css'))
+ .pipe($.autoprefixer('last 1 version'))
+ .pipe(gulp.dest('.tmp/styles'))
+ .pipe($.size());
});
gulp.task('html', ['styles'], function () {
- var jsFilter = $.filter('**/*.js');
- var cssFilter = $.filter('**/*.css');
+ var jsFilter = $.filter('**/*.js');
+ var cssFilter = $.filter('**/*.css');
- return gulp.src('app/*.html')
- .pipe($.plumber())
- .pipe($.useref.assets({searchPath: '{.tmp,app}'}))
- .pipe(jsFilter)
- .pipe($.uglify())
- .pipe(jsFilter.restore())
- .pipe(cssFilter)
- .pipe(cssFilter.restore())
- .pipe($.useref.restore())
- .pipe($.useref())
- .pipe(gulp.dest('dist'))
- .pipe($.size());
+ return gulp.src('app/*.html')
+ .pipe($.plumber())
+ .pipe($.useref.assets({searchPath: '{.tmp,app}'}))
+ .pipe(jsFilter)
+ .pipe($.uglify())
+ .pipe(jsFilter.restore())
+ .pipe(cssFilter)
+ .pipe(cssFilter.restore())
+ .pipe($.useref.restore())
+ .pipe($.useref())
+ .pipe(gulp.dest('dist'))
+ .pipe($.size());
});
-gulp.task('views', function() {
- return gulp.src('app/views/**/*.html')
- .pipe(gulp.dest('dist/views'));
+gulp.task('views', function () {
+ return gulp.src('app/views/**/*.html')
+ .pipe(gulp.dest('dist/views'));
});
gulp.task('images', function () {
- return gulp.src('app/images/**/*')
- .pipe(gulp.dest('dist/images'))
- .pipe($.size());
+ return gulp.src('app/images/**/*')
+ .pipe(gulp.dest('dist/images'))
+ .pipe($.size());
});
gulp.task('fonts', function () {
- return $.bowerFiles()
- .pipe($.filter('**/*.{eot,svg,ttf,woff}'))
- .pipe($.flatten())
- .pipe(gulp.dest('dist/fonts'))
- .pipe($.size());
+ return $.bowerFiles()
+ .pipe($.filter('**/*.{eot,svg,ttf,woff}'))
+ .pipe($.flatten())
+ .pipe(gulp.dest('dist/fonts'))
+ .pipe($.size());
});
gulp.task('extras', function () {
- return gulp.src(['app/*.*', '!app/*.html'], { dot: true })
- .pipe(gulp.dest('dist'));
+ return gulp.src(['app/*.*', '!app/*.html'], {dot: true})
+ .pipe(gulp.dest('dist'));
});
gulp.task('clean', function () {
- return gulp.src(['.tmp', 'dist'], { read: false }).pipe($.clean());
+ return gulp.src(['.tmp', 'dist'], {read: false}).pipe($.clean());
});
gulp.task('build', ['html', 'views', 'images', 'fonts', 'extras']);
gulp.task('default', ['clean'], function () {
- gulp.start('build');
+ gulp.start('build');
});
http://git-wip-us.apache.org/repos/asf/ambari/blob/0d86fec1/ambari-admin/src/main/resources/ui/admin-web/package.json
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/package.json b/ambari-admin/src/main/resources/ui/admin-web/package.json
index 2f49d00..42f584e 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/package.json
+++ b/ambari-admin/src/main/resources/ui/admin-web/package.json
@@ -16,6 +16,8 @@
"gulp-size": "0.3.0",
"gulp-uglify": "0.2.1",
"gulp-useref": "0.4.2",
+ "gulp-concat": "2.6.0",
+ "gulp-order": "1.1.1",
"http-server": "0.6.1",
"karma": "0.12.16",
"karma-chrome-launcher": "0.1.4",
http://git-wip-us.apache.org/repos/asf/ambari/blob/0d86fec1/ambari-web/config.coffee
----------------------------------------------------------------------
diff --git a/ambari-web/config.coffee b/ambari-web/config.coffee
index 580f05a..3410ac8 100644
--- a/ambari-web/config.coffee
+++ b/ambari-web/config.coffee
@@ -72,15 +72,15 @@ exports.config =
order:
before: [
'vendor/styles/bootstrap.css',
-# 'vendor/styles/datepicker.css'
- 'vendor/styles/font-awesome.css'
+ 'vendor/styles/font-awesome.css',
'vendor/styles/font-awesome-ie7.css',
'vendor/styles/cubism.css',
- 'vendor/styles/rickshaw.css'
+ 'vendor/styles/rickshaw.css',
'vendor/styles/bootstrap-combobox.css',
'vendor/styles/bootstrap-checkbox.css',
'vendor/styles/bootstrap-slider.min.css'
- ]
+ ],
+ after: ['app/styles/custom-ui.css']
templates:
precompile: true