mirror of
https://github.com/fooflington/selfdefined.git
synced 2025-11-01 06:38:31 +00:00
update
This commit is contained in:
18
node_modules/time-require/CHANGELOG.md
generated
vendored
Normal file
18
node_modules/time-require/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
`time-require` changelog
|
||||
======================
|
||||
|
||||
- v0.1.2 (2014.04.20)
|
||||
* README.md: add NPM downloads and GitHub release, add `gulpt` usage, remove BitBucket hosting/refs
|
||||
* package.json: update dependencies
|
||||
* .npmignore: remove all development-related files from NPM (clone the repo instead)
|
||||
- v0.1.1 (2014.04.10)
|
||||
* gulpfile.js: add `notifyError` for stream error notification, add `seqTask` for sequential task control, fix `project.js` config replacing `lib/` with `src/`
|
||||
* README.md: detail project hosting [@BitBucket](https://bitbucket.org/jaguard/time-require) & mirror [@GitHub](https://github.com/jaguard/time-require).
|
||||
* LICENSE.md renamed to LICENSE to keep it as a simple text file
|
||||
* package.json: set the [GitHub](https://github.com/jaguard/time-require) mirror as repository, add `run-sequence` for task order control, add `gulp-notify` for notification support
|
||||
- v0.1.0 (2014.04.10)
|
||||
+ Added `.travis.yml` file for travis-ci.org build support
|
||||
+ Published `time-require` module to [npm](https://www.npmjs.org/package/time-require)
|
||||
* Include screenshoots as absolute links
|
||||
- v0.0.1 (2014.03.10)
|
||||
+ Initial release
|
||||
20
node_modules/time-require/LICENSE
generated
vendored
Normal file
20
node_modules/time-require/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
Copyright (c) 2014 Jaguard
|
||||
MIT License - http://opensource.org/licenses/mit-license.php
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
79
node_modules/time-require/README.md
generated
vendored
Normal file
79
node_modules/time-require/README.md
generated
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
# `time-require` @ [](http://oss.jaguard.com) [](http://gulpjs.com)
|
||||
|
||||
> Displays the execution time for Node.js modules loading by hooking and tracing all `require()` calls.
|
||||
This module was inspired by [@sindresorhus](https://twitter.com/sindresorhus)'s [time-grunt](https://github.com/sindresorhus/time-grunt).
|
||||
|
||||
## Project status
|
||||
- NPM version: [](https://www.npmjs.org/package/time-require)
|
||||
- NPM downloads: [](https://www.npmjs.org/package/time-require)
|
||||
- GitHub release: [](https://www.npmjs.org/package/time-require)
|
||||
- Travis-CI build: [](http://travis-ci.org/jaguard/time-require)
|
||||
- Drone.io build: [](https://github.com/jaguard/time-require)
|
||||
- Dependencies: [](https://david-dm.org/jaguard/time-require#info=dependencies)
|
||||
- Dev Dependencies: [](https://david-dm.org/jaguard/time-require#info=devDependencies)
|
||||
|
||||
Default usage (non-verbose) showing required modules in loaded order, above 1% treshold
|
||||

|
||||
|
||||
Verbose (all) & sorted usage showing all required modules in sorted order
|
||||

|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://npmjs.org/package/time-require)
|
||||
|
||||
```
|
||||
npm install --save time-require
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
1. Embeded usage, generally as first `require()` call in your main module.
|
||||
```js
|
||||
require("time-require");
|
||||
```
|
||||
2. External usage with `--require` preload supported by [Liftoff](https://github.com/tkellen/node-liftoff) driven CLI modules like [gulp.js](http://gulpjs.com/) or [Grunt-Next](https://github.com/gruntjs/grunt-next)
|
||||
```
|
||||
gulp --require time-require --sorted
|
||||
```
|
||||
3. If you're using [gulp.js](http://gulpjs.com/), use instead [gulpt](https://github.com/jaguard/gulpt), a `gulp` CLI wrapper that automatically preload `time-require`.
|
||||
```
|
||||
npm install -g gulpt
|
||||
gulpt build --sorted
|
||||
```
|
||||
|
||||
## Display layout
|
||||
|
||||
Modules loading that take less than `1%` of the total time are hidden to reduce clutter.
|
||||
To show **all** the modules use the `--verbose` (or `--V`) flag on the running CLI.
|
||||
To **sort** the modules according to the loading time (longest on top) use the `--sorted` (or `--s`) flag on the running CLI.
|
||||
|
||||
## Documentation
|
||||
|
||||
Detailed API documentation can be found in ['doc'](doc/api.md) folder.
|
||||
|
||||
## Development
|
||||
|
||||
Detailed development documentation can be found in ['doc'](doc/dev.md) folder.
|
||||
|
||||
## License
|
||||
|
||||
[MIT](https://github.com/jaguard/time-require/raw/master/LICENSE) © [Jaguard OSS](http://oss.jaguard.com)
|
||||
|
||||
## Changelog
|
||||
|
||||
- v0.1.2 (2014.04.20)
|
||||
* README.md: add NPM downloads and GitHub release, add `gulpt` usage, remove BitBucket hosting/refs
|
||||
* package.json: update dependencies
|
||||
* .npmignore: remove all development-related files from NPM (clone the repo instead)
|
||||
- v0.1.1 (2014.04.10)
|
||||
* gulpfile.js: add `notifyError` for stream error notification, add `seqTask` for sequential task control, fix `project.js` config replacing `lib/` with `src/`
|
||||
* README.md: detail project hosting [@BitBucket](https://bitbucket.org/jaguard/time-require) & mirror [@GitHub](https://github.com/jaguard/time-require).
|
||||
* LICENSE.md renamed to LICENSE to keep it as a simple text file
|
||||
* package.json: set the [GitHub](https://github.com/jaguard/time-require) mirror as repository, add `run-sequence` for task order control, add `gulp-notify` for notification support
|
||||
- v0.1.0 (2014.04.10)
|
||||
+ Added `.travis.yml` file for travis-ci.org build support
|
||||
+ Published `time-require` module to [npm](https://www.npmjs.org/package/time-require)
|
||||
* Include screenshoots as absolute links
|
||||
- v0.0.1 (2014.03.10)
|
||||
+ Initial release
|
||||
3
node_modules/time-require/doc/api.md
generated
vendored
Normal file
3
node_modules/time-require/doc/api.md
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
## API documentation for time-require
|
||||
|
||||
TODO: Detail usage
|
||||
32
node_modules/time-require/doc/dev.md
generated
vendored
Normal file
32
node_modules/time-require/doc/dev.md
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
## Developer documentation for `time-require`
|
||||
|
||||
`time-require` use [gulp.js](http://gulpjs.com) for build
|
||||
|
||||
#### clean
|
||||
```
|
||||
gulp clean
|
||||
```
|
||||
#### build
|
||||
```
|
||||
gulp
|
||||
```
|
||||
or explicitelly
|
||||
```
|
||||
gulp build
|
||||
```
|
||||
#### run tests
|
||||
```
|
||||
gulp test
|
||||
```
|
||||
#### lint all sources
|
||||
```
|
||||
gulp lint
|
||||
```
|
||||
#### generate documentation
|
||||
```
|
||||
gulp doc
|
||||
```
|
||||
#### watch
|
||||
```
|
||||
gulp watch
|
||||
```
|
||||
BIN
node_modules/time-require/doc/time_require_default.png
generated
vendored
Normal file
BIN
node_modules/time-require/doc/time_require_default.png
generated
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
BIN
node_modules/time-require/doc/time_require_verbose_sorted.png
generated
vendored
Normal file
BIN
node_modules/time-require/doc/time_require_verbose_sorted.png
generated
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
1
node_modules/time-require/node_modules/.bin/strip-ansi
generated
vendored
Symbolic link
1
node_modules/time-require/node_modules/.bin/strip-ansi
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../strip-ansi/cli.js
|
||||
38
node_modules/time-require/node_modules/ansi-styles/ansi-styles.js
generated
vendored
Normal file
38
node_modules/time-require/node_modules/ansi-styles/ansi-styles.js
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
'use strict';
|
||||
var styles = module.exports;
|
||||
|
||||
var codes = {
|
||||
reset: [0, 0],
|
||||
|
||||
bold: [1, 22],
|
||||
italic: [3, 23],
|
||||
underline: [4, 24],
|
||||
inverse: [7, 27],
|
||||
strikethrough: [9, 29],
|
||||
|
||||
black: [30, 39],
|
||||
red: [31, 39],
|
||||
green: [32, 39],
|
||||
yellow: [33, 39],
|
||||
blue: [34, 39],
|
||||
magenta: [35, 39],
|
||||
cyan: [36, 39],
|
||||
white: [37, 39],
|
||||
gray: [90, 39],
|
||||
|
||||
bgBlack: [40, 49],
|
||||
bgRed: [41, 49],
|
||||
bgGreen: [42, 49],
|
||||
bgYellow: [43, 49],
|
||||
bgBlue: [44, 49],
|
||||
bgMagenta: [45, 49],
|
||||
bgCyan: [46, 49],
|
||||
bgWhite: [47, 49]
|
||||
};
|
||||
|
||||
Object.keys(codes).forEach(function (key) {
|
||||
var val = codes[key];
|
||||
var style = styles[key] = {};
|
||||
style.open = '\x1b[' + val[0] + 'm';
|
||||
style.close = '\x1b[' + val[1] + 'm';
|
||||
});
|
||||
82
node_modules/time-require/node_modules/ansi-styles/package.json
generated
vendored
Normal file
82
node_modules/time-require/node_modules/ansi-styles/package.json
generated
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"ansi-styles@1.0.0",
|
||||
"/Users/tatiana/selfdefined"
|
||||
]
|
||||
],
|
||||
"_from": "ansi-styles@1.0.0",
|
||||
"_id": "ansi-styles@1.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-yxAt8cVvUSPquLZ817mAJ6AnkXg=",
|
||||
"_location": "/time-require/ansi-styles",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "ansi-styles@1.0.0",
|
||||
"name": "ansi-styles",
|
||||
"escapedName": "ansi-styles",
|
||||
"rawSpec": "1.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/time-require/chalk"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.0.0.tgz",
|
||||
"_spec": "1.0.0",
|
||||
"_where": "/Users/tatiana/selfdefined",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "http://sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/ansi-styles/issues"
|
||||
},
|
||||
"description": "ANSI escape codes for colorizing strings in the terminal",
|
||||
"devDependencies": {
|
||||
"mocha": "~1.12.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.8.0"
|
||||
},
|
||||
"files": [
|
||||
"ansi-styles.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/ansi-styles",
|
||||
"keywords": [
|
||||
"ansi",
|
||||
"styles",
|
||||
"color",
|
||||
"colour",
|
||||
"colors",
|
||||
"terminal",
|
||||
"console",
|
||||
"cli",
|
||||
"string",
|
||||
"tty",
|
||||
"escape",
|
||||
"formatting",
|
||||
"rgb",
|
||||
"256",
|
||||
"shell",
|
||||
"xterm",
|
||||
"log",
|
||||
"logging",
|
||||
"command-line",
|
||||
"text"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "ansi-styles",
|
||||
"name": "ansi-styles",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/sindresorhus/ansi-styles.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"version": "1.0.0"
|
||||
}
|
||||
65
node_modules/time-require/node_modules/ansi-styles/readme.md
generated
vendored
Normal file
65
node_modules/time-require/node_modules/ansi-styles/readme.md
generated
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
# ansi-styles [](http://travis-ci.org/sindresorhus/ansi-styles)
|
||||
|
||||
> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for colorizing strings in the terminal.
|
||||
|
||||
You probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings.
|
||||
|
||||

|
||||
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://npmjs.org/package/ansi-styles): `npm install --save ansi-styles`
|
||||
|
||||
|
||||
## Example
|
||||
|
||||
```js
|
||||
var ansi = require('ansi-styles');
|
||||
|
||||
console.log(ansi.green.open + 'Hello world!' + ansi.green.close);
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
Each style has an `open` and `close` property.
|
||||
|
||||
|
||||
## Styles
|
||||
|
||||
### General
|
||||
|
||||
- reset
|
||||
- bold
|
||||
- italic
|
||||
- underline
|
||||
- inverse
|
||||
- strikethrough
|
||||
|
||||
### Text colors
|
||||
|
||||
- black
|
||||
- red
|
||||
- green
|
||||
- yellow
|
||||
- blue
|
||||
- magenta
|
||||
- cyan
|
||||
- white
|
||||
- gray
|
||||
|
||||
### Background colors
|
||||
|
||||
- bgBlack
|
||||
- bgRed
|
||||
- bgGreen
|
||||
- bgYellow
|
||||
- bgBlue
|
||||
- bgMagenta
|
||||
- bgCyan
|
||||
- bgWhite
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
63
node_modules/time-require/node_modules/chalk/index.js
generated
vendored
Normal file
63
node_modules/time-require/node_modules/chalk/index.js
generated
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
'use strict';
|
||||
var ansi = require('ansi-styles');
|
||||
var stripAnsi = require('strip-ansi');
|
||||
var hasColor = require('has-color');
|
||||
var defineProps = Object.defineProperties;
|
||||
var chalk = module.exports;
|
||||
|
||||
var styles = (function () {
|
||||
var ret = {};
|
||||
|
||||
ansi.grey = ansi.gray;
|
||||
|
||||
Object.keys(ansi).forEach(function (key) {
|
||||
ret[key] = {
|
||||
get: function () {
|
||||
this._styles.push(key);
|
||||
return this;
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
return ret;
|
||||
})();
|
||||
|
||||
function init() {
|
||||
var ret = {};
|
||||
|
||||
Object.keys(styles).forEach(function (name) {
|
||||
ret[name] = {
|
||||
get: function () {
|
||||
var obj = defineProps(function self() {
|
||||
var str = [].slice.call(arguments).join(' ');
|
||||
|
||||
if (!chalk.enabled) {
|
||||
return str;
|
||||
}
|
||||
|
||||
return self._styles.reduce(function (str, name) {
|
||||
var code = ansi[name];
|
||||
return str ? code.open + str + code.close : '';
|
||||
}, str);
|
||||
}, styles);
|
||||
|
||||
obj._styles = [];
|
||||
|
||||
return obj[name];
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
defineProps(chalk, init());
|
||||
|
||||
chalk.styles = ansi;
|
||||
chalk.stripColor = stripAnsi;
|
||||
chalk.supportsColor = hasColor;
|
||||
|
||||
// detect mode if not set manually
|
||||
if (chalk.enabled === undefined) {
|
||||
chalk.enabled = chalk.supportsColor;
|
||||
}
|
||||
85
node_modules/time-require/node_modules/chalk/package.json
generated
vendored
Normal file
85
node_modules/time-require/node_modules/chalk/package.json
generated
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"chalk@0.4.0",
|
||||
"/Users/tatiana/selfdefined"
|
||||
]
|
||||
],
|
||||
"_from": "chalk@0.4.0",
|
||||
"_id": "chalk@0.4.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-UZmj3c0MHv4jvAjBsCewYXbgxk8=",
|
||||
"_location": "/time-require/chalk",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "chalk@0.4.0",
|
||||
"name": "chalk",
|
||||
"escapedName": "chalk",
|
||||
"rawSpec": "0.4.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "0.4.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/time-require"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/chalk/-/chalk-0.4.0.tgz",
|
||||
"_spec": "0.4.0",
|
||||
"_where": "/Users/tatiana/selfdefined",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "http://sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/chalk/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"ansi-styles": "~1.0.0",
|
||||
"has-color": "~0.1.0",
|
||||
"strip-ansi": "~0.1.0"
|
||||
},
|
||||
"description": "Terminal string styling done right. Created because the `colors` module does some really horrible things.",
|
||||
"devDependencies": {
|
||||
"mocha": "~1.x"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.8.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/chalk#readme",
|
||||
"keywords": [
|
||||
"color",
|
||||
"colour",
|
||||
"colors",
|
||||
"terminal",
|
||||
"console",
|
||||
"cli",
|
||||
"string",
|
||||
"ansi",
|
||||
"styles",
|
||||
"tty",
|
||||
"formatting",
|
||||
"rgb",
|
||||
"256",
|
||||
"shell",
|
||||
"xterm",
|
||||
"log",
|
||||
"logging",
|
||||
"command-line",
|
||||
"text"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "chalk",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/chalk.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"version": "0.4.0"
|
||||
}
|
||||
158
node_modules/time-require/node_modules/chalk/readme.md
generated
vendored
Normal file
158
node_modules/time-require/node_modules/chalk/readme.md
generated
vendored
Normal file
@@ -0,0 +1,158 @@
|
||||
# <img width="250" src="logo.png" alt="chalk">
|
||||
|
||||
> Terminal string styling done right
|
||||
|
||||
[](http://travis-ci.org/sindresorhus/chalk)
|
||||
|
||||
[colors.js](https://github.com/Marak/colors.js) is currently the most popular string styling module, but it has serious deficiencies like extending String.prototype which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68). Although there are other ones, they either do too much or not enough.
|
||||
|
||||
**Chalk is a clean and focused alternative.**
|
||||
|
||||

|
||||
|
||||
|
||||
## Why
|
||||
|
||||
- **Doesn't extend String.prototype**
|
||||
- Expressive API
|
||||
- Clean and focused
|
||||
- Auto-detects color support
|
||||
- Actively maintained
|
||||
- [Used by 150+ modules](https://npmjs.org/browse/depended/chalk)
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://npmjs.org/package/chalk): `npm install --save chalk`
|
||||
|
||||
|
||||
## Example
|
||||
|
||||
Chalk comes with an easy to use composable API where you just chain and nest the styles you want.
|
||||
|
||||
```js
|
||||
var chalk = require('chalk');
|
||||
|
||||
// style a string
|
||||
console.log( chalk.blue('Hello world!') );
|
||||
|
||||
// combine styled and normal strings
|
||||
console.log( chalk.blue('Hello'), 'World' + chalk.red('!') );
|
||||
|
||||
// compose multiple styles using the chainable API
|
||||
console.log( chalk.blue.bgRed.bold('Hello world!') );
|
||||
|
||||
// nest styles
|
||||
console.log( chalk.red('Hello', chalk.underline.bgBlue('world') + '!') );
|
||||
|
||||
// pass in multiple arguments
|
||||
console.log( chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz') );
|
||||
```
|
||||
|
||||
You can easily define your own themes.
|
||||
|
||||
```js
|
||||
var chalk = require('chalk');
|
||||
var error = chalk.bold.red;
|
||||
console.log(error('Error!'));
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### chalk.`<style>[.<style>...](string, [string...])`
|
||||
|
||||
Example: `chalk.red.bold.underline('Hello', 'world');`
|
||||
|
||||
Chain [styles](#styles) and call the last one as a method with a string argument. Order doesn't matter.
|
||||
|
||||
Multiple arguments will be separated by space.
|
||||
|
||||
### chalk.enabled
|
||||
|
||||
Color support is automatically detected, but you can override it.
|
||||
|
||||
### chalk.supportsColor
|
||||
|
||||
Detect whether the terminal [supports color](https://github.com/sindresorhus/has-color).
|
||||
|
||||
Can be overridden by the user with the flags `--color` and `--no-color`.
|
||||
|
||||
Used internally and handled for you, but exposed for convenience.
|
||||
|
||||
### chalk.styles
|
||||
|
||||
Exposes the styles as [ANSI escape codes](https://github.com/sindresorhus/ansi-styles).
|
||||
|
||||
Generally not useful, but you might need just the `.open` or `.close` escape code if you're mixing externally styled strings with yours.
|
||||
|
||||
```js
|
||||
var chalk = require('chalk');
|
||||
|
||||
console.log(chalk.styles.red);
|
||||
//=> {open: '\x1b[31m', close: '\x1b[39m'}
|
||||
|
||||
console.log(chalk.styles.red.open + 'Hello' + chalk.styles.red.close);
|
||||
```
|
||||
|
||||
### chalk.stripColor(string)
|
||||
|
||||
[Strip color](https://github.com/sindresorhus/strip-ansi) from a string.
|
||||
|
||||
Can be useful in combination with `.supportsColor` to strip color on externally styled text when it's not supported.
|
||||
|
||||
Example:
|
||||
|
||||
```js
|
||||
var chalk = require('chalk');
|
||||
var styledString = fromExternal();
|
||||
|
||||
if (!chalk.supportsColor) {
|
||||
chalk.stripColor(styledString);
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Styles
|
||||
|
||||
### General
|
||||
|
||||
- reset
|
||||
- bold
|
||||
- italic
|
||||
- underline
|
||||
- inverse
|
||||
- strikethrough
|
||||
|
||||
### Text colors
|
||||
|
||||
- black
|
||||
- red
|
||||
- green
|
||||
- yellow
|
||||
- blue
|
||||
- magenta
|
||||
- cyan
|
||||
- white
|
||||
- gray
|
||||
|
||||
### Background colors
|
||||
|
||||
- bgBlack
|
||||
- bgRed
|
||||
- bgGreen
|
||||
- bgYellow
|
||||
- bgBlue
|
||||
- bgMagenta
|
||||
- bgCyan
|
||||
- bgWhite
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
|
||||
|
||||
-
|
||||
|
||||
[](https://bitdeli.com/free "Bitdeli Badge")
|
||||
27
node_modules/time-require/node_modules/strip-ansi/cli.js
generated
vendored
Executable file
27
node_modules/time-require/node_modules/strip-ansi/cli.js
generated
vendored
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env node
|
||||
'use strict';
|
||||
var fs = require('fs');
|
||||
var strip = require('./index');
|
||||
var input = process.argv[2];
|
||||
|
||||
if (process.argv.indexOf('-h') !== -1 || process.argv.indexOf('--help') !== -1) {
|
||||
console.log('strip-ansi <input file> > <output file>');
|
||||
console.log('or');
|
||||
console.log('cat <input file> | strip-ansi > <output file>');
|
||||
return;
|
||||
}
|
||||
|
||||
if (process.argv.indexOf('-v') !== -1 || process.argv.indexOf('--version') !== -1) {
|
||||
console.log(require('./package').version);
|
||||
return;
|
||||
}
|
||||
|
||||
if (input) {
|
||||
process.stdout.write(strip(fs.readFileSync(input, 'utf8')));
|
||||
return;
|
||||
}
|
||||
|
||||
process.stdin.setEncoding('utf8');
|
||||
process.stdin.on('data', function (data) {
|
||||
process.stdout.write(strip(data));
|
||||
});
|
||||
4
node_modules/time-require/node_modules/strip-ansi/index.js
generated
vendored
Normal file
4
node_modules/time-require/node_modules/strip-ansi/index.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = function (str) {
|
||||
return typeof str === 'string' ? str.replace(/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/g, '') : str;
|
||||
};
|
||||
88
node_modules/time-require/node_modules/strip-ansi/package.json
generated
vendored
Normal file
88
node_modules/time-require/node_modules/strip-ansi/package.json
generated
vendored
Normal file
@@ -0,0 +1,88 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"strip-ansi@0.1.1",
|
||||
"/Users/tatiana/selfdefined"
|
||||
]
|
||||
],
|
||||
"_from": "strip-ansi@0.1.1",
|
||||
"_id": "strip-ansi@0.1.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-OeipjQRNFQZgq+SmgIrPcLt7yZE=",
|
||||
"_location": "/time-require/strip-ansi",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "strip-ansi@0.1.1",
|
||||
"name": "strip-ansi",
|
||||
"escapedName": "strip-ansi",
|
||||
"rawSpec": "0.1.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "0.1.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/time-require/chalk"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.1.1.tgz",
|
||||
"_spec": "0.1.1",
|
||||
"_where": "/Users/tatiana/selfdefined",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "http://sindresorhus.com"
|
||||
},
|
||||
"bin": {
|
||||
"strip-ansi": "cli.js"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/strip-ansi/issues"
|
||||
},
|
||||
"description": "Strip ANSI escape codes (used for colorizing strings in the terminal)",
|
||||
"devDependencies": {
|
||||
"mocha": "~1.x"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.8.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"cli.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/strip-ansi#readme",
|
||||
"keywords": [
|
||||
"strip",
|
||||
"trim",
|
||||
"remove",
|
||||
"ansi",
|
||||
"styles",
|
||||
"color",
|
||||
"colour",
|
||||
"colors",
|
||||
"terminal",
|
||||
"console",
|
||||
"cli",
|
||||
"string",
|
||||
"tty",
|
||||
"escape",
|
||||
"formatting",
|
||||
"rgb",
|
||||
"256",
|
||||
"shell",
|
||||
"xterm",
|
||||
"log",
|
||||
"logging",
|
||||
"command-line",
|
||||
"text"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "strip-ansi",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/strip-ansi.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"version": "0.1.1"
|
||||
}
|
||||
46
node_modules/time-require/node_modules/strip-ansi/readme.md
generated
vendored
Normal file
46
node_modules/time-require/node_modules/strip-ansi/readme.md
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
# strip-ansi [](http://travis-ci.org/sindresorhus/strip-ansi)
|
||||
|
||||
> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) (used for colorizing strings in the terminal)
|
||||
|
||||
Used in the terminal color module [chalk](https://github.com/sindresorhus/chalk).
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
Install locally with [npm](https://npmjs.org/package/strip-ansi):
|
||||
|
||||
```
|
||||
npm install --save strip-ansi
|
||||
```
|
||||
|
||||
Or globally if you want to use it as a CLI app:
|
||||
|
||||
```
|
||||
npm install --global strip-ansi
|
||||
```
|
||||
|
||||
You can then use it in your Terminal like:
|
||||
|
||||
```
|
||||
strip-ansi file-with-color-codes
|
||||
```
|
||||
|
||||
Or pipe something to it:
|
||||
|
||||
```
|
||||
ls | strip-ansi
|
||||
```
|
||||
|
||||
|
||||
## Example
|
||||
|
||||
```js
|
||||
var stripAnsi = require('strip-ansi');
|
||||
stripAnsi('\x1b[4mcake\x1b[0m');
|
||||
//=> cake
|
||||
```
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
94
node_modules/time-require/package.json
generated
vendored
Normal file
94
node_modules/time-require/package.json
generated
vendored
Normal file
@@ -0,0 +1,94 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"time-require@0.1.2",
|
||||
"/Users/tatiana/selfdefined"
|
||||
]
|
||||
],
|
||||
"_from": "time-require@0.1.2",
|
||||
"_id": "time-require@0.1.2",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-+eEss3D8JgXhFARYK6VO9corLZg=",
|
||||
"_location": "/time-require",
|
||||
"_phantomChildren": {
|
||||
"has-color": "0.1.7"
|
||||
},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "time-require@0.1.2",
|
||||
"name": "time-require",
|
||||
"escapedName": "time-require",
|
||||
"rawSpec": "0.1.2",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "0.1.2"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/@11ty/eleventy"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/time-require/-/time-require-0.1.2.tgz",
|
||||
"_spec": "0.1.2",
|
||||
"_where": "/Users/tatiana/selfdefined",
|
||||
"author": {
|
||||
"name": "Jaguard OSS",
|
||||
"email": "oss@jaguard.com",
|
||||
"url": "http://oss.jaguard.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/jaguard/time-require/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"chalk": "^0.4.0",
|
||||
"date-time": "^0.1.1",
|
||||
"pretty-ms": "^0.2.1",
|
||||
"text-table": "^0.2.0"
|
||||
},
|
||||
"description": "Displays the execution time for Node.js modules loading; inspired by @sindresorhus 'time-grunt'",
|
||||
"devDependencies": {
|
||||
"gulp": "~3.6.0",
|
||||
"gulp-cached": "~0.0.3",
|
||||
"gulp-clean": "~0.2.4",
|
||||
"gulp-docco": "~0.0.4",
|
||||
"gulp-if": "~1.0.0",
|
||||
"gulp-jasmine": "~0.2.0",
|
||||
"gulp-jscs": "~0.4.0",
|
||||
"gulp-jsdoc": "~0.1.4",
|
||||
"gulp-jshint": "~1.5.2",
|
||||
"gulp-jsonlint": "~0.0.3",
|
||||
"gulp-load-plugins": "~0.5.0",
|
||||
"gulp-markdown": "~0.1.2",
|
||||
"gulp-markdown-pdf": "~0.2.0",
|
||||
"gulp-match": "~0.0.2",
|
||||
"gulp-notify": "~1.2.5",
|
||||
"gulp-util": "~2.2.14",
|
||||
"jshint-stylish": "~0.1.5",
|
||||
"run-sequence": "~0.3.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.10.0"
|
||||
},
|
||||
"homepage": "https://github.com/jaguard/time-require",
|
||||
"keywords": [
|
||||
"require",
|
||||
"measure",
|
||||
"time",
|
||||
"profile"
|
||||
],
|
||||
"licenses": [
|
||||
{
|
||||
"type": "MIT",
|
||||
"url": "https://github.com/jaguard/time-require/raw/master/LICENSE"
|
||||
}
|
||||
],
|
||||
"main": "src/timeRequire.js",
|
||||
"name": "time-require",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/jaguard/time-require.git"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "gulp watch",
|
||||
"test": "gulp test"
|
||||
},
|
||||
"version": "0.1.2"
|
||||
}
|
||||
93
node_modules/time-require/src/requireHook.js
generated
vendored
Normal file
93
node_modules/time-require/src/requireHook.js
generated
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
/**
|
||||
* requireHook - module wrapping a function that register require() listener and returns hook/unhook control
|
||||
*
|
||||
* @author Ciprian Popa (cyparu)
|
||||
* @since 0.0.1
|
||||
* @version 0.0.1
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
var Module = require("module").Module,
|
||||
_load = Module._load,
|
||||
_hookedAt, _listener;
|
||||
|
||||
/**
|
||||
* Module hooker function that will replace Module._load and invoke the _listener with module and timing information
|
||||
*
|
||||
* @function _hooker
|
||||
*/
|
||||
function _hooker(name, parent) {
|
||||
var timeIn = Date.now(),
|
||||
exports = _load.apply(Module, arguments),
|
||||
timeOut = Date.now(),
|
||||
mod = parent.children[parent.children.length - 1]; // should be the last loaded children
|
||||
// call the listener
|
||||
_listener({
|
||||
name: name,
|
||||
parent: parent,
|
||||
module: mod,
|
||||
filename: mod ? mod.filename : name,
|
||||
exports: exports,
|
||||
requiredOn: timeIn,
|
||||
startedIn: timeOut - timeIn
|
||||
});
|
||||
return exports;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hook Node's require() so the configured callback will be invocked with additional module and time loading information information
|
||||
*
|
||||
* @param {Function} [listener] - optional listener if
|
||||
* @method hook
|
||||
*/
|
||||
function _hook(listener) {
|
||||
if (typeof listener !== "undefined") {
|
||||
if (typeof listener !== "function") {
|
||||
throw new Error("The optional parameter for hook() should be a function but was " + (typeof listener));
|
||||
}
|
||||
// set the listener
|
||||
_listener = listener;
|
||||
}
|
||||
// set the hoocker loader
|
||||
Module._load = _hooker;
|
||||
// mark hooked time
|
||||
_hookedAt = new Date();
|
||||
}
|
||||
|
||||
/**
|
||||
* Unhook Node's require() to the original function
|
||||
*
|
||||
* @method unhook
|
||||
*/
|
||||
function _unhook() {
|
||||
// set the original loader
|
||||
Module._load = _load;
|
||||
// reset hooking time
|
||||
_hookedAt = undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Export a function that set the callback and return hook/unhook control functionality
|
||||
*
|
||||
* @function
|
||||
* @param {Function} listener - require() listener
|
||||
* @param {Boolean} [autohook=true] - optional flag telling if the hooking will be started automatically
|
||||
* @return hook/unhook control function
|
||||
*/
|
||||
module.exports = function(listener, autohook) {
|
||||
if (typeof listener !== "function") {
|
||||
throw new Error("The hooking function should be set");
|
||||
}
|
||||
// set the listener
|
||||
_listener = listener;
|
||||
// if autohook (by default),
|
||||
if (autohook !== false) {
|
||||
_hook();
|
||||
}
|
||||
return {
|
||||
hookedAt: _hookedAt,
|
||||
hook: _hook,
|
||||
unhook: _unhook
|
||||
};
|
||||
};
|
||||
140
node_modules/time-require/src/timeRequire.js
generated
vendored
Normal file
140
node_modules/time-require/src/timeRequire.js
generated
vendored
Normal file
@@ -0,0 +1,140 @@
|
||||
/**
|
||||
* timeRequire - measure the time to load all the subsequnt modules by hoocking require() calls
|
||||
*
|
||||
* @author Ciprian Popa (cyparu)
|
||||
* @since 0.0.1
|
||||
* @version 0.0.1
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
var // setup vars
|
||||
requireData = [],
|
||||
write = process.stdout.write.bind(process.stdout),
|
||||
relative = require("path").relative,
|
||||
cwd = process.cwd(),
|
||||
// require hooker should be first module loaded so all the other requires should count as well
|
||||
/* jshint -W003 */
|
||||
hook = require("./requireHook")(_hooker),
|
||||
table = require("text-table"),
|
||||
dateTime = require("date-time"),
|
||||
prettyMs = require("pretty-ms"),
|
||||
chalk = require("chalk"),
|
||||
// extra locals
|
||||
DEFAULT_COLUMNS = 80,
|
||||
BAR_CHAR = process.platform === "win32" ? "■" : "▇",
|
||||
sorted = hasArg("--sorted") || hasArg("--s"),
|
||||
treshold = (hasArg("--verbose") || hasArg("--V")) ? 0.0: 0.01, // TODO - configure treshold using CLI ?
|
||||
EXTRA_COLUMNS = sorted ? 24 : 20;
|
||||
|
||||
function hasArg(arg) {
|
||||
return process.argv.indexOf(arg) !== -1;
|
||||
}
|
||||
|
||||
function pad(count, seq) {
|
||||
return (count > 1) ? new Array(count).join(seq) : "";
|
||||
}
|
||||
|
||||
function log(str) {
|
||||
write(str + "\n", "utf8");
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback/listener used by requireHook hook to collect all the modules in their loading order
|
||||
*/
|
||||
function _hooker(data) {
|
||||
var filename = relative(cwd, data.filename);
|
||||
// use the shortest name
|
||||
if (filename.length > data.filename) {
|
||||
filename = data.filename;
|
||||
}
|
||||
requireData.push({
|
||||
order: requireData.length, // loading order
|
||||
time: data.startedIn, // time
|
||||
label: data.name + " (" + filename + ")"
|
||||
// name: data.name,
|
||||
// filename: filename
|
||||
});
|
||||
}
|
||||
|
||||
function formatTable(tableData, totalTime) {
|
||||
var NAME_FILE_REX = /(.+)( \(.+\))/,
|
||||
maxColumns = process.stdout.columns || DEFAULT_COLUMNS,
|
||||
validCount = 0,
|
||||
longestRequire = tableData.reduce(function(acc, data) {
|
||||
var avg = data.time / totalTime;
|
||||
if (avg < treshold) {
|
||||
return acc;
|
||||
}
|
||||
validCount++;
|
||||
return Math.max(acc, data.label.length);
|
||||
}, 0),
|
||||
maxBarWidth = (longestRequire > maxColumns / 2) ? ((maxColumns - EXTRA_COLUMNS) / 2) : (maxColumns - (longestRequire + EXTRA_COLUMNS)),
|
||||
processedTableData = [],
|
||||
counter, maxOrderChars;
|
||||
|
||||
function shorten(name) {
|
||||
var nameLength = name.length,
|
||||
partLength, start, end;
|
||||
if (name.length < maxBarWidth) {
|
||||
return name;
|
||||
}
|
||||
partLength = Math.floor((maxBarWidth - 3) / 2);
|
||||
start = name.substr(0, partLength + 1);
|
||||
end = name.substr(nameLength - partLength);
|
||||
return start.trim() + "..." + end.trim();
|
||||
}
|
||||
|
||||
function createBar(percentage) {
|
||||
var rounded = Math.round(percentage * 100);
|
||||
return ((rounded === 0) ? "0" : (pad(Math.ceil(maxBarWidth * percentage) + 1, BAR_CHAR) + " " + rounded)) + "%";
|
||||
}
|
||||
|
||||
// sort the data if needed
|
||||
if (sorted) {
|
||||
tableData.sort(function(e1, e2) {
|
||||
return e2.time - e1.time;
|
||||
});
|
||||
}
|
||||
// initialize the counter
|
||||
counter = 1;
|
||||
// get num ber of chars for padding
|
||||
maxOrderChars = tableData.length.toString().length;
|
||||
// push the header
|
||||
processedTableData.push(["#" + (sorted ? " [order]" : ""), "module", "time", "%"]);
|
||||
tableData.forEach(function(data) {
|
||||
var avg = data.time / totalTime,
|
||||
counterLabel, label, match;
|
||||
// slect just data over the threshold
|
||||
if (avg >= treshold) {
|
||||
counterLabel = counter++;
|
||||
// for sorted collumns show the order loading with padding
|
||||
if (sorted) {
|
||||
counterLabel += pad(maxOrderChars - data.order.toString().length + 1, " ") + " [" + data.order + "]";
|
||||
}
|
||||
label = shorten(data.label);
|
||||
match = label.match(NAME_FILE_REX);
|
||||
if (match) {
|
||||
label = chalk.green(match[1]) + match[2];
|
||||
}
|
||||
processedTableData.push([counterLabel, label, chalk.yellow(prettyMs(data.time)), chalk.blue(createBar(avg))]);
|
||||
}
|
||||
});
|
||||
|
||||
return table(processedTableData, {
|
||||
align: ["r", "l", "r", "l"],
|
||||
stringLength: function(str) {
|
||||
return chalk.stripColor(str).length;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// hook process exit to display the report at the end
|
||||
process.once("exit", function() {
|
||||
var startTime = hook.hookedAt,
|
||||
totalTime = Date.now() - startTime.getTime();
|
||||
log("\n\n" + chalk.underline("Start time: " + chalk.yellow("(" + dateTime(startTime) + ")") + " [treshold=" + (treshold * 100) + "%" + (sorted ? ",sorted" : "") + "]"));
|
||||
log(formatTable(requireData, totalTime));
|
||||
log(chalk.bold.blue("Total require(): ") + chalk.yellow(requireData.length));
|
||||
log(chalk.bold.blue("Total time: ") + chalk.yellow(prettyMs(totalTime)));
|
||||
});
|
||||
Reference in New Issue
Block a user