Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DA357180A3 for ; Thu, 3 Dec 2015 03:14:25 +0000 (UTC) Received: (qmail 85977 invoked by uid 500); 3 Dec 2015 03:14:25 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 85938 invoked by uid 500); 3 Dec 2015 03:14:25 -0000 Mailing-List: contact commits-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list commits@ignite.apache.org Received: (qmail 85920 invoked by uid 99); 3 Dec 2015 03:14:25 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Dec 2015 03:14:25 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 1DC28E67DC; Thu, 3 Dec 2015 03:14:25 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: anovikov@apache.org To: commits@ignite.apache.org Date: Thu, 03 Dec 2015 03:14:25 -0000 Message-Id: <57ac555b31734752bae244f2a84d2c92@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] ignite git commit: IGNITE-2066 update tasks - Fixes #285. Repository: ignite Updated Branches: refs/heads/ignite-843-rc2 30e30b2a8 -> 8fa0895f8 IGNITE-2066 update tasks - Fixes #285. Signed-off-by: Andrey Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/68864355 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/68864355 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/68864355 Branch: refs/heads/ignite-843-rc2 Commit: 68864355fe284522541c1094343bc2577011d1f4 Parents: 30e30b2 Author: Dmitriyff Authored: Thu Dec 3 09:57:20 2015 +0700 Committer: Andrey Committed: Thu Dec 3 09:57:20 2015 +0700 ---------------------------------------------------------------------- modules/control-center-web/DEVNOTES.txt | 3 +- .../src/main/js/gulpfile.js/index.js | 2 +- .../src/main/js/gulpfile.js/tasks/build.js | 2 +- .../src/main/js/gulpfile.js/tasks/bundle.js | 32 +++++++++++++++-- .../src/main/js/gulpfile.js/tasks/concat.js | 37 -------------------- .../src/main/js/gulpfile.js/tasks/connect.js | 2 ++ modules/control-center-web/src/main/js/serve.js | 17 ++++++++- 7 files changed, 51 insertions(+), 44 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/68864355/modules/control-center-web/DEVNOTES.txt ---------------------------------------------------------------------- diff --git a/modules/control-center-web/DEVNOTES.txt b/modules/control-center-web/DEVNOTES.txt index 462cc97..55620b9 100644 --- a/modules/control-center-web/DEVNOTES.txt +++ b/modules/control-center-web/DEVNOTES.txt @@ -20,4 +20,5 @@ How to run: 1.2 Run "mongod". 2. In new terminal change directory '$IGNITE_HOME/modules/control-center-web/src/main/js'. 3. Start application by executing "npm start". -4. In browser open: http://localhost:3000 +4. Start "gulp connect" to run virtual server +5. In browser open: http://localhost:8080 http://git-wip-us.apache.org/repos/asf/ignite/blob/68864355/modules/control-center-web/src/main/js/gulpfile.js/index.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/gulpfile.js/index.js b/modules/control-center-web/src/main/js/gulpfile.js/index.js index a961add..9577136 100644 --- a/modules/control-center-web/src/main/js/gulpfile.js/index.js +++ b/modules/control-center-web/src/main/js/gulpfile.js/index.js @@ -25,4 +25,4 @@ requireDir('./tasks', { recurse: true }); gulp.task('default', ['build']); // Build + watch + connect task. -gulp.task('watch', ['build', 'bundle:watch', 'sass:watch', 'jade:watch', 'copy:watch', 'concat:watch', 'connect']); +gulp.task('watch', ['build', 'bundle:ignite:watch', 'bundle:legacy:watch', 'sass:watch', 'jade:watch', 'copy:watch', 'concat:watch', 'connect']); http://git-wip-us.apache.org/repos/asf/ignite/blob/68864355/modules/control-center-web/src/main/js/gulpfile.js/tasks/build.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/gulpfile.js/tasks/build.js b/modules/control-center-web/src/main/js/gulpfile.js/tasks/build.js index 3f4cd61..acdad1d 100644 --- a/modules/control-center-web/src/main/js/gulpfile.js/tasks/build.js +++ b/modules/control-center-web/src/main/js/gulpfile.js/tasks/build.js @@ -19,7 +19,7 @@ var gulp = require('gulp'); var sequence = require('gulp-sequence'); gulp.task('build', function(cb) { - var tasks = ['clean', ['copy', 'jade', 'sass'], 'bundle', 'concat', 'inject:plugins']; + var tasks = ['clean', ['copy', 'jade', 'sass'], 'bundle', 'inject:plugins']; sequence.apply(null, tasks)(cb) }); http://git-wip-us.apache.org/repos/asf/ignite/blob/68864355/modules/control-center-web/src/main/js/gulpfile.js/tasks/bundle.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/gulpfile.js/tasks/bundle.js b/modules/control-center-web/src/main/js/gulpfile.js/tasks/bundle.js index ed9e65f..9d76dbf 100644 --- a/modules/control-center-web/src/main/js/gulpfile.js/tasks/bundle.js +++ b/modules/control-center-web/src/main/js/gulpfile.js/tasks/bundle.js @@ -18,16 +18,31 @@ var gulp = require('gulp'); var jspm = require('jspm'); var util = require('gulp-util'); +var concat = require('gulp-concat'); +var sequence = require('gulp-sequence'); var paths = [ './app/**/*.js' ]; +var legacy_paths = [ + '!./controllers/common-module.js', + './controllers/*.js', + './controllers/**/*.js', + './helpers/generator/*.js', + './helpers/generator/**/*.js' +]; + + var options = { minify: true }; -gulp.task('bundle', function() { +gulp.task('bundle', function(cb) { + return sequence('bundle:ignite', 'bundle:legacy', cb); +}) + +gulp.task('bundle:ignite', function() { if (util.env.debug) { delete options.minify; } @@ -39,6 +54,17 @@ gulp.task('bundle', function() { return jspm.bundleSFX('app/index', 'build/app.min.js', options); }); -gulp.task('bundle:watch', function() { - gulp.watch(paths, ['bundle']) +gulp.task('bundle:legacy', function() { + return gulp.src(legacy_paths) + .pipe(concat('all.js')) + .pipe(gulp.dest('./build')) +}) + +gulp.task('bundle:ignite:watch', function() { + return gulp.watch(paths, ['bundle:ignite']) +}); + + +gulp.task('bundle:legacy:watch', function() { + return gulp.watch(legacy_paths, ['bundle:legacy']) }); http://git-wip-us.apache.org/repos/asf/ignite/blob/68864355/modules/control-center-web/src/main/js/gulpfile.js/tasks/concat.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/gulpfile.js/tasks/concat.js b/modules/control-center-web/src/main/js/gulpfile.js/tasks/concat.js deleted file mode 100644 index d17e2fe..0000000 --- a/modules/control-center-web/src/main/js/gulpfile.js/tasks/concat.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -var gulp = require('gulp'); -var concat = require('gulp-concat'); - -paths = [ - '!./controllers/common-module.js', - './controllers/*.js', - './controllers/**/*.js', - './helpers/generator/*.js', - './helpers/generator/**/*.js' -]; - -gulp.task('concat', function() { - return gulp.src(paths) - .pipe(concat('all.js')) - .pipe(gulp.dest('./build')) -}); - -gulp.task('concat:watch', function() { - gulp.watch(paths, ['concat']) -}); http://git-wip-us.apache.org/repos/asf/ignite/blob/68864355/modules/control-center-web/src/main/js/gulpfile.js/tasks/connect.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/gulpfile.js/tasks/connect.js b/modules/control-center-web/src/main/js/gulpfile.js/tasks/connect.js index d994691..d05e9b6 100644 --- a/modules/control-center-web/src/main/js/gulpfile.js/tasks/connect.js +++ b/modules/control-center-web/src/main/js/gulpfile.js/tasks/connect.js @@ -15,6 +15,8 @@ * limitations under the License. */ +// task run static server to local development + var gulp = require('gulp'); var connect = require('gulp-connect'); var modrewrite = require('connect-modrewrite'); http://git-wip-us.apache.org/repos/asf/ignite/blob/68864355/modules/control-center-web/src/main/js/serve.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/serve.js b/modules/control-center-web/src/main/js/serve.js index 3baf090..50e29bd 100644 --- a/modules/control-center-web/src/main/js/serve.js +++ b/modules/control-center-web/src/main/js/serve.js @@ -1,4 +1,19 @@ -#!/usr/bin/env node +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ /** * Module dependencies.