aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-ui
diff options
context:
space:
mode:
authorsvishnev <shlomo-stanisla.vishnevetskiy@amdocs.com>2018-01-23 16:55:40 +0200
committersvishnev <shlomo-stanisla.vishnevetskiy@amdocs.com>2018-01-23 16:55:47 +0200
commitd9a5fea4afb6f4542fbf395615e1fc78b74a2298 (patch)
tree9ffdee507a62ee2f4adbcdbb1143c1592f79c7a7 /openecomp-ui
parent9370a639b9e692621c59ff3a15590b9354e9d178 (diff)
removing gulp-helpers from openecomp-ui build
Issue-ID: SDC-960 Change-Id: I0a3f1e3814a9bdc68ec9ef3945812e59cf3f92b5 Signed-off-by: svishnev <shlomo-stanisla.vishnevetskiy@amdocs.com>
Diffstat (limited to 'openecomp-ui')
-rw-r--r--openecomp-ui/gulpfile.js70
-rw-r--r--openecomp-ui/package.json6
-rw-r--r--openecomp-ui/resources/scss/_components.scss1
-rw-r--r--openecomp-ui/resources/scss/components/_punchOut.scss12
-rw-r--r--openecomp-ui/resources/scss/onboarding.scss12
5 files changed, 69 insertions, 32 deletions
diff --git a/openecomp-ui/gulpfile.js b/openecomp-ui/gulpfile.js
index 8ca9a233aa..331724b757 100644
--- a/openecomp-ui/gulpfile.js
+++ b/openecomp-ui/gulpfile.js
@@ -1,12 +1,13 @@
'use strict';
let gulp = require('gulp');
-let gulpHelpers = require('gulp-helpers');
+
let replace = require('gulp-replace');
-let taskMaker = gulpHelpers.taskMaker(gulp);
-let runSequence = gulpHelpers.framework('run-sequence');
+let del = require('del');
+let zip = require('gulp-zip');
+let gulpSass = require('gulp-sass');
+let runSequence = require('run-sequence');
let gulpCssUsage = require('gulp-css-usage').default;
-
let prodTask = require('./tools/gulp/tasks/prod');
let i18nTask = require('./tools/gulp/tasks/i18n.js');
@@ -52,24 +53,57 @@ const path = {
//storybookDistResources: './.storybook-dist/onboarding/resources/images/svg'
};
// cleans up the output directory
-taskMaker.defineTask('clean', {taskName: 'clean', src: path.output});
-// copies for all relevant files to the output directory
-taskMaker.defineTask('copy', {taskName: 'copy-json', src: path.json, dest: path.output, changed: {extension: '.json'}});
-taskMaker.defineTask('copy', {taskName: 'copy-index.html', src: path.index, dest: path.output, rename: 'index.html'});
-taskMaker.defineTask('copy', {taskName: 'copy-heat.html', src: path.heat, dest: path.output, rename: 'heat.html'});
-//taskMaker.defineTask('copy', {taskName: 'copy-svg', src: path.svgSrc, dest: path.svg});
-taskMaker.defineTask('copy', {taskName: 'copy-storybook-fonts', src: path.storybookFonts, dest: path.storybookDist});
-//taskMaker.defineTask('copy', {taskName: 'copy-storybook-resources', src: path.svgSrc, dest: path.storybookResources});
-//taskMaker.defineTask('copy', {taskName: 'copy-storybook-resources-prod', src: path.svgSrc, dest: path.storybookDistResources});
+
+gulp.task('clean', callback => {
+ return del([path.output], callback);
+})
+// copies for all relevant files to the output directory'
+
+gulp.task('copy-json', () => {
+ gulp.src(path.json)
+ .pipe(gulp.dest(path.output));
+});
+
+gulp.task('copy-index.html', () => {
+ gulp.src(path.index)
+ .pipe(gulp.dest(path.output));
+});
+
+gulp.task('copy-heat.html', () => {
+ gulp.src(path.heat)
+ .pipe(gulp.dest(path.output));
+});
+
+gulp.task('copy-storybook-fonts', () => {
+ gulp.src(path.storybookFonts)
+ .pipe(gulp.dest(path.storybookDist));
+});
+
// used for compressing war files
-taskMaker.defineTask('compress', {taskName: 'compress-war', src: path.war, filename: appName + '.war', dest: path.wardest});
-taskMaker.defineTask('compress', {taskName: 'compress-heat-war', src: path.heatWar, filename: 'heat-validation.war', dest: path.wardest});
-// used for watching for changes for test
-taskMaker.defineTask('watch', {taskName: 'watch-stuff', src: [path.json, path.index, path.heat], tasks: ['copy-stuff']});
+/**
+ * replaced with gulp
+ */
+gulp.task('compress-war', ()=> {
+ gulp.src(path.war)
+ .pipe(zip(appName + '.war'))
+ .pipe(gulp.dest(path.wardest));
+});
+
+gulp.task('compress-heat-war', ()=> {
+ gulp.src(path.heatWar)
+ .pipe(zip('heat-validation.war'))
+ .pipe(gulp.dest(path.wardest));
+});
//TODO: delete this task after gulp-css-usage support for SCSS files
-taskMaker.defineTask('sass', {taskName: 'sass', src: path.scss, dest: path.css, config: {outputStyle: 'compressed'}});
+gulp.task('sass', () => {
+ return gulp.src(path.scss)
+ .pipe(gulpSass({outputStyle: 'compressed'}).on('error', gulpSass.logError))
+ .pipe(gulp.dest(path.css));
+});
+
+
// copy the healthcheck file and replace the version with command line argument
gulp.task('healthcheck', function(){
diff --git a/openecomp-ui/package.json b/openecomp-ui/package.json
index acf7d6faad..783a043d8f 100644
--- a/openecomp-ui/package.json
+++ b/openecomp-ui/package.json
@@ -72,7 +72,9 @@
"babel-preset-stage-0": "^6.22.0",
"css-loader": "^0.23.1",
"deep-freeze": "0.0.1",
+ "del": "^3.0.0",
"enzyme": "^2.7.1",
+ "eslint": "^2.13.1",
"eslint-loader": "^1.3.0",
"eslint-plugin-import": "^0.8.1",
"eslint-plugin-react": "^3.14.0",
@@ -81,10 +83,11 @@
"gulp": "^3.9.1",
"gulp-clean": "^0.3.1",
"gulp-css-usage": "^2.0.0",
- "gulp-helpers": "^5.0.0",
"gulp-rename": "^1.2.2",
"gulp-replace": "^0.5.4",
+ "gulp-sass": "^3.1.0",
"gulp-tap": "^1.0.1",
+ "gulp-zip": "^4.1.0",
"html-loader": "^0.4.3",
"http-proxy-middleware": "^0.17.4",
"ignore-loader": "^0.1.1",
@@ -101,6 +104,7 @@
"react-click-outside": "^2.3.1",
"react-hot-loader": "^3.1.3",
"rosie": "^1.6.0",
+ "run-sequence": "^2.2.1",
"sass-loader": "^3.2.3",
"source-map-loader": "^0.1.5",
"storyshots": "^3.2.2",
diff --git a/openecomp-ui/resources/scss/_components.scss b/openecomp-ui/resources/scss/_components.scss
index 7f73047c91..13af5984e3 100644
--- a/openecomp-ui/resources/scss/_components.scss
+++ b/openecomp-ui/resources/scss/_components.scss
@@ -1,4 +1,3 @@
-@import "components/punchOut";
@import "components/forms";
@import "components/validationForm";
@import "components/dualListBox";
diff --git a/openecomp-ui/resources/scss/components/_punchOut.scss b/openecomp-ui/resources/scss/components/_punchOut.scss
deleted file mode 100644
index 65ba24d884..0000000000
--- a/openecomp-ui/resources/scss/components/_punchOut.scss
+++ /dev/null
@@ -1,12 +0,0 @@
-&.dox-ui-punch-out {
- background-color: $content-background-color;
-}
-
-&.dox-ui-punch-out.dox-ui-punch-out-full-page {
- position: absolute;
- top: 0;
- bottom: 0;
- left: 0;
- right: 0;
- overflow-y: auto;
-}
diff --git a/openecomp-ui/resources/scss/onboarding.scss b/openecomp-ui/resources/scss/onboarding.scss
index 2c7c55530d..7748b07019 100644
--- a/openecomp-ui/resources/scss/onboarding.scss
+++ b/openecomp-ui/resources/scss/onboarding.scss
@@ -6,6 +6,18 @@
@import "common";
@import "components";
@import "modules";
+
+ &.dox-ui-punch-out {
+ background-color: $content-background-color;
+ &.dox-ui-punch-out-full-page {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ overflow-y: auto;
+ }
+ }
}
/* Out of namespace context for datepicker */