Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use colorful as functions #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/build.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

require('colorful').colorful();
var color = require('colorful');

var debug = require('debug')('spm-sea');
var relative = require('path').relative;
Expand Down Expand Up @@ -86,8 +86,8 @@ Build.prototype.run = unyield(function *() {
cssmin(args.cssmin)
)),
size({gzip:true, showFiles:true, log:function(title, what, size) {
size = ((size/1024.0).toFixed(2) + 'kB').to.magenta;
log.info('size', what + ' ' + size + ' (gzipped)'.to.gray);
size = color.magenta((size/1024.0).toFixed(2) + 'kB');
log.info('size', what + ' ' + size + ' ' + color.gray('(gzipped)'));
}})
),
// debug
Expand Down Expand Up @@ -175,7 +175,7 @@ var Plugins = {
// Check duplicate
var dups = getDuplicate(files, pkg);
for (var k in dups) {
log.warn('duplicate', '%s (%s) while build %s'.to.yellow.color,
log.warn('duplicate', color.yellow('%s (%s) while build %s'),
k, dups[k].versions, dups[k].file.path);
}

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "spm-sea",
"name": "nd-sea",
"version": "1.0.1",
"description": "SPM project bundler in seajs.",
"main": "lib/index",
Expand Down Expand Up @@ -50,10 +50,10 @@
},
"repository": {
"type": "git",
"url": "https://github.com/spmjs/spm-sea"
"url": "https://github.com/crossjs/nd-sea"
},
"homepage": "https://github.com/spmjs/spm-sea",
"author": "chencheng <sorrycc@gmail.com>",
"homepage": "https://github.com/crossjs/nd-sea",
"author": "crossjs <liwenfu@crossjs.com>",
"license": "MIT",
"scripts": {
"test": "make test"
Expand Down