-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
44 lines (37 loc) · 1.5 KB
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
'use strict';
var pkg = require('./package.json'),
chalk = require('chalk'),
somebody = require('somebody'),
pkgAuthor = somebody.parse(pkg.author),
qrcode = require('qrcode-terminal'),
gulp = require('gulp');
/*
* INFO TASK
*/
gulp.task('info', [], function (cb) {
var txt;
console.log('\n\n');
console.log('[' + chalk.green('NAME') + '] ' + pkg.name);
console.log('[' + chalk.green('DESCRIPTION') + '] ' + pkg.description);
console.log('[' + chalk.green('VERSION') + '] ' + pkg.version);
console.log('[' + chalk.green('HOMEPAGE') + '] ' + pkg.homepage);
console.log('[' + chalk.green('GITHUB REPOSITORY') + '] ' + pkg.repository.url);
console.log('[' + chalk.green('NPM URL') + '] https://npmjs.org/package/' + pkg.name);
console.log('[' + chalk.green('BOWER URL') + '] http://bower.io/search/?q=' + pkg.name);
console.log('[' + chalk.green('BUG TRACKER') + '] ' + pkg.bugs.url);
console.log('\n');
txt = '[' + chalk.green('DOWNLOAD LATEST') + '] ';
txt += 'https://github.com/' + pkgAuthor.name + '/' + pkg.name + '/archive/master.zip';
console.log(txt);
txt = '[' + chalk.green('ALL VERSION TAGS') + '] ';
txt += 'https://github.com/' + pkgAuthor.name + '/' + pkg.name + '/tags';
console.log(txt);
txt = '[' + chalk.green('RSS/ATOM FOR VERSION TAGS') + '] ';
txt += 'https://github.com/' + pkgAuthor.name + '/' + pkg.name + '/tags.atom';
console.log(txt);
console.log('\n\n');
qrcode.generate(pkg.homepage);
console.log('\n\n');
cb();
});
gulp.task('default', ['info']);