Migrate color formatting to colorette (#2124)
This commit is contained in:
		| @ -40,7 +40,6 @@ | ||||
|   }, | ||||
|   "devDependencies": { | ||||
|     "@sampotts/eslint-config": "1.1.5", | ||||
|     "ansi-colors": "^4.1.1", | ||||
|     "autoprefixer": "^10.0.2", | ||||
|     "aws-sdk": "^2.814.0", | ||||
|     "@babel/core": "^7.12.10", | ||||
| @ -48,6 +47,7 @@ | ||||
|     "@babel/plugin-proposal-class-properties": "^7.12.1", | ||||
|     "babel-eslint": "^10.1.0", | ||||
|     "browser-sync": "^2.26.13", | ||||
|     "colorette": "1.2.2", | ||||
|     "del": "^6.0.0", | ||||
|     "eslint": "^7.3.1", | ||||
|     "fancy-log": "^1.3.3", | ||||
|  | ||||
| @ -10,7 +10,7 @@ const gulp = require('gulp'); | ||||
| const gitbranch = require('git-branch'); | ||||
| const rename = require('gulp-rename'); | ||||
| const replace = require('gulp-replace'); | ||||
| const ansi = require('ansi-colors'); | ||||
| const { green, cyan, bold } = require('colorette'); | ||||
| const log = require('fancy-log'); | ||||
| const open = require('gulp-open'); | ||||
| const size = require('gulp-size'); | ||||
| @ -128,7 +128,7 @@ gulp.task('version', (done) => { | ||||
|  | ||||
|   const { domain } = deploy.cdn; | ||||
|  | ||||
|   log(`Updating version in files to ${ansi.green.bold(version)}...`); | ||||
|   log(`Updating version in files to ${green(bold(version))}...`); | ||||
|  | ||||
|   // Replace versioned URLs in source | ||||
|   const files = ['plyr.js', 'plyr.polyfilled.js', 'config/defaults.js']; | ||||
| @ -156,7 +156,7 @@ gulp.task('cdn', (done) => { | ||||
|     throw new Error('No publisher instance. Check AWS configuration.'); | ||||
|   } | ||||
|  | ||||
|   log(`Uploading ${ansi.green.bold(pkg.version)} to ${ansi.cyan(domain)}...`); | ||||
|   log(`Uploading ${green(bold(pkg.version))} to ${cyan(domain)}...`); | ||||
|  | ||||
|   // Upload to CDN | ||||
|   return ( | ||||
| @ -199,7 +199,7 @@ gulp.task('purge', () => { | ||||
|       const purge = new FastlyPurge(fastly.token); | ||||
|  | ||||
|       list.forEach((url) => { | ||||
|         log(`Purging ${ansi.cyan(url)}...`); | ||||
|         log(`Purging ${cyan(url)}...`); | ||||
|  | ||||
|         purge.url(url, (error, result) => { | ||||
|           if (error) { | ||||
| @ -226,7 +226,7 @@ gulp.task('demo', (done) => { | ||||
|     throw new Error('No publisher instance. Check AWS configuration.'); | ||||
|   } | ||||
|  | ||||
|   log(`Uploading ${ansi.green.bold(pkg.version)} to ${ansi.cyan(domain)}...`); | ||||
|   log(`Uploading ${green(bold(pkg.version))} to ${cyan(domain)}...`); | ||||
|  | ||||
|   // Replace versioned files in README.md | ||||
|   gulp | ||||
|  | ||||
		Reference in New Issue
	
	Block a user