You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@senssoft.apache.org by po...@apache.org on 2019/01/14 04:02:41 UTC

incubator-senssoft-useralejs git commit: SENSSOFT-323 [WIP] Gulp 4.0.0 update, initial commit

Repository: incubator-senssoft-useralejs
Updated Branches:
  refs/heads/SENSSOFT-323 [created] 793f3b743


SENSSOFT-323 [WIP] Gulp 4.0.0 update, initial commit


Project: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/commit/793f3b74
Tree: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/tree/793f3b74
Diff: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/diff/793f3b74

Branch: refs/heads/SENSSOFT-323
Commit: 793f3b7436da4efe9b25fc4dc57a09133a3bfdec
Parents: a0f6724
Author: poorejc <po...@apache.org>
Authored: Sun Jan 13 23:02:05 2019 -0500
Committer: poorejc <po...@apache.org>
Committed: Sun Jan 13 23:02:05 2019 -0500

----------------------------------------------------------------------
 gulpfile.js  | 62 ++++++++++++++++++++++++++++---------------------------
 package.json |  9 +++++---
 2 files changed, 38 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/blob/793f3b74/gulpfile.js
----------------------------------------------------------------------
diff --git a/gulpfile.js b/gulpfile.js
old mode 100644
new mode 100755
index 3aac7b0..2bb6dec
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -14,24 +14,26 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-var gulp = require('gulp');
-var gutil = require('gulp-util');
-var del = require('del');
-var eslint = require('gulp-eslint');
-var rollup = require('rollup').rollup;
-var json = require('rollup-plugin-json');
-var uglify = require('gulp-uglify');
-var rename = require('gulp-rename');
-var mocha = require('gulp-mocha');
-var babel = require('babel-register');
-var jsonModify = require('gulp-json-modify');
-var filter = require('gulp-filter');
-var uglifyHarmony = require('uglify-js-harmony');
-var minifier = require('gulp-uglify/minifier');
-var replace = require('gulp-replace');
-var version = require('./package.json').version;
-var userale = 'userale-' + version;
-var userAleWebExtDirName = 'UserAleWebExtension';
+const composer = require('gulp-uglify/composer');
+const gulp = require('gulp');
+const gutil = require('gulp-util');
+const del = require('del');
+const eslint = require('gulp-eslint');
+const log = require('gulplog')
+const rollup = require('rollup').rollup;
+const json = require('rollup-plugin-json');
+const uglify = require('gulp-uglify');
+const rename = require('gulp-rename');
+const mocha = require('gulp-mocha');
+const babel = require('babel-register');
+const jsonModify = require('gulp-json-modify');
+const filter = require('gulp-filter');
+const pump = require('pump');
+const replace = require('gulp-replace');
+const version = require('./package.json').version;
+const uglifyjs = require('uglify-es');
+const userale = 'userale-' + version;
+const userAleWebExtDirName = 'UserAleWebExtension';
 
 // Clean build directory
 gulp.task('clean', function() {
@@ -105,21 +107,21 @@ gulp.task('rollup-web-ext-options', function() {
 });
 
 // Build for the browser web extension
-gulp.task('build-web-ext', ['rollup-web-ext-options', 'rollup-web-ext-background', 'rollup-web-ext-content'], function() {
+gulp.task('build-web-ext', gulp.series(['rollup-web-ext-content', 'rollup-web-ext-background', 'rollup-web-ext-options']), function() {
     return gulp.src(['src/' + userAleWebExtDirName + '/icons/**/*.*',
               'src/' + userAleWebExtDirName + '/manifest.json',
               'src/' + userAleWebExtDirName + '/optionsPage.html'
               ],
              { base: 'src/' + userAleWebExtDirName + '' })
-            .on('error', gutil.log)
+            .on('error', log.error)
             .pipe(gulp.dest('build/' + userAleWebExtDirName + '/'));        
 });
 
 // Minify and output completed build
-gulp.task('build', ['rollup', 'build-web-ext'], function() {
-  return gulp.src('build/' + userale + '.js')
+gulp.task('build', gulp.series(['rollup', 'build-web-ext']), function() {
+  return gulp.src(['build/' + userale + '.js'])
     .pipe(uglify())
-    .on('error', gutil.log)
+    .on('error', log.error)
     .pipe(rename({ suffix : '.min' }))
     .pipe(gulp.dest('build'))
     .pipe(rename(userale + '.min.js'))
@@ -128,25 +130,25 @@ gulp.task('build', ['rollup', 'build-web-ext'], function() {
 
 // Lint
 gulp.task('lint', function() {
-  return gulp.src('src/**/*.js')
+  return gulp.src(['src/**/*.js'])
     .pipe(eslint())
     .pipe(eslint.format());
 });
 
 // Test
 // TODO: separate out tests that depend on built library for faster tests?
-gulp.task('test', ['build', 'lint'], function() {
-  return gulp.src('test/**/*_spec.js', { read : false })
+gulp.task('test', gulp.series(['build', 'lint']), function() {
+  return gulp.src(['test/**/*_spec.js'], { read : false })
     .pipe(mocha({
-      compilers : 'js:babel-core/register'
+      require: ['babel-core/register']
     }))
     .on('error', function(err) {
-      gutil.log(err);
+      log.error(err);
       this.emit('end');
     });
 });
 
 // Development mode
-gulp.task('dev', ['clean', 'test'], function() {
-  gulp.watch(['src/**/*.js', 'test/**/*.{js,html}'], ['test']);
+gulp.task('dev', gulp.series(['clean', 'test']), function() {
+  gulp.watch(['src/**/*.js', 'test/**/*.{js,html}'], gulp.parallel(['test']));
 });

http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/blob/793f3b74/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
old mode 100644
new mode 100755
index f96d551..9f6a1dd
--- a/package.json
+++ b/package.json
@@ -43,14 +43,15 @@
     "chai": "^3.5.0",
     "del": "^2.2.2",
     "express": "^4.13.4",
-    "gulp": "^3.9.1",
+    "gulp": "^4.0.0",
+    "gulplog": "^1.0.0",
     "gulp-eslint": "^3.0.1",
     "gulp-filter": "^5.0.0",
     "gulp-json-modify": "^1.0.2",
     "gulp-mocha": "^6.0.0",
     "gulp-rename": "^1.2.2",
     "gulp-replace": "^0.5.4",
-    "gulp-uglify": "^2.0.0",
+    "gulp-uglify": "^3.0.1",
     "gulp-util": "^3.0.7",
     "jsdom": "^8.4.0",
     "nodemon": "^1.9.2",
@@ -59,6 +60,8 @@
     "sinon": "^1.17.6"
   },
   "dependencies": {
-    "uglify-js-harmony": "^2.7.7"
+    "uglify-es": "^3.3.9",
+    "composer": "^4.1.0",
+    "pump": "^3.0.0"
   }
 }