ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject ignite git commit: IGNITE-843 Support for ignite_modules.
Date Thu, 19 Nov 2015 08:17:27 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc1 90bc913fe -> 1b5bfce1d


IGNITE-843 Support for ignite_modules.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/1b5bfce1
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/1b5bfce1
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/1b5bfce1

Branch: refs/heads/ignite-843-rc1
Commit: 1b5bfce1da11458afcbc23d2b91db69a3caf9ef8
Parents: 90bc913
Author: Andrey <anovikov@gridgain.com>
Authored: Thu Nov 19 15:17:18 2015 +0700
Committer: Andrey <anovikov@gridgain.com>
Committed: Thu Nov 19 15:17:18 2015 +0700

----------------------------------------------------------------------
 .../src/main/js/gulpfile.js/tasks/copy.js       | 14 ++++----
 .../src/main/js/gulpfile.js/tasks/jade.js       | 34 ++++++++++++--------
 2 files changed, 29 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/1b5bfce1/modules/control-center-web/src/main/js/gulpfile.js/tasks/copy.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/gulpfile.js/tasks/copy.js b/modules/control-center-web/src/main/js/gulpfile.js/tasks/copy.js
index 67d9582..04a144f 100644
--- a/modules/control-center-web/src/main/js/gulpfile.js/tasks/copy.js
+++ b/modules/control-center-web/src/main/js/gulpfile.js/tasks/copy.js
@@ -18,6 +18,8 @@
 var gulp = require('gulp');
 var gulpSequence = require('gulp-sequence');
 
+var igniteModules = process.env.IGNITE_MODULES || './ignite_modules';
+
 var paths = [
     './app/**/**/*.js',
     './controllers/*.js',
@@ -29,10 +31,10 @@ var paths = [
     './public/**/*.js'
 ];
 
-var pluginPaths = [
-    './ignite_modules/**/main.js',
-    './ignite_modules/**/controllers/*.js',
-    './ignite_modules/**/controllers/models/*.json'
+var igniteModulePaths = [
+    igniteModules + '/**/main.js',
+    igniteModules + '/**/controllers/*.js',
+    igniteModules + '/**/controllers/models/*.json'
 ];
 
 gulp.task('copy', function(cb) {
@@ -44,11 +46,11 @@ gulp.task('copy:source', function(cb) {
 });
 
 gulp.task('copy:ignite_modules', function(cb) {
-    return gulp.src(pluginPaths).pipe(gulp.dest('./build/ignite_modules'))
+    return gulp.src(igniteModulePaths).pipe(gulp.dest('./build/ignite_modules'))
 });
 
 gulp.task('copy:watch', function(cb) {
-    gulp.watch(paths, function(glob) {
+    gulp.watch([paths, igniteModulePaths], function(glob) {
         gulpSequence('copy', 'inject:plugins:js')(cb)
     })
 });

http://git-wip-us.apache.org/repos/asf/ignite/blob/1b5bfce1/modules/control-center-web/src/main/js/gulpfile.js/tasks/jade.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/gulpfile.js/tasks/jade.js b/modules/control-center-web/src/main/js/gulpfile.js/tasks/jade.js
index 27087ba..f58d70e 100644
--- a/modules/control-center-web/src/main/js/gulpfile.js/tasks/jade.js
+++ b/modules/control-center-web/src/main/js/gulpfile.js/tasks/jade.js
@@ -16,8 +16,10 @@
  */
 
 var gulp = require('gulp');
-var jade = require('gulp-jade');
-var sequence = require('gulp-sequence');
+var gulpJade = require('gulp-jade');
+var gulpSequence = require('gulp-sequence');
+
+var igniteModules = process.env.IGNITE_MODULES || './ignite_modules';
 
 var paths = [
     '!./views/error.jade',
@@ -25,22 +27,28 @@ var paths = [
     './views/**/*.jade'
 ];
 
-var pluginPaths = [
-    './ignite_modules/**/view/**/*.jade'
+var igniteModulePaths = [
+    igniteModules + '/**/view/**/*.jade'
 ];
 
-var options = {
+var jadeOptions = {
+    basedir: './'
 };
 
-gulp.task('jade', function() {
-    return sequence(
-        gulp.src(paths).pipe(jade(options)).pipe(gulp.dest('./build')),
-        gulp.src(pluginPaths).pipe(jade(options)).pipe(gulp.dest('./build/ignite_modules'))
-    );
+gulp.task('jade', function(cb) {
+    return gulpSequence('jade:source', 'jade:ignite_modules')(cb)
+});
+
+gulp.task('jade:source', function (cb) {
+    return gulp.src(paths).pipe(gulpJade(jadeOptions)).pipe(gulp.dest('./build'));
+});
+
+gulp.task('jade:ignite_modules', function (cb) {
+    return gulp.src(igniteModulePaths).pipe(gulpJade(jadeOptions)).pipe(gulp.dest('./build/ignite_modules'));
 });
 
-gulp.task('jade:watch', function () {
-    return gulp.watch(paths, function(e) {
-        sequence('jade', 'inject:plugins:html')()
+gulp.task('jade:watch', function (cb) {
+    return gulp.watch([igniteModulePaths, paths], function(glob) {
+        gulpSequence('jade', 'inject:plugins:html')(cb)
     });
 });


Mime
View raw message