diff --git a/.production/gulpfile.js b/.production/gulpfile.js
index 0bec92d4a..e22d28e53 100644
--- a/.production/gulpfile.js
+++ b/.production/gulpfile.js
@@ -6,9 +6,10 @@ const rename = require('gulp-rename')
const replace = require('gulp-replace')
const debug = require('gulp-debug')
const fs = require('graceful-fs')
+const cleanhtml = require('gulp-cleanhtml')
// compress js (and ES6 > ES5)
-gulp.task('es62es5', () => {
+gulp.task('xjs', () => {
return gulp.src('../src/main/webapp/assets/js/**/*.js?(x)')
.pipe(gulp.dest('./js/es6'))
.pipe(babel())
@@ -20,40 +21,44 @@ gulp.task('es62es5', () => {
})
// compress css
-gulp.task('css', () => {
+gulp.task('xcss', () => {
return gulp.src('../src/main/webapp/assets/css/**/*.css')
.pipe(cssclean())
+ .pipe(debug({ title: 'compress file : ' }))
//.pipe(rename({ extname: '.min.css' }))
.pipe(gulp.dest('./build/css'))
})
// replace compressed js/css in jsp
// compress and replace inline js
-gulp.task('repljsp', () => {
- return gulp.src('../src/main/webapp/**/*-list.jsp')
- // .pipe(replace(/'
- // }))
- .pipe(replace(/ type="text\/babel"/ig, ''))
+ return ''
+ }))
+ .pipe(replace(/ type="text\/babel"/ig, '')) // remove type="text/babel"
+ .pipe(replace(/\.jsx"><\/script>/ig, '.js">')) // replace suffix .jsx > .js
+ .pipe(replace('', '')) // remove babel lib
+ // .pipe(cleanhtml())
.pipe(gulp.dest('./build/jsp'))
})
-gulp.task('default', ['es62es5'])
-
-gulp.task('all', ['es62es5', 'css', 'repljsp'])
\ No newline at end of file
+gulp.task('default', ['xjs'])
+gulp.task('all', ['xjs', 'xcss', 'xjsp'])
diff --git a/.production/package.json b/.production/package.json
index f70613514..dfdf7ab32 100644
--- a/.production/package.json
+++ b/.production/package.json
@@ -21,6 +21,7 @@
"gulp": "^3.9.1",
"gulp-babel": "^8.0.0",
"gulp-clean-css": "^3.10.0",
+ "gulp-cleanhtml": "^1.0.3",
"gulp-debug": "^4.0.0",
"gulp-read": "^1.0.1",
"gulp-rename": "^1.4.0",
diff --git a/src/main/webapp/admin/admin-entry.jsp b/src/main/webapp/admin/admin-entry.jsp
index f77035cb4..069d8981f 100644
--- a/src/main/webapp/admin/admin-entry.jsp
+++ b/src/main/webapp/admin/admin-entry.jsp
@@ -38,7 +38,7 @@
<%@ include file="/_include/Foot.jsp"%>
diff --git a/src/main/webapp/general-entity/record-view.jsp b/src/main/webapp/general-entity/record-view.jsp
index 6f943ff3d..46325b674 100644
--- a/src/main/webapp/general-entity/record-view.jsp
+++ b/src/main/webapp/general-entity/record-view.jsp
@@ -82,10 +82,10 @@