BVB Source Codes

web-design-standards Show doc-util.js Source code

Return Download web-design-standards: download doc-util.js Source code - Download web-design-standards Source code - Type:.js
  1. var pkg = require('../../package.json');
  2. var gutil = require('gulp-util');
  3. var chalk = gutil.colors;
  4. var notifier = require('node-notifier');
  5.  
  6. var shellPrefix = '$';
  7.  
  8. function drawFlag () {
  9.  
  10.   // American Flag in ASCII
  11.   //
  12.   gutil.log(
  13.     chalk.blue('xxxxxxxxxxxxxxxxxxxxxxxxxxxx'),
  14.     chalk.red('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
  15.   );
  16.   gutil.log(
  17.     chalk.blue('xxxxxxxxxxxxxxxxxxxxxxxxxxxx'),
  18.     chalk.white('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
  19.   );
  20.   gutil.log(
  21.     chalk.blue('xxxxxxxxxxxxxxxxxxxxxxxxxxxx'),
  22.     chalk.red('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
  23.   );
  24.   gutil.log(
  25.     chalk.blue('xxxxxxxxxxxxxxxxxxxxxxxxxxxx'),
  26.     chalk.white('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
  27.   );
  28.   gutil.log(
  29.     chalk.blue('xxxxxxxxxxxxxxxxxxxxxxxxxxxx'),
  30.     chalk.red('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
  31.   );
  32.   gutil.log(
  33.     chalk.blue('xxxxxxxxxxxxxxxxxxxxxxxxxxxx'),
  34.     chalk.white('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
  35.   );
  36.   gutil.log(
  37.     chalk.blue('xxxxxxxxxxxxxxxxxxxxxxxxxxxx'),
  38.     chalk.red('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
  39.   );
  40.   gutil.log(
  41.     chalk.white('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
  42.   );
  43.   gutil.log(
  44.     chalk.red('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
  45.   );
  46.   gutil.log(
  47.     chalk.white('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
  48.   );
  49.   gutil.log(
  50.     chalk.red('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
  51.   );
  52.   gutil.log(
  53.     chalk.white('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
  54.   );
  55.   gutil.log(
  56.     chalk.red('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
  57.   );
  58.  
  59. }
  60.  
  61. function notify (title, message, wait) {
  62.   notifier.notify({
  63.     title: title,
  64.     message: message,
  65.     icon: 'src/img/favicons/favicon-192.png',
  66.     wait: wait,
  67.   });
  68. }
  69.  
  70. module.exports = {
  71.  
  72.   pkg: {
  73.  
  74.     name: pkg.name,
  75.     version: pkg.version,
  76.  
  77.   },
  78.  
  79.   dirName: pkg.name + '-' + pkg.version,
  80.  
  81.   logIntroduction: function (message) {
  82.  
  83.     message = message || 'Draft U.S. Web Design Standards';
  84.  
  85.     gutil.log(
  86.       chalk.yellow('v' + pkg.version),
  87.       message
  88.     );
  89.     drawFlag();
  90.     //gutil.log(
  91.       //chalk.yellow('v' + pkg.version),
  92.       //'The following gulp commands are available'
  93.     //);
  94.  
  95.   },
  96.  
  97.   logCommand: function (name, message) {
  98.  
  99.     gutil.log(
  100.       shellPrefix,
  101.       chalk.cyan(name),
  102.       chalk.magenta(message)
  103.     );
  104.  
  105.   },
  106.  
  107.   logHelp: function (name, message) {
  108.  
  109.     gutil.log(
  110.       shellPrefix,
  111.       chalk.cyan(name),
  112.       chalk.yellow(message)
  113.     );
  114.  
  115.   },
  116.  
  117.   logData: function (name, message) {
  118.  
  119.     gutil.log(
  120.       chalk.cyan(name),
  121.       chalk.yellow(message)
  122.     );
  123.  
  124.   },
  125.  
  126.   logError: function (name, message) {
  127.  
  128.     gutil.log(
  129.       chalk.red(name),
  130.       chalk.yellow(message)
  131.     );
  132.     notify(this.dirName + ' gulp ' + name, message, true);
  133.  
  134.   },
  135.  
  136.   logMessage: function (name, message) {
  137.  
  138.     gutil.log(
  139.       chalk.cyan(name),
  140.       chalk.green(message)
  141.     );
  142.     notify(this.dirName + ' gulp ' + name, message, false);
  143.  
  144.   },
  145.  
  146. };
  147.  
downloaddoc-util.js Source code - Download web-design-standards Source code
Related Source Codes/Software:
KineticJS - KineticJS is an HTML5 Canvas JavaScript framework ... 2017-01-07
yui3 - A library for building richly interactive web appl... 2017-01-07
TextBlob - Simple, Pythonic, text processing--Sentiment analy... 2017-01-07
monaco-editor - A browser based code editor 2017-01-07
grumpy - Grumpy is a Python to Go source code transcompiler... 2017-01-07
Knuff - The debug application for Apple Push Notification ... 2017-01-07
RoundedImageView - A fast ImageView that supports rounded corners, ov... 2017-01-07
flowchart.js - Draws simple SVG flow chart diagrams from textual ... 2017-01-08
TextFieldEffects - Custom UITextFields effects inspired by Codrops, b... 2017-01-08
glide - Package Management for Golang h... 2017-01-08
viper - Go configuration with fang 2017-02-17
bypy - The Python client for Baidu Yun (Personal Cloud St... 2017-02-17
ZLSwipeableView - A simple view for building card like interface ins... 2017-02-17
searchkit - React UI components / widgets. The easiest way to ... 2017-02-17
Ghost.py - Webkit based scriptable web browser for python. 2017-02-17
SwitchButton - A cute widget of Switch Button for you to create b... 2017-02-17
Starscream - Websockets in swift for iOS and OSX 2017-02-17
cat - Central Application Tracking 2017-02-17
dotfiles - aul's shell, git, etc config files. also homebrew,... 2017-02-17
git-radar - A heads up display for git 2017-02-17

 Back to top