Skip to content
This repository has been archived by the owner on Jun 17, 2021. It is now read-only.

Commit

Permalink
🔨 drop gulp-utils for fancy-log #24
Browse files Browse the repository at this point in the history
  • Loading branch information
Yago committed May 2, 2019
1 parent ff573d7 commit 5774132
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 171 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,15 @@
"eslint-plugin-import": "^2.17.2",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-react": "^7.12.4",
"fancy-log": "^1.3.3",
"fs-extra": "^7.0.1",
"gulp": "^4.0.0",
"gulp-cheerio": "^0.6.3",
"gulp-concat": "^2.6.1",
"gulp-consolidate": "^0.2.0",
"gulp-eslint": "^5.0.0",
"gulp-load-plugins": "^1.5.0",
"gulp-noop": "^1.0.0",
"gulp-notify": "^3.2.0",
"gulp-plumber": "^1.2.1",
"gulp-postcss": "^8.0.0",
Expand All @@ -69,7 +71,6 @@
"gulp-svgo": "^2.1.1",
"gulp-svgstore": "^7.0.1",
"gulp-uglify": "^3.0.2",
"gulp-util": "^3.0.8",
"jquery": "^3.4.1",
"latest-version": "^5.1.0",
"merge-stream": "^1.0.1",
Expand Down
3 changes: 2 additions & 1 deletion tasks/helpers.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const yargs = require('yargs');
const log = require('fancy-log');
const config = require('./config');
const gulpLoadPlugins = require('gulp-load-plugins');
const fs = require('fs');
Expand All @@ -9,7 +10,7 @@ const $ = gulpLoadPlugins();
function errorAlert(error) {
if (!config.production) {
$.notify.onError({ title: 'SCSS Error', message: 'Check your terminal', sound: 'Sosumi' })(error);
$.util.log(error.messageFormatted ? error.messageFormatted : error.message);
log(error.messageFormatted ? error.messageFormatted : error.message);
}
this.emit('end');
}
Expand Down
3 changes: 2 additions & 1 deletion tasks/prepare.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const gulp = require('gulp');
const log = require('fancy-log');
const $ = require('gulp-load-plugins')();
const config = require('./config');
const fs = require('fs-extra');
Expand Down Expand Up @@ -58,7 +59,7 @@ const prepare = async (done) => {
docFiles = await dirTree(`${config.project}/docs`);
}

$.util.log('Using template', $.util.colors.magenta(config.template));
log('Using template');

return gulp.src(config.template, { cwd: config.base_template ? '' : config.project })
.pipe($.cheerio(($, file) => {
Expand Down
5 changes: 3 additions & 2 deletions tasks/scripts.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const gulp = require('gulp');
const webpack = require('webpack');
const log = require('fancy-log');
const webpackSettings = require('../webpack.prod.config');
const errorAlert = require('./helpers');

Expand All @@ -25,8 +26,8 @@ const scripts = (done) => {
// run webpack
if (config.production) {
webpack(webpackSettings, function(err, stats) {
if(err) throw new $.util.PluginError('webpack', err);
$.util.log('[webpack]', stats.toString({
if(err) log.error(err);
log('[webpack]', stats.toString({
cached: false,
colors: true,
}));
Expand Down
2 changes: 1 addition & 1 deletion tasks/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const stylesBuild = () => {
if (ScssNames && ScssNames[i]) path.basename= ScssNames[i];
i += 1;
}))
.pipe(config.production ? $.util.noop() : $.sourcemaps.write('./'))
.pipe(config.production ? $.noop() : $.sourcemaps.write('./'))
.pipe(gulp.dest(dest.styles, {cwd: config.project}));
};

Expand Down
Loading

0 comments on commit 5774132

Please sign in to comment.