mirror of
https://github.com/kremalicious/blog.git
synced 2025-02-01 12:29:49 +01:00
remove gulp-util
This commit is contained in:
parent
29a4c41495
commit
d7e97d16c7
@ -13,7 +13,6 @@ Requirements
|
|||||||
You need to have the following tools installed on your development machine before moving on:
|
You need to have the following tools installed on your development machine before moving on:
|
||||||
|
|
||||||
- [node.js](http://nodejs.org/) & [npm](https://npmjs.org/)
|
- [node.js](http://nodejs.org/) & [npm](https://npmjs.org/)
|
||||||
- [Bower](http://bower.io/)
|
|
||||||
- [Ruby](https://www.ruby-lang.org) (for sanity, install with [rvm](https://rvm.io/)) and [Bundler](http://bundler.io/)
|
- [Ruby](https://www.ruby-lang.org) (for sanity, install with [rvm](https://rvm.io/)) and [Bundler](http://bundler.io/)
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,6 +11,8 @@ import critical from 'critical'
|
|||||||
import request from 'request'
|
import request from 'request'
|
||||||
import fs from 'fs'
|
import fs from 'fs'
|
||||||
import yaml from 'js-yaml'
|
import yaml from 'js-yaml'
|
||||||
|
import chalk from 'chalk'
|
||||||
|
import yargs from 'yargs'
|
||||||
|
|
||||||
// get all the configs: `pkg` and `site`
|
// get all the configs: `pkg` and `site`
|
||||||
import pkg from './package.json'
|
import pkg from './package.json'
|
||||||
@ -21,26 +23,28 @@ const $ = plugins()
|
|||||||
|
|
||||||
// handle errors
|
// handle errors
|
||||||
const onError = (error) => {
|
const onError = (error) => {
|
||||||
$.util.log('')
|
console.log('')
|
||||||
$.util.log($.util.colors.red('You fucked up:', error.message, 'on line' , error.lineNumber))
|
console.log(chalk.red('You fucked up:', error.message, 'on line' , error.lineNumber))
|
||||||
$.util.log('')
|
console.log('')
|
||||||
this.emit('end')
|
this.emit('end')
|
||||||
}
|
}
|
||||||
|
|
||||||
// 'development' is just default, production overrides are triggered
|
// 'development' is just default, production overrides are triggered
|
||||||
// by adding the production flag to the gulp command e.g. `gulp build --production`
|
// by adding the production flag to the gulp command e.g. `gulp build --production`
|
||||||
const isProduction = ($.util.env.production === true ? true : false)
|
const argv = yargs.parse(process.argv.slice(1))
|
||||||
|
const isProduction = argv.production
|
||||||
|
|
||||||
|
|
||||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
// Terminal Banner
|
// Terminal Banner
|
||||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
console.log("")
|
console.log("")
|
||||||
console.log($.util.colors.gray(" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>"))
|
console.log(chalk.dim(" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>"))
|
||||||
console.log("")
|
console.log("")
|
||||||
console.log($.util.colors.cyan(" (o) Just what do you think you're doing,", process.env.USER, "? "))
|
console.log(chalk.cyan(" (o) Just what do you think you're doing,", process.env.USER, "? "))
|
||||||
console.log("")
|
console.log("")
|
||||||
console.log($.util.colors.gray(" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>"))
|
console.log(chalk.dim(" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>"))
|
||||||
console.log("")
|
console.log("")
|
||||||
|
|
||||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
@ -304,12 +308,12 @@ export const seo = (done) => {
|
|||||||
|
|
||||||
const response = (error, response) => {
|
const response = (error, response) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
$.util.log($.util.colors.red(error))
|
console.log(chalk.red(error))
|
||||||
} else {
|
} else {
|
||||||
$.util.log($.util.colors.gray('Status:', response && response.statusCode))
|
console.log(chalk.dim('Status:', response && response.statusCode))
|
||||||
|
|
||||||
if (response.statusCode === 200) {
|
if (response.statusCode === 200) {
|
||||||
$.util.log($.util.colors.green('Successfully notified'))
|
console.log(chalk.green('Successfully notified'))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -351,9 +355,9 @@ export const watchSrc = () => {
|
|||||||
// Build banner
|
// Build banner
|
||||||
//
|
//
|
||||||
export const buildBanner = (done) => {
|
export const buildBanner = (done) => {
|
||||||
console.log($.util.colors.gray(" ------------------------------------------"))
|
console.log(chalk.dim(" ------------------------------------------"))
|
||||||
console.log($.util.colors.green(' Building ' + ($.util.env.production ? 'production' : 'dev') + ' version...'))
|
console.log(chalk.green(' Building ' + (isProduction ? 'production' : 'dev') + ' version...'))
|
||||||
console.log($.util.colors.gray(" ------------------------------------------"))
|
console.log(chalk.dim(" ------------------------------------------"))
|
||||||
|
|
||||||
done()
|
done()
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
"babel-core": ">=6.24.0",
|
"babel-core": ">=6.24.0",
|
||||||
"babel-preset-es2015": ">=6.24.0",
|
"babel-preset-es2015": ">=6.24.0",
|
||||||
"browser-sync": ">=2.10.0",
|
"browser-sync": ">=2.10.0",
|
||||||
|
"chalk": ">=1.1.3",
|
||||||
"concurrent-transform": ">=1.0.0",
|
"concurrent-transform": ">=1.0.0",
|
||||||
"critical": ">=0.8.4",
|
"critical": ">=0.8.4",
|
||||||
"cssnano": ">=3.6.2",
|
"cssnano": ">=3.6.2",
|
||||||
@ -43,7 +44,6 @@
|
|||||||
"gulp-awspublish": ">=2.0.2",
|
"gulp-awspublish": ">=2.0.2",
|
||||||
"gulp-awspublish-router": ">=0.1.1",
|
"gulp-awspublish-router": ">=0.1.1",
|
||||||
"gulp-cli": ">=1.2.2",
|
"gulp-cli": ">=1.2.2",
|
||||||
"gulp-filter": ">=2.0.2",
|
|
||||||
"gulp-header": ">=1.2.2",
|
"gulp-header": ">=1.2.2",
|
||||||
"gulp-htmlmin": ">=1.1.2",
|
"gulp-htmlmin": ">=1.1.2",
|
||||||
"gulp-if": ">=1.2.5",
|
"gulp-if": ">=1.2.5",
|
||||||
@ -59,12 +59,12 @@
|
|||||||
"gulp-stylus": ">=2.3.1",
|
"gulp-stylus": ">=2.3.1",
|
||||||
"gulp-svg-sprite": ">=1.2.2",
|
"gulp-svg-sprite": ">=1.2.2",
|
||||||
"gulp-uglify": ">=1.2.0",
|
"gulp-uglify": ">=1.2.0",
|
||||||
"gulp-util": ">=3.0.6",
|
|
||||||
"js-yaml": ">=3.8.3",
|
"js-yaml": ">=3.8.3",
|
||||||
"request": ">=2.81.0"
|
"request": ">=2.81.0",
|
||||||
|
"yargs": ">=8.0.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=5.0.0"
|
"node": ">=7.0.0"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
Loading…
Reference in New Issue
Block a user