Skip to content

Commit

Permalink
remove gulp-util
Browse files Browse the repository at this point in the history
  • Loading branch information
tieniber committed Aug 26, 2019
1 parent 5ece8a2 commit d84ea8b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
15 changes: 8 additions & 7 deletions generators/app/templates/Gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ var gulp = require("gulp"),
zip = require("gulp-zip"),
del = require("del"),
newer = require("gulp-newer"),
gutil = require("gulp-util"),
log = require('fancy-log'),
colors = require('ansi-colors'),
plumber = require("gulp-plumber"),
gulpif = require("gulp-if"),
jsonTransform = require("gulp-json-transform"),
Expand Down Expand Up @@ -49,12 +50,12 @@ gulp.task("compress", ["clean"], function () {
gulp.task("copy:js", function () {
return gulp.src(["./src/**/*.js"])
.pipe(plumber(function (error) {
var msg = gutil.colors.red("Error");
var msg = colors.red("Error");
if (error.fileName) {
msg += gutil.colors.red(" in ") + gutil.colors.cyan(error.fileName);
msg += colors.red(" in ") + colors.cyan(error.fileName);
}
msg += " : " + gutil.colors.cyan(error.message);
gutil.log(msg);
msg += " : " + colors.cyan(error.message);
log(msg);
this.emit("end");
}))
.pipe(jsValidate())
Expand Down Expand Up @@ -85,10 +86,10 @@ gulp.task("version:json", function () {

gulp.task("icon", function (cb) {
var icon = (typeof argv.file !== "undefined") ? argv.file : "./icon.png";
console.log("\nUsing this file to create a base64 string: " + gutil.colors.cyan(icon));
console.log("\nUsing this file to create a base64 string: " + colors.cyan(icon));
gulp.src(icon)
.pipe(intercept(function (file) {
console.log("\nCopy the following to your " + pkg.name + ".xml (after description):\n\n" + gutil.colors.cyan("<icon>") + file.contents.toString("base64") + gutil.colors.cyan("<\/icon>") + "\n");
console.log("\nCopy the following to your " + pkg.name + ".xml (after description):\n\n" + colors.cyan("<icon>") + file.contents.toString("base64") + colors.cyan("<\/icon>") + "\n");
cb();
}));
});
Expand Down
5 changes: 3 additions & 2 deletions generators/app/templates/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,18 @@
"shelljs": "^0.7.4",
"xml2js": "^0.4.17"
},<% } if (builder == 'gulp') { %>
"ansi-colors": "^4.1.1",
"del": "^2.2.2",
"fancy-log": "^1.3.3",
"gulp": "^3.9.1",
"gulp-if": "^2.0.1",
"gulp-intercept": "^0.1.0",
"gulp-json-transform": "^0.4.2",
"gulp-newer": "^1.3.0",
"gulp-plumber": "^1.1.0",
"gulp-util": "^3.0.7",
"gulp-zip": "^3.2.0",
"gulp-jsvalidate": "^3.0.0",
"widgetbuilder-gulp-helper": "https://github.com/JelteMX/widgetbuilder-gulp-helper/archive/1.0.1.tar.gz",
"widgetbuilder-gulp-helper": "https://github.com/tieniber/widgetbuilder-gulp-helper/archive/1.0.2.tar.gz",
"yargs": "^6.0.0"
},<% } %>
"engines": {
Expand Down

0 comments on commit d84ea8b

Please sign in to comment.