Initial commit

This commit is contained in:
Developer
2025-04-21 16:03:20 +02:00
commit 2832896157
22874 changed files with 3092801 additions and 0 deletions

View File

@@ -0,0 +1,156 @@
Changelog
===============================================================================
v1.13.0
-------------------------------------------------------------------------------
- Update node-notifier to v9
v1.12.0
-------------------------------------------------------------------------------
- fix(dependencies): moved the erroneous dependency to devDependencies
- Add support set of images for different build status
- fix default title, when `title` option skipped
- Update node-notifier to v8
Minimum supported Node version is 6+
v1.11.1
-------------------------------------------------------------------------------
- support child compilation errors in webpack@<3.11.0
v1.11.0
-------------------------------------------------------------------------------
- Support for `title` function for dynamic titles ([#53](https://github.com/Turbo87/webpack-notifier/pull/53))
v1.10.1
-------------------------------------------------------------------------------
- fix(emoji): show success icon
- docs(emoji): documentation about emoji option
v1.10.0
-------------------------------------------------------------------------------
- Add `onlyOnError` option ([#51](https://github.com/Turbo87/webpack-notifier/pull/51))
v1.9.1
-------------------------------------------------------------------------------
- reduced package size by 2 times
v1.9.0
-------------------------------------------------------------------------------
- Update node-notifier to v6 ([#56](https://github.com/Turbo87/webpack-notifier/pull/56))
v1.8.0
-------------------------------------------------------------------------------
- Add `--emoji` option ([#55](https://github.com/Turbo87/webpack-notifier/pull/55))
v1.7.0
-------------------------------------------------------------------------------
- Handle errors/warnings in child compilations ([#49](https://github.com/Turbo87/webpack-notifier/pull/49))
v1.6.0
-------------------------------------------------------------------------------
- Add support for webpack 4 plugin system ([#39](https://github.com/Turbo87/webpack-notifier/pull/39))
v1.5.1
-------------------------------------------------------------------------------
- Update `node-notifier` dependency ([#23](https://github.com/Turbo87/webpack-notifier/pull/23) and [#36](https://github.com/Turbo87/webpack-notifier/pull/36))
v1.5.0
-------------------------------------------------------------------------------
- Add `skipFirstNotification` option ([#21](https://github.com/Turbo87/webpack-notifier/pull/21))
v1.4.1
-------------------------------------------------------------------------------
- Add missing `logo.png` to published NPM package ([#18](https://github.com/Turbo87/webpack-notifier/pull/18))
v1.4.0
-------------------------------------------------------------------------------
- Pass all options to `node-notifier` ([@opensrcken](https://github.com/opensrcken))
- Strip ANSI escape codes from the messages ([@opensrcken](https://github.com/opensrcken))
- Remove unnecessary files from NPM package
v1.3.2
-------------------------------------------------------------------------------
- Use contentImage as icon on linux ([#17](https://github.com/Turbo87/webpack-notifier/pull/17))
v1.3.1
-------------------------------------------------------------------------------
- Republished v1.3.0 due to NPM deployment failure
v1.3.0
-------------------------------------------------------------------------------
- Prefix error + warning messages ([#13](https://github.com/Turbo87/webpack-notifier/pull/13))
v1.2.1
-------------------------------------------------------------------------------
- fixed `Cannot read property 'rawRequest' of undefined` error ([#5](https://github.com/Turbo87/webpack-notifier/issues/5))
v1.2.0
-------------------------------------------------------------------------------
- `alwaysNotify` option ([#4](https://github.com/Turbo87/webpack-notifier/pull/4))
v1.1.1
-------------------------------------------------------------------------------
- fixed `error is undefined` exception
v1.1.0
-------------------------------------------------------------------------------
- `title` and `contentImage` options ([#1](https://github.com/Turbo87/webpack-notifier/pull/1))
- `excludeWarnings` option ([#2](https://github.com/Turbo87/webpack-notifier/pull/2))
- fixed warnings display
v1.0.1
-------------------------------------------------------------------------------
- documentation improvements
v1.0.0
-------------------------------------------------------------------------------
- initial release after fork

View File

@@ -0,0 +1,6 @@
Copyright (c) 2014, Vsevolod Solovyov <vsevolod.solovyov@gmail.com>
Copyright (c) 2015, Tobias Bieniek <tobias.bieniek@gmx.de>
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

View File

@@ -0,0 +1,133 @@
# webpack-notifier
[![npm Version](https://img.shields.io/npm/v/webpack-notifier.svg)](https://www.npmjs.com/package/webpack-notifier)
[![GitHub Workflow Status](https://github.com/Turbo87/webpack-notifier/workflows/CI/badge.svg)](https://github.com/Turbo87/webpack-notifier/actions?query=workflow:CI)
[![Coverage Status](https://coveralls.io/repos/github/Turbo87/webpack-notifier/badge.svg)](https://coveralls.io/github/Turbo87/webpack-notifier?branch=master)
[![Code Style](https://badgen.net/badge/code%20style/Airbnb/007ec6?icon=airbnb)](https://github.com/airbnb/javascript)
[![npm](https://img.shields.io/npm/dm/webpack-notifier)](https://www.npmjs.com/package/webpack-notifier)
![npm bundle size](https://img.shields.io/bundlephobia/minzip/webpack-notifier)
This is a [webpack](http://webpack.github.io/) plugin that uses the
[node-notifier](https://github.com/mikaelbr/node-notifier) package to
display build status system notifications to the user.
![webpack-notifier screenshot](screenshot.png)
> This is a fork of the
[webpack-error-notification](https://github.com/vsolovyov/webpack-error-notification)
plugin. It adds support for Windows and there is no need to manually install
the `terminal-notifier` package on OS X anymore.
The plugin will notify you about the first run (success/fail),
all failed runs and the first successful run after recovering from
a build failure. In other words: it will stay silent if everything
is fine with your build.
## Installation
Use `npm` to install this package:
npm install --save-dev webpack-notifier
Check the `node-notifier`
[Requirements](https://github.com/mikaelbr/node-notifier#requirements)
whether you need to install any additional tools for your OS.
## Usage
In the `webpack.config.js` file:
```js
var WebpackNotifierPlugin = require('webpack-notifier');
var config = module.exports = {
// ...
plugins: [
new WebpackNotifierPlugin(),
]
}
```
## Configuration
### Title
Title shown in the notification.
```js
new WebpackNotifierPlugin({title: 'Webpack'});
```
```js
new WebpackNotifierPlugin({title: function (params) {
return `Build status is ${params.status} with message ${params.message}`;
}});
```
### Emojis in message text
Show status emoji icon before the message.
```js
new WebpackNotifierPlugin({emoji: true});
```
### Content Image
Image shown in the notification. Can be a path string or object with paths.
#### String path:
```js
var path = require('path');
new WebpackNotifierPlugin({contentImage: path.join(__dirname, 'logo.png')});
```
#### Object string path:
```js
var path = require('path');
const statusesPaths = {
success: path.join(__dirname, 'success.png'),
warning: path.join(__dirname, 'warning.png'),
error: path.join(__dirname, 'error.png')
}
new WebpackNotifierPlugin({contentImage: statusesPaths});
```
### Exclude Warnings
If set to `true`, warnings will not cause a notification.
```js
new WebpackNotifierPlugin({excludeWarnings: true});
```
### Always Notify
Trigger a notification every time. Call it "noisy-mode".
```js
new WebpackNotifierPlugin({alwaysNotify: true});
```
### Notify on error
Trigger a notification only on error.
```js
new WebpackNotifierPlugin({onlyOnError: true});
```
### Skip Notification on the First Build
Do not notify on the first build. This allows you to receive notifications on subsequent incremental builds without being notified on the initial build.
```js
new WebpackNotifierPlugin({skipFirstNotification: true});
```

View File

@@ -0,0 +1,150 @@
var stripANSI = require('strip-ansi');
var path = require('path');
var os = require('os');
var notifier = require('node-notifier');
var DEFAULT_LOGO = path.join(__dirname, 'logo.png');
function WebpackNotifierPlugin(options) {
this.options = options || {};
this.lastBuildSucceeded = false;
this.isFirstBuild = true;
}
module.exports = WebpackNotifierPlugin;
function findFirstDFS(compilation, key) {
var match = compilation[key][0];
if (match) {
return match;
}
var children = compilation.children;
for (var i = 0; i < children.length; i += 1) {
match = findFirstDFS(children[i], key);
if (match) {
return match;
}
}
}
WebpackNotifierPlugin.prototype.compileEndOptions = function compileEndOptions(stats) {
if (this.isFirstBuild) {
this.isFirstBuild = false;
if (this.options.skipFirstNotification) {
return {};
}
}
var imageFromOptions = ('contentImage' in this.options)
? this.options.contentImage
: DEFAULT_LOGO;
var successImage = '';
var warningsImage = '';
var errorsImage = '';
if (typeof imageFromOptions === 'object') {
successImage = imageFromOptions.success;
warningsImage = imageFromOptions.warning;
errorsImage = imageFromOptions.error;
} else {
successImage = imageFromOptions;
warningsImage = imageFromOptions;
errorsImage = imageFromOptions;
}
var hasEmoji = this.options.emoji;
var error;
var contentImage;
var status;
if (this.hasErrors(stats)) {
error = findFirstDFS(stats.compilation, 'errors');
contentImage = errorsImage;
status = 'error';
} else if (this.options.onlyOnError) {
return {};
} else if (this.hasWarnings(stats) && !this.options.excludeWarnings) {
error = findFirstDFS(stats.compilation, 'warnings');
contentImage = warningsImage;
status = 'warning';
} else if (!this.lastBuildSucceeded || this.options.alwaysNotify) {
this.lastBuildSucceeded = true;
return {
message: (hasEmoji ? '✅ ' : '') + 'Build successful',
contentImage: successImage,
status: 'success'
};
} else {
return {};
}
this.lastBuildSucceeded = false;
var message = '';
if (error.module && error.module.rawRequest) {
message = error.module.rawRequest + '\n';
}
if (error.error) {
message = (hasEmoji ? '❌ ' : '') + 'Error: ' + message + error.error.toString();
} else if (error.warning) {
message = (hasEmoji ? '⚠️ ' : '') + 'Warning: ' + message + error.warning.toString();
} else if (error.message) {
message = (hasEmoji ? '⚠️ ' : '') + 'Warning: ' + message + error.message.toString();
}
return {
message: stripANSI(message),
contentImage: contentImage,
status: status
};
};
WebpackNotifierPlugin.prototype.hasErrors = function hasErrors(stats) {
return stats.hasErrors()
|| stats.compilation.children.some(child => child.getStats().hasErrors());
};
WebpackNotifierPlugin.prototype.hasWarnings = function hasWarnings(stats) {
return stats.hasWarnings()
|| stats.compilation.children.some(child => child.getStats().hasWarnings());
};
WebpackNotifierPlugin.prototype.compilationDone = function compilationDone(stats) {
var { message, contentImage, status } = this.compileEndOptions(stats);
if (message) {
var title = this.options.title ? this.options.title : 'Webpack';
if (typeof title === 'function') {
title = title({
msg: message, // compatibility with v1.11.0
message: message,
status: status
});
}
var icon = (os.platform() === 'win32' || os.platform() === 'linux')
? contentImage
: undefined;
notifier.notify(Object.assign(
{},
this.options,
{
title,
message,
contentImage,
icon
}
));
}
};
WebpackNotifierPlugin.prototype.apply = function apply(compiler) {
if (compiler.hooks) {
var plugin = { name: 'Notifier' };
compiler.hooks.done.tap(plugin, this.compilationDone.bind(this));
} else {
compiler.plugin('done', this.compilationDone.bind(this));
}
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@@ -0,0 +1,37 @@
declare namespace ansiRegex {
interface Options {
/**
Match only the first ANSI escape.
@default false
*/
onlyFirst: boolean;
}
}
/**
Regular expression for matching ANSI escape codes.
@example
```
import ansiRegex = require('ansi-regex');
ansiRegex().test('\u001B[4mcake\u001B[0m');
//=> true
ansiRegex().test('cake');
//=> false
'\u001B[4mcake\u001B[0m'.match(ansiRegex());
//=> ['\u001B[4m', '\u001B[0m']
'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true}));
//=> ['\u001B[4m']
'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex());
//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007']
```
*/
declare function ansiRegex(options?: ansiRegex.Options): RegExp;
export = ansiRegex;

View File

@@ -0,0 +1,10 @@
'use strict';
module.exports = ({onlyFirst = false} = {}) => {
const pattern = [
'[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',
'(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))'
].join('|');
return new RegExp(pattern, onlyFirst ? undefined : 'g');
};

View File

@@ -0,0 +1,9 @@
MIT License
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
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.

View File

@@ -0,0 +1,87 @@
{
"_from": "ansi-regex@^5.0.0",
"_id": "ansi-regex@5.0.0",
"_inBundle": false,
"_integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
"_location": "/webpack-notifier/ansi-regex",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "ansi-regex@^5.0.0",
"name": "ansi-regex",
"escapedName": "ansi-regex",
"rawSpec": "^5.0.0",
"saveSpec": null,
"fetchSpec": "^5.0.0"
},
"_requiredBy": [
"/webpack-notifier/strip-ansi"
],
"_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
"_shasum": "388539f55179bf39339c81af30a654d69f87cb75",
"_spec": "ansi-regex@^5.0.0",
"_where": "D:\\developments\\teaser-inertia\\nova-components\\NovaLeader\\node_modules\\webpack-notifier\\node_modules\\strip-ansi",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"bugs": {
"url": "https://github.com/chalk/ansi-regex/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Regular expression for matching ANSI escape codes",
"devDependencies": {
"ava": "^2.4.0",
"tsd": "^0.9.0",
"xo": "^0.25.3"
},
"engines": {
"node": ">=8"
},
"files": [
"index.js",
"index.d.ts"
],
"homepage": "https://github.com/chalk/ansi-regex#readme",
"keywords": [
"ansi",
"styles",
"color",
"colour",
"colors",
"terminal",
"console",
"cli",
"string",
"tty",
"escape",
"formatting",
"rgb",
"256",
"shell",
"xterm",
"command-line",
"text",
"regex",
"regexp",
"re",
"match",
"test",
"find",
"pattern"
],
"license": "MIT",
"name": "ansi-regex",
"repository": {
"type": "git",
"url": "git+https://github.com/chalk/ansi-regex.git"
},
"scripts": {
"test": "xo && ava && tsd",
"view-supported": "node fixtures/view-codes.js"
},
"version": "5.0.0"
}

View File

@@ -0,0 +1,78 @@
# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex)
> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
## Install
```
$ npm install ansi-regex
```
## Usage
```js
const ansiRegex = require('ansi-regex');
ansiRegex().test('\u001B[4mcake\u001B[0m');
//=> true
ansiRegex().test('cake');
//=> false
'\u001B[4mcake\u001B[0m'.match(ansiRegex());
//=> ['\u001B[4m', '\u001B[0m']
'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true}));
//=> ['\u001B[4m']
'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex());
//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007']
```
## API
### ansiRegex(options?)
Returns a regex for matching ANSI escape codes.
#### options
Type: `object`
##### onlyFirst
Type: `boolean`<br>
Default: `false` *(Matches any ANSI escape codes in a string)*
Match only the first ANSI escape.
## FAQ
### Why do you test for codes not in the ECMA 48 standard?
Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.
On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out.
## Maintainers
- [Sindre Sorhus](https://github.com/sindresorhus)
- [Josh Junon](https://github.com/qix-)
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-ansi-regex?utm_source=npm-ansi-regex&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>

View File

@@ -0,0 +1,17 @@
/**
Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string.
@example
```
import stripAnsi = require('strip-ansi');
stripAnsi('\u001B[4mUnicorn\u001B[0m');
//=> 'Unicorn'
stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007');
//=> 'Click'
```
*/
declare function stripAnsi(string: string): string;
export = stripAnsi;

View File

@@ -0,0 +1,4 @@
'use strict';
const ansiRegex = require('ansi-regex');
module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string;

View File

@@ -0,0 +1,9 @@
MIT License
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
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.

View File

@@ -0,0 +1,86 @@
{
"_from": "strip-ansi@^6.0.0",
"_id": "strip-ansi@6.0.0",
"_inBundle": false,
"_integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
"_location": "/webpack-notifier/strip-ansi",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "strip-ansi@^6.0.0",
"name": "strip-ansi",
"escapedName": "strip-ansi",
"rawSpec": "^6.0.0",
"saveSpec": null,
"fetchSpec": "^6.0.0"
},
"_requiredBy": [
"/webpack-notifier"
],
"_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
"_shasum": "0b1571dd7669ccd4f3e06e14ef1eed26225ae532",
"_spec": "strip-ansi@^6.0.0",
"_where": "D:\\developments\\teaser-inertia\\nova-components\\NovaLeader\\node_modules\\webpack-notifier",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"bugs": {
"url": "https://github.com/chalk/strip-ansi/issues"
},
"bundleDependencies": false,
"dependencies": {
"ansi-regex": "^5.0.0"
},
"deprecated": false,
"description": "Strip ANSI escape codes from a string",
"devDependencies": {
"ava": "^2.4.0",
"tsd": "^0.10.0",
"xo": "^0.25.3"
},
"engines": {
"node": ">=8"
},
"files": [
"index.js",
"index.d.ts"
],
"homepage": "https://github.com/chalk/strip-ansi#readme",
"keywords": [
"strip",
"trim",
"remove",
"ansi",
"styles",
"color",
"colour",
"colors",
"terminal",
"console",
"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/chalk/strip-ansi.git"
},
"scripts": {
"test": "xo && ava && tsd"
},
"version": "6.0.0"
}

View File

@@ -0,0 +1,46 @@
# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi)
> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string
## Install
```
$ npm install strip-ansi
```
## Usage
```js
const stripAnsi = require('strip-ansi');
stripAnsi('\u001B[4mUnicorn\u001B[0m');
//=> 'Unicorn'
stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007');
//=> 'Click'
```
## strip-ansi for enterprise
Available as part of the Tidelift Subscription.
The maintainers of strip-ansi and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-strip-ansi?utm_source=npm-strip-ansi&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
## Related
- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module
- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Streaming version of this module
- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes
- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes
- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
## Maintainers
- [Sindre Sorhus](https://github.com/sindresorhus)
- [Josh Junon](https://github.com/qix-)

View File

@@ -0,0 +1,83 @@
{
"_from": "webpack-notifier@^1.5.0",
"_id": "webpack-notifier@1.13.0",
"_inBundle": false,
"_integrity": "sha512-QLk6l/TZKGhyN6Hd1zobaiYno7S9YPX3wH86+YOSufHes77SegGhnGdj+4vrLDFK5A4ZKoQD5GRXXFnM0h0N8A==",
"_location": "/webpack-notifier",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "webpack-notifier@^1.5.0",
"name": "webpack-notifier",
"escapedName": "webpack-notifier",
"rawSpec": "^1.5.0",
"saveSpec": null,
"fetchSpec": "^1.5.0"
},
"_requiredBy": [
"/laravel-mix"
],
"_resolved": "https://registry.npmjs.org/webpack-notifier/-/webpack-notifier-1.13.0.tgz",
"_shasum": "24e43d00ee47032f047373ca291b2d1f543ec12d",
"_spec": "webpack-notifier@^1.5.0",
"_where": "D:\\developments\\teaser-inertia\\nova-components\\NovaLeader\\node_modules\\laravel-mix",
"author": {
"name": "Tobias Bieniek",
"email": "tobias.bieniek@gmx.de"
},
"bugs": {
"url": "https://github.com/Turbo87/webpack-notifier/issues"
},
"bundleDependencies": false,
"dependencies": {
"node-notifier": "^9.0.0",
"strip-ansi": "^6.0.0"
},
"deprecated": false,
"description": "webpack + node-notifier = build status system notifications",
"devDependencies": {
"@types/jest": "^26.0.15",
"eslint": "^7.14.0",
"eslint-config-airbnb-base": "^14.2.1",
"husky": "^4.3.0",
"jest": "^24.9.0",
"memfs": "^3.2.0",
"semver": "^7.3.2",
"ts-jest": "^24.3.0",
"typescript": "^3.9.7",
"webpack": "^1.15.0"
},
"files": [
"index.js",
"logo.png"
],
"homepage": "https://github.com/Turbo87/webpack-notifier#readme",
"husky": {
"hooks": {
"pre-commit": "npm run lint"
}
},
"keywords": [
"webpack",
"notify",
"notification",
"node-notifier",
"notifier",
"build"
],
"license": "ISC",
"main": "index.js",
"name": "webpack-notifier",
"repository": {
"type": "git",
"url": "git+https://github.com/Turbo87/webpack-notifier.git"
},
"scripts": {
"lint": "eslint index.js",
"prepublishOnly": "npm run lint",
"test": "jest",
"test:coverage": "jest --coverage"
},
"version": "1.13.0"
}