From a0579f91bbdf0de62b59df381d97a008bb98df57 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Mon, 30 Oct 2023 16:45:38 +0800 Subject: update/upgrade --- node_modules/oldie/.editorconfig | 14 + node_modules/oldie/.eslintrc | 122 ++ node_modules/oldie/.npmignore | 2 + node_modules/oldie/.travis.yml | 5 + node_modules/oldie/CHANGELOG.md | 21 + node_modules/oldie/CONTRIBUTING.md | 60 + node_modules/oldie/LICENSE.md | 15 + node_modules/oldie/README.md | 319 +++++ node_modules/oldie/index.js | 71 ++ .../oldie/node_modules/ansi-styles/index.js | 65 + .../oldie/node_modules/ansi-styles/license | 21 + .../oldie/node_modules/ansi-styles/package.json | 50 + .../oldie/node_modules/ansi-styles/readme.md | 86 ++ .../oldie/node_modules/browserslist/CHANGELOG.md | 135 ++ .../oldie/node_modules/browserslist/LICENSE | 20 + .../oldie/node_modules/browserslist/README.md | 331 +++++ .../oldie/node_modules/browserslist/cli.js | 95 ++ .../oldie/node_modules/browserslist/index.js | 648 ++++++++++ .../oldie/node_modules/browserslist/package.json | 54 + node_modules/oldie/node_modules/chalk/index.js | 116 ++ node_modules/oldie/node_modules/chalk/license | 21 + .../chalk/node_modules/supports-color/index.js | 50 + .../chalk/node_modules/supports-color/license | 21 + .../chalk/node_modules/supports-color/package.json | 49 + .../chalk/node_modules/supports-color/readme.md | 36 + node_modules/oldie/node_modules/chalk/package.json | 70 ++ node_modules/oldie/node_modules/chalk/readme.md | 213 ++++ node_modules/oldie/node_modules/has-flag/index.js | 10 + node_modules/oldie/node_modules/has-flag/license | 21 + .../oldie/node_modules/has-flag/package.json | 48 + node_modules/oldie/node_modules/has-flag/readme.md | 64 + .../oldie/node_modules/pixrem/.editorconfig | 13 + .../oldie/node_modules/pixrem/.gitattributes | 1 + node_modules/oldie/node_modules/pixrem/.jshintrc | 21 + node_modules/oldie/node_modules/pixrem/.npmignore | 2 + node_modules/oldie/node_modules/pixrem/.travis.yml | 4 + .../oldie/node_modules/pixrem/CHANGELOG.md | 77 ++ node_modules/oldie/node_modules/pixrem/LICENSE | 22 + node_modules/oldie/node_modules/pixrem/README.md | 89 ++ .../oldie/node_modules/pixrem/lib/pixrem.js | 160 +++ .../pixrem/node_modules/.bin/browserslist | 1 + .../oldie/node_modules/pixrem/package.json | 42 + .../oldie/node_modules/pixrem/test/test.js | 285 +++++ .../node_modules/postcss-pseudoelements/.npmignore | 2 + .../postcss-pseudoelements/ChangeLog.md | 16 + .../node_modules/postcss-pseudoelements/README.md | 17 + .../node_modules/postcss-pseudoelements/index.js | 22 + .../postcss-pseudoelements/package.json | 33 + .../postcss-pseudoelements/test/expected.css | 48 + .../postcss-pseudoelements/test/input.css | 48 + .../postcss-pseudoelements/test/test.js | 17 + .../oldie/node_modules/postcss/CHANGELOG.md | 460 +++++++ node_modules/oldie/node_modules/postcss/LICENSE | 20 + node_modules/oldie/node_modules/postcss/README.md | 379 ++++++ .../node_modules/postcss/docs/guidelines/plugin.md | 195 +++ .../node_modules/postcss/docs/guidelines/runner.md | 143 +++ .../oldie/node_modules/postcss/docs/source-maps.md | 72 ++ .../oldie/node_modules/postcss/docs/syntax.md | 231 ++++ .../oldie/node_modules/postcss/lib/at-rule.js | 159 +++ .../oldie/node_modules/postcss/lib/comment.js | 89 ++ .../oldie/node_modules/postcss/lib/container.js | 935 ++++++++++++++ .../node_modules/postcss/lib/css-syntax-error.js | 272 ++++ .../oldie/node_modules/postcss/lib/declaration.js | 130 ++ .../oldie/node_modules/postcss/lib/input.js | 198 +++ .../oldie/node_modules/postcss/lib/lazy-result.js | 432 +++++++ .../oldie/node_modules/postcss/lib/list.js | 95 ++ .../node_modules/postcss/lib/map-generator.js | 312 +++++ .../oldie/node_modules/postcss/lib/node.js | 672 ++++++++++ .../oldie/node_modules/postcss/lib/parse.js | 43 + .../oldie/node_modules/postcss/lib/parser.js | 514 ++++++++ .../oldie/node_modules/postcss/lib/postcss.d.ts | 1305 ++++++++++++++++++++ .../oldie/node_modules/postcss/lib/postcss.js | 292 +++++ .../oldie/node_modules/postcss/lib/previous-map.js | 162 +++ .../oldie/node_modules/postcss/lib/processor.js | 240 ++++ .../oldie/node_modules/postcss/lib/result.js | 206 +++ .../oldie/node_modules/postcss/lib/root.js | 143 +++ .../oldie/node_modules/postcss/lib/rule.js | 136 ++ .../oldie/node_modules/postcss/lib/stringifier.js | 335 +++++ .../oldie/node_modules/postcss/lib/stringify.js | 17 + .../node_modules/postcss/lib/terminal-highlight.js | 76 ++ .../oldie/node_modules/postcss/lib/tokenize.js | 273 ++++ .../oldie/node_modules/postcss/lib/vendor.js | 52 + .../oldie/node_modules/postcss/lib/warn-once.js | 14 + .../oldie/node_modules/postcss/lib/warning.js | 122 ++ .../oldie/node_modules/postcss/package.json | 76 ++ .../oldie/node_modules/strip-ansi/index.js | 6 + node_modules/oldie/node_modules/strip-ansi/license | 21 + .../oldie/node_modules/strip-ansi/package.json | 57 + .../oldie/node_modules/strip-ansi/readme.md | 33 + .../oldie/node_modules/supports-color/browser.js | 2 + .../oldie/node_modules/supports-color/index.js | 84 ++ .../oldie/node_modules/supports-color/license | 21 + .../oldie/node_modules/supports-color/package.json | 66 + .../oldie/node_modules/supports-color/readme.md | 60 + node_modules/oldie/package.json | 61 + node_modules/oldie/test/fixtures/basic.css | 25 + node_modules/oldie/test/fixtures/basic.expect.css | 17 + node_modules/oldie/test/test.js | 52 + 98 files changed, 13078 insertions(+) create mode 100644 node_modules/oldie/.editorconfig create mode 100644 node_modules/oldie/.eslintrc create mode 100644 node_modules/oldie/.npmignore create mode 100644 node_modules/oldie/.travis.yml create mode 100644 node_modules/oldie/CHANGELOG.md create mode 100644 node_modules/oldie/CONTRIBUTING.md create mode 100644 node_modules/oldie/LICENSE.md create mode 100644 node_modules/oldie/README.md create mode 100644 node_modules/oldie/index.js create mode 100644 node_modules/oldie/node_modules/ansi-styles/index.js create mode 100644 node_modules/oldie/node_modules/ansi-styles/license create mode 100644 node_modules/oldie/node_modules/ansi-styles/package.json create mode 100644 node_modules/oldie/node_modules/ansi-styles/readme.md create mode 100644 node_modules/oldie/node_modules/browserslist/CHANGELOG.md create mode 100644 node_modules/oldie/node_modules/browserslist/LICENSE create mode 100644 node_modules/oldie/node_modules/browserslist/README.md create mode 100755 node_modules/oldie/node_modules/browserslist/cli.js create mode 100644 node_modules/oldie/node_modules/browserslist/index.js create mode 100644 node_modules/oldie/node_modules/browserslist/package.json create mode 100644 node_modules/oldie/node_modules/chalk/index.js create mode 100644 node_modules/oldie/node_modules/chalk/license create mode 100644 node_modules/oldie/node_modules/chalk/node_modules/supports-color/index.js create mode 100644 node_modules/oldie/node_modules/chalk/node_modules/supports-color/license create mode 100644 node_modules/oldie/node_modules/chalk/node_modules/supports-color/package.json create mode 100644 node_modules/oldie/node_modules/chalk/node_modules/supports-color/readme.md create mode 100644 node_modules/oldie/node_modules/chalk/package.json create mode 100644 node_modules/oldie/node_modules/chalk/readme.md create mode 100644 node_modules/oldie/node_modules/has-flag/index.js create mode 100644 node_modules/oldie/node_modules/has-flag/license create mode 100644 node_modules/oldie/node_modules/has-flag/package.json create mode 100644 node_modules/oldie/node_modules/has-flag/readme.md create mode 100644 node_modules/oldie/node_modules/pixrem/.editorconfig create mode 100644 node_modules/oldie/node_modules/pixrem/.gitattributes create mode 100644 node_modules/oldie/node_modules/pixrem/.jshintrc create mode 100644 node_modules/oldie/node_modules/pixrem/.npmignore create mode 100644 node_modules/oldie/node_modules/pixrem/.travis.yml create mode 100644 node_modules/oldie/node_modules/pixrem/CHANGELOG.md create mode 100644 node_modules/oldie/node_modules/pixrem/LICENSE create mode 100644 node_modules/oldie/node_modules/pixrem/README.md create mode 100644 node_modules/oldie/node_modules/pixrem/lib/pixrem.js create mode 120000 node_modules/oldie/node_modules/pixrem/node_modules/.bin/browserslist create mode 100644 node_modules/oldie/node_modules/pixrem/package.json create mode 100644 node_modules/oldie/node_modules/pixrem/test/test.js create mode 100644 node_modules/oldie/node_modules/postcss-pseudoelements/.npmignore create mode 100644 node_modules/oldie/node_modules/postcss-pseudoelements/ChangeLog.md create mode 100644 node_modules/oldie/node_modules/postcss-pseudoelements/README.md create mode 100644 node_modules/oldie/node_modules/postcss-pseudoelements/index.js create mode 100644 node_modules/oldie/node_modules/postcss-pseudoelements/package.json create mode 100644 node_modules/oldie/node_modules/postcss-pseudoelements/test/expected.css create mode 100644 node_modules/oldie/node_modules/postcss-pseudoelements/test/input.css create mode 100644 node_modules/oldie/node_modules/postcss-pseudoelements/test/test.js create mode 100644 node_modules/oldie/node_modules/postcss/CHANGELOG.md create mode 100644 node_modules/oldie/node_modules/postcss/LICENSE create mode 100644 node_modules/oldie/node_modules/postcss/README.md create mode 100644 node_modules/oldie/node_modules/postcss/docs/guidelines/plugin.md create mode 100644 node_modules/oldie/node_modules/postcss/docs/guidelines/runner.md create mode 100644 node_modules/oldie/node_modules/postcss/docs/source-maps.md create mode 100644 node_modules/oldie/node_modules/postcss/docs/syntax.md create mode 100644 node_modules/oldie/node_modules/postcss/lib/at-rule.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/comment.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/container.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/css-syntax-error.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/declaration.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/input.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/lazy-result.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/list.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/map-generator.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/node.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/parse.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/parser.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/postcss.d.ts create mode 100644 node_modules/oldie/node_modules/postcss/lib/postcss.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/previous-map.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/processor.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/result.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/root.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/rule.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/stringifier.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/stringify.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/terminal-highlight.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/tokenize.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/vendor.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/warn-once.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/warning.js create mode 100644 node_modules/oldie/node_modules/postcss/package.json create mode 100644 node_modules/oldie/node_modules/strip-ansi/index.js create mode 100644 node_modules/oldie/node_modules/strip-ansi/license create mode 100644 node_modules/oldie/node_modules/strip-ansi/package.json create mode 100644 node_modules/oldie/node_modules/strip-ansi/readme.md create mode 100644 node_modules/oldie/node_modules/supports-color/browser.js create mode 100644 node_modules/oldie/node_modules/supports-color/index.js create mode 100644 node_modules/oldie/node_modules/supports-color/license create mode 100644 node_modules/oldie/node_modules/supports-color/package.json create mode 100644 node_modules/oldie/node_modules/supports-color/readme.md create mode 100644 node_modules/oldie/package.json create mode 100644 node_modules/oldie/test/fixtures/basic.css create mode 100644 node_modules/oldie/test/fixtures/basic.expect.css create mode 100644 node_modules/oldie/test/test.js (limited to 'node_modules/oldie') diff --git a/node_modules/oldie/.editorconfig b/node_modules/oldie/.editorconfig new file mode 100644 index 00000000..7843e7d0 --- /dev/null +++ b/node_modules/oldie/.editorconfig @@ -0,0 +1,14 @@ +root = true + +[*] +indent_style = tab +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false + +[*.{json,yml}] +indent_size = 2 diff --git a/node_modules/oldie/.eslintrc b/node_modules/oldie/.eslintrc new file mode 100644 index 00000000..d85f6967 --- /dev/null +++ b/node_modules/oldie/.eslintrc @@ -0,0 +1,122 @@ +{ + "rules": { + "no-shadow-restricted-names": [2], + "computed-property-spacing": [2], + "no-empty-character-class": [2], + "no-irregular-whitespace": [2], + "no-unexpected-multiline": [2], + "no-multiple-empty-lines": [2], + "space-return-throw-case": [2], + "no-constant-condition": [2], + "no-extra-boolean-cast": [2], + "no-inner-declarations": [2], + "no-this-before-super": [2], + "no-array-constructor": [2], + "object-curly-spacing": [2, "always"], + "no-floating-decimal": [2], + "no-warning-comments": [2], + "handle-callback-err": [2], + "no-unneeded-ternary": [2], + "operator-assignment": [2], + "space-before-blocks": [2], + "no-native-reassign": [2], + "no-trailing-spaces": [2], + "operator-linebreak": [2, "after"], + "consistent-return": [2], + "no-duplicate-case": [2], + "no-invalid-regexp": [2], + "no-negated-in-lhs": [2], + "constructor-super": [2], + "no-nested-ternary": [0], + "no-extend-native": [2], + "block-scoped-var": [2], + "no-control-regex": [2], + "no-sparse-arrays": [2], + "no-throw-literal": [2], + "no-return-assign": [2], + "no-const-assign": [2], + "no-class-assign": [2], + "no-extra-parens": [2], + "no-regex-spaces": [2], + "no-implied-eval": [2], + "no-useless-call": [2], + "no-self-compare": [2], + "no-octal-escape": [2], + "no-new-wrappers": [2], + "no-process-exit": [2], + "no-catch-shadow": [2], + "linebreak-style": [2], + "space-infix-ops": [2], + "space-unary-ops": [2], + "no-func-assign": [2], + "no-unreachable": [2], + "accessor-pairs": [2], + "no-empty-label": [2], + "no-fallthrough": [2], + "no-path-concat": [2], + "no-new-require": [2], + "no-spaced-func": [2], + "no-unused-vars": [2], + "spaced-comment": [2], + "no-delete-var": [2], + "comma-spacing": [2], + "no-extra-semi": [2], + "no-extra-bind": [2], + "arrow-spacing": [2], + "prefer-spread": [2], + "no-new-object": [2], + "no-multi-str": [2], + "semi-spacing": [2], + "no-lonely-if": [2], + "dot-notation": [2], + "dot-location": [2, "property"], + "comma-dangle": [2, "never"], + "no-dupe-args": [2], + "no-dupe-keys": [2], + "no-ex-assign": [2], + "no-obj-calls": [2], + "valid-typeof": [2], + "default-case": [2], + "no-redeclare": [2], + "no-div-regex": [2], + "no-sequences": [2], + "no-label-var": [2], + "comma-style": [2], + "brace-style": [2], + "no-debugger": [2], + "quote-props": [0], + "no-iterator": [2], + "no-new-func": [2], + "key-spacing": [2, { "align": "value" }], + "complexity": [2], + "new-parens": [2], + "no-eq-null": [2], + "no-bitwise": [0], + "wrap-iife": [2], + "no-caller": [2], + "use-isnan": [2], + "no-labels": [2], + "no-shadow": [2], + "camelcase": [2], + "eol-last": [2], + "no-octal": [2], + "no-empty": [2], + "no-alert": [2], + "no-proto": [2], + "no-undef": [2], + "no-eval": [2], + "no-with": [2], + "no-void": [2], + "new-cap": [2], + "eqeqeq": [2], + "no-new": [2], + "quotes": [2, "single"], + "indent": [2, "tab"], + "semi": [2, "always"], + "yoda": [2, "never"] + }, + "env": { + "mocha": true, + "node": true + } +} diff --git a/node_modules/oldie/.npmignore b/node_modules/oldie/.npmignore new file mode 100644 index 00000000..1ca95717 --- /dev/null +++ b/node_modules/oldie/.npmignore @@ -0,0 +1,2 @@ +node_modules/ +npm-debug.log diff --git a/node_modules/oldie/.travis.yml b/node_modules/oldie/.travis.yml new file mode 100644 index 00000000..c8d06639 --- /dev/null +++ b/node_modules/oldie/.travis.yml @@ -0,0 +1,5 @@ +sudo: false +language: node_js +node_js: + - stable + - "0.12" diff --git a/node_modules/oldie/CHANGELOG.md b/node_modules/oldie/CHANGELOG.md new file mode 100644 index 00000000..ba1551f8 --- /dev/null +++ b/node_modules/oldie/CHANGELOG.md @@ -0,0 +1,21 @@ +## 1.3.0 (2015-10-10) + +- Updated: PostCSS UnRGBA 1.1.0 (major) +- Updated: PostCSS 5.0.9 (patch) + +## 1.2.0 (2015-10-10) + +- Added: PostCSS UnRGBA 1.0.0 +- Updated: Documentation and tests + +## 1.1.1 (2015-10-05) + +- Updated: Documentation + +## 1.1.0 (2015-10-05) + +- Added: PostCSS UnNth 1.0.0 + +## 1.0.0 (2015-10-04) + +- Added: Initial release diff --git a/node_modules/oldie/CONTRIBUTING.md b/node_modules/oldie/CONTRIBUTING.md new file mode 100644 index 00000000..c60db57d --- /dev/null +++ b/node_modules/oldie/CONTRIBUTING.md @@ -0,0 +1,60 @@ +You want to help? You rock! Now, take a moment to be sure your contributions make sense to everyone else. + +## Reporting Issues + +Found a problem? Want a new feature? + +- See if your issue or idea has [already been reported]. +- Provide a [reduced test case] or a [live example]. + +Remember, a bug is a _demonstrable problem_ caused by _our_ code. + +## Submitting Pull Requests + +Pull requests are the greatest contributions, so be sure they are focused in scope, and do avoid unrelated commits. + +1. To begin, [fork this project], clone your fork, and add our upstream. + ```bash + # Clone your fork of the repo into the current directory + git clone https://github.com//oldie + # Navigate to the newly cloned directory + cd oldie + # Assign the original repo to a remote called "upstream" + git remote add upstream https://github.com/jonathantneal/oldie + # Install the tools necessary for development + npm install + ``` + +2. Create a branch for your feature or fix: + ```bash + # Move into a new branch for a feature + git checkout -b feature/thing + ``` + ```bash + # Move into a new branch for a fix + git checkout -b fix/something + ``` + +3. Be sure your code follows our practices. + ```bash + # Test current code + npm run test + ``` + +4. Push your branch up to your fork: + ```bash + # Push a feature branch + git push origin feature/thing + ``` + ```bash + # Push a fix branch + git push origin fix/something + ``` + +5. Now [open a pull request] with a clear title and description. + +[already been reported]: issues +[fork this project]: fork +[live example]: http://codepen.io/pen +[open a pull request]: https://help.github.com/articles/using-pull-requests/ +[reduced test case]: https://css-tricks.com/reduced-test-cases/ diff --git a/node_modules/oldie/LICENSE.md b/node_modules/oldie/LICENSE.md new file mode 100644 index 00000000..565f84e3 --- /dev/null +++ b/node_modules/oldie/LICENSE.md @@ -0,0 +1,15 @@ +# CC0 1.0 Universal License + +Public Domain Dedication + +The person(s) who associated a work with this deed has dedicated the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. + +You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission. + +In no way are the patent or trademark rights of any person affected by CC0, nor are the rights that other persons may have in the work or in how the work is used, such as publicity or privacy rights. + +Unless expressly stated otherwise, the person(s) who associated a work with this deed makes no warranties about the work, and disclaims liability for all uses of the work, to the fullest extent permitted by applicable law. + +When using or citing the work, you should not imply endorsement by the author or the affirmer. + +This is a [human-readable summary of the Legal Code](https://creativecommons.org/publicdomain/zero/1.0/) ([read the full text](https://creativecommons.org/publicdomain/zero/1.0/legalcode)). diff --git a/node_modules/oldie/README.md b/node_modules/oldie/README.md new file mode 100644 index 00000000..78e9bde1 --- /dev/null +++ b/node_modules/oldie/README.md @@ -0,0 +1,319 @@ +# Oldie [![Build Status][ci-img]][ci] + + + +[Oldie] tranforms CSS to be compatible with old Internet Explorer. + +```html + + +``` + +If you’re like me, you stopped supporting IE8 years ago. Yet, here you are, satisfying another client that somehow managed to get this requirement past you. + +### Flatten Media Queries + +Resolve media queries for a desktop experience. + +```css +/* before */ + +body { + font-size: 12px; +} + +@media screen and (max-width: 767px) { + body { + font-size: 16px; + } +} + +@media screen and (min-width: 768px) { + body { + color: #444; + } +} + +/* after */ + +body { + font-size: 12px; +} + +body { + color: #444; +} +``` + +### Replace :root + +Swap `:root` selectors with `html` selectors. + +```css +/* before */ + +:root { + background-color: black; + color: white; +} + +/* after */ + +html { + background-color: black; + color: white; +} +``` + +### Reduce calc() + +Reduce `calc()` references whenever possible. + +```css +/* before */ + +.banner { + font-size: calc(16px * 3); +} + +/* after */ + +.banner { + font-size: 48px; +} +``` + +### Resolve rem + +Resolve `rem` values as standard pixels. + +```css +/* before */ + +.container { + margin-top: 2.5rem; +} + +/* after */ + +.container { + margin-top: 40px; +} +``` + +### Uphold opacity + +Swap `opacity` properties with IE8 compatible `filter` properties. + +```css +/* before */ + +.figure { + opacity: .5; +} + +/* after */ + +.figure { + filter: alpha(opacity=50); +} +``` + +### Patch pseudo-elements + +Swap `::` selectors with IE8 compatible `:` selectors. + +```css +/* before */ + +a::after { + content: " (" attr(href) ")"; +} + +/* after */ + +a:after { + content: " (" attr(href) ")"; +} +``` + +### Retain rgba colors + +Swap `rgba` values with IE8 compatible hex values and filter properties. + +```css +/* before */ + +.hero { + background-color: rgba(153, 221, 153, .8); + border: solid 1px rgba(100, 102, 103, .3); +} + +/* after */ + +.hero { + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#8099dd99',endColorstr='#8099dd99'); + border: solid 1px #646667; +} +``` + +### Forget :not + +Remove `:not()` selectors while preserving the other selectors in a rule. + +```css +/* before */ + +.a, .b:not(.c), d { + color: red; +} + +/* after */ + +.a, .d { + color: red; +} +``` + +### Salvage :nth-child + +Swap `:nth-child` selectors with `:first-child`. + +```css +/* before */ + +.container > p:nth-child(4).specific > span { + font-weight: bold; +} + +/* after */ + +.container > :first-child + * + * + p.specific > span { + font-weight: bold; +} +``` + +## Plugins + +[Oldie] is powered by the following plugins: + +- [PostCSS Calc](https://github.com/postcss/postcss-calc) +- [PostCSS UnMQ](https://github.com/jonathantneal/postcss-unmq) +- [PostCSS UnRoot](https://github.com/jonathantneal/postcss-unroot) +- [PostCSS UnNth](https://github.com/jonathantneal/postcss-unnth) +- [PostCSS UnNot](https://github.com/jonathantneal/postcss-unnot) +- [PostCSS UnOpacity](https://github.com/jonathantneal/postcss-unopacity) +- [PostCSS UnRGBA](https://github.com/jonathantneal/postcss-unrgba) +- [PostCSS Pixrem](https://github.com/robwierzbowski/node-pixrem) +- [PostCSS Pseudo Elements](https://github.com/axa-ch/postcss-pseudoelements) + +Some of these plugins have more features than are described here. Visit their project pages to learn more about them individually. + +## Usage + +Follow these steps to use [Oldie]. + +Add [Oldie] to your build tool: + +```bash +npm install oldie --save-dev +``` + +#### Node + +```js +require('oldie')({ /* options */ }).process(YOUR_CSS); +``` + +#### PostCSS + +Add [PostCSS] to your build tool: + +```bash +npm install postcss --save-dev +``` + +Load [Oldie] as a PostCSS plugin: + +```js +postcss([ + require('oldie')({ /* options */ }) +]); +``` + +#### Gulp + +Add [Gulp PostCSS] to your build tool: + +```bash +npm install gulp-postcss --save-dev +``` + +Enable [Oldie] within your Gulpfile: + +```js +var postcss = require('gulp-postcss'); + +gulp.task('css', function () { + return gulp.src('./css/src/*.css').pipe( + postcss([ + require('oldie')({ /* options */ }) + ]) + ).pipe( + gulp.dest('./css') + ); +}); +``` + +#### Grunt + +Add [Grunt PostCSS] to your build tool: + +```bash +npm install grunt-postcss --save-dev +``` + +Enable [Oldie] within your Gruntfile: + +```js +grunt.loadNpmTasks('grunt-postcss'); + +grunt.initConfig({ + postcss: { + options: { + processors: [ + require('oldie')({ /* options */ }) + ] + }, + dist: { + src: 'css/*.css' + } + } +}); +``` + +## Options + +Each plugin’s options may be configured by targeting the plugin’s namespace. Any plugins may be disabled by giving them a `disable` property. + +Example: +```js +require('oldie')({ + rgba: { + filter: true + }, + rem: { + replace: false + }, + unmq: { + disable: true + } +}) +``` + +[ci]: https://travis-ci.org/jonathantneal/oldie +[ci-img]: https://travis-ci.org/jonathantneal/oldie.svg +[Gulp PostCSS]: https://github.com/postcss/gulp-postcss +[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss +[PostCSS]: https://github.com/postcss/postcss +[Oldie]: https://github.com/jonathantneal/oldie diff --git a/node_modules/oldie/index.js b/node_modules/oldie/index.js new file mode 100644 index 00000000..557b2d5c --- /dev/null +++ b/node_modules/oldie/index.js @@ -0,0 +1,71 @@ +var assign = require('object-assign'); +var postcss = require('postcss'); + +var processors = [ + { + plugin: require('postcss-calc'), + namespace: 'calc', + defaults: {} + }, + { + plugin: require('postcss-unmq'), + namespace: 'media', + defaults: {} + }, + { + plugin: require('postcss-unroot'), + namespace: 'root', + defaults: {} + }, + { + plugin: require('postcss-unnth'), + namespace: 'nth', + defaults: {} + }, + { + plugin: require('postcss-unnot'), + namespace: 'not', + defaults: {} + }, + { + plugin: require('postcss-unopacity'), + namespace: 'opacity', + defaults: {} + }, + { + plugin: require('postcss-unrgba'), + namespace: 'rgba', + defaults: {} + }, + { + plugin: require('pixrem'), + namespace: 'rem', + defaults: { + replace: true + } + }, + { + plugin: require('postcss-pseudoelements'), + namespace: 'pseudo', + defaults: {} + } +]; + +module.exports = postcss.plugin('oldie', function (opts) { + opts = assign({}, opts); + + var instance = postcss(); + + processors.forEach(function (processor) { + var namespaceOptions = processor.namespace in opts ? opts[processor.namespace] : opts; + var processorOptions = {}; + + processorOptions = assign({}, processor.defaults, namespaceOptions); + + if (namespaceOptions && !processorOptions.disable) { + instance.use(processor.plugin(processorOptions)); + } + }); + + return instance; +}); diff --git a/node_modules/oldie/node_modules/ansi-styles/index.js b/node_modules/oldie/node_modules/ansi-styles/index.js new file mode 100644 index 00000000..78945278 --- /dev/null +++ b/node_modules/oldie/node_modules/ansi-styles/index.js @@ -0,0 +1,65 @@ +'use strict'; + +function assembleStyles () { + var styles = { + modifiers: { + reset: [0, 0], + bold: [1, 22], // 21 isn't widely supported and 22 does the same thing + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + colors: { + 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] + }, + bgColors: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49] + } + }; + + // fix humans + styles.colors.grey = styles.colors.gray; + + Object.keys(styles).forEach(function (groupName) { + var group = styles[groupName]; + + Object.keys(group).forEach(function (styleName) { + var style = group[styleName]; + + styles[styleName] = group[styleName] = { + open: '\u001b[' + style[0] + 'm', + close: '\u001b[' + style[1] + 'm' + }; + }); + + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + }); + + return styles; +} + +Object.defineProperty(module, 'exports', { + enumerable: true, + get: assembleStyles +}); diff --git a/node_modules/oldie/node_modules/ansi-styles/license b/node_modules/oldie/node_modules/ansi-styles/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/node_modules/oldie/node_modules/ansi-styles/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (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. diff --git a/node_modules/oldie/node_modules/ansi-styles/package.json b/node_modules/oldie/node_modules/ansi-styles/package.json new file mode 100644 index 00000000..78c535f7 --- /dev/null +++ b/node_modules/oldie/node_modules/ansi-styles/package.json @@ -0,0 +1,50 @@ +{ + "name": "ansi-styles", + "version": "2.2.1", + "description": "ANSI escape codes for styling strings in the terminal", + "license": "MIT", + "repository": "chalk/ansi-styles", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "maintainers": [ + "Sindre Sorhus (sindresorhus.com)", + "Joshua Appelman (jbnicolai.com)" + ], + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "files": [ + "index.js" + ], + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "devDependencies": { + "mocha": "*" + } +} diff --git a/node_modules/oldie/node_modules/ansi-styles/readme.md b/node_modules/oldie/node_modules/ansi-styles/readme.md new file mode 100644 index 00000000..3f933f61 --- /dev/null +++ b/node_modules/oldie/node_modules/ansi-styles/readme.md @@ -0,0 +1,86 @@ +# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles) + +> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal + +You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings. + +![](screenshot.png) + + +## Install + +``` +$ npm install --save ansi-styles +``` + + +## Usage + +```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 + +### Modifiers + +- `reset` +- `bold` +- `dim` +- `italic` *(not widely supported)* +- `underline` +- `inverse` +- `hidden` +- `strikethrough` *(not widely supported)* + +### Colors + +- `black` +- `red` +- `green` +- `yellow` +- `blue` +- `magenta` +- `cyan` +- `white` +- `gray` + +### Background colors + +- `bgBlack` +- `bgRed` +- `bgGreen` +- `bgYellow` +- `bgBlue` +- `bgMagenta` +- `bgCyan` +- `bgWhite` + + +## Advanced usage + +By default you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module. + +- `ansi.modifiers` +- `ansi.colors` +- `ansi.bgColors` + + +###### Example + +```js +console.log(ansi.colors.green.open); +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/oldie/node_modules/browserslist/CHANGELOG.md b/node_modules/oldie/node_modules/browserslist/CHANGELOG.md new file mode 100644 index 00000000..5e895bcb --- /dev/null +++ b/node_modules/oldie/node_modules/browserslist/CHANGELOG.md @@ -0,0 +1,135 @@ +# Change Log +This project adheres to [Semantic Versioning](http://semver.org/). + +## 1.7.7 +* Update Firefox ESR. + +## 1.7.6 +* Fix Android Chrome selection. + +## 1.7.5 +* Fix combining `not` query with country based statistics. +* Fix `--env` argument in CLI (by Tuure Savuoja). + +## 1.7.4 +* Speed up browser sorting (by Aarni Koskela). + +## 1.7.3 +* Fix config finding when directory was passed to `path` (by Aarni Koskela). + +## 1.7.2 +* Fix config finding algorithm (by Aarni Koskela). + +## 1.7.1 +* Fix unreleased browsers version detection. + +## 1.7 +* Add `--config` and `--env` arguments to CLI (by Jarek Rencz). + +## 1.6 +* Convert Electron version to Chrome (by Kilian Valkhof). +* Fix `0` version mistake in Can I Use data. + +## 1.5.2 +* Fix browser versions ordering (by Marco Massarotto). + +## 1.5.1 +* Fix error on `package.json` and `browserslist` in same directory. + +## 1.5 +* Add `package.json` support (by Stepan Kuzmin). +* Add environments support (by Maksim Semenov and openlibser). +* Add `browserslist-stats.json` file support (by Oleh Aloshkin). +* Add `config` option to CLI (by Evilebot Tnawi). +* Add JSDoc. +* Fix tests on Windows (by Anna Stoliar). +* Don’t set custom usage statistics globally. + +## 1.4 +* Add `defaults` keyword. + +## 1.3.6 +* Add `UCAndroid` alias to `and_uc` (by Evilebot Tnawi). + +## 1.3.5 +* Fix Opera Mini support. Use `op_mini all`. + +## 1.3.4 +* Add space-less `>1%` and `>.5%` syntax support (by Andreas Lind). + +## 1.3.3 +* Clean `0` versions in some country-based requests. + +## 1.3.2 +* Update Firefox ESR. + +## 1.3.1 +* Add Safari TP support. + +## 1.3 +* Add coverage for specific country (by Joshua Wise). + +## 1.2 +* Add `browserslist.coverage()` method. +* Add `--coverage` and `-c` argument to CLI. +* Add `-v` argument support to CLI. +* Better error handling in CLI. + +## 1.1.3 +* Fix jspm support (by Sean Anderson). + +## 1.1.2 +* Fix jspm support (by Sean Anderson). + +## 1.1.1 +* Fix space-less `>10%` and `>10% in my stats` queries. +* Normalize error messages. +* Remove development files from npm package. + +## 1.1 +* Added query against custom browser usage data (by Daniel Rey). + +## 1.0.1 +* Update Firefox ESR (by Rouven Weßling). + +## 1.0 +* Remove Opera 12.1 from default query. +* Add `not` keyword and exclude browsers by query. +* Add Microsoft Edge support (by Andrey Polischuk). +* Add CLI for debug and non-JS usage (by Luke Horvat). +* Use own class in Browserslist errors. + +## 0.5 +* Add version ranges `IE 6-9` (by Ben Briggs). + +## 0.4 +* Add `config` option and `BROWSERSLIST_CONFIG` environment variable support. +* Add symlink config support. + +## 0.3.3 +* Fix DynJS compatibility (by Nick Howes). + +## 0.3.2 +* Fix joined versions on versions query (by Vincent De Oliveira). + +## 0.3.1 +* Fix global variable leak (by Peter Müller). + +## 0.3 +* Takes queries from `BROWSERSLIST` environment variable. + +## 0.2 +* Return Can I Use joined versions as `ios_saf 7.0-7.1`. + +## 0.1.3 +* Better work with Can I Use joined versions like `ios_saf 7.0-7.1`. +* Browserslist now understands `ios_saf 7.0` or `ios_saf 7`. + +## 0.1.2 +* Do not create global `browserslist` var (by Maxime Thirouin). + +## 0.1.1 +* Sort browsers by name and version. + +## 0.1 +* Initial release. diff --git a/node_modules/oldie/node_modules/browserslist/LICENSE b/node_modules/oldie/node_modules/browserslist/LICENSE new file mode 100644 index 00000000..1ae47a20 --- /dev/null +++ b/node_modules/oldie/node_modules/browserslist/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright 2014 Andrey Sitnik + +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. diff --git a/node_modules/oldie/node_modules/browserslist/README.md b/node_modules/oldie/node_modules/browserslist/README.md new file mode 100644 index 00000000..0de38817 --- /dev/null +++ b/node_modules/oldie/node_modules/browserslist/README.md @@ -0,0 +1,331 @@ +# Browserslist + +Library to share supported browsers list between different front-end tools. +It is used in [Autoprefixer], [Stylelint], [eslint-plugin-compat] +and [babel-env-preset]. + +All tools that rely on Browserslist will find its config automatically, +when you add the following to `package.json`: + +```json +{ + "browserslist": [ + "> 1%", + "last 2 versions" + ] +} +``` + +Or in `browserslist` config: + +```yaml +# Browsers that we support + +> 1% +Last 2 versions +IE 10 # sorry +``` + +Developers set browsers list in queries like `last 2 version` +to be free from updating browser versions manually. +Browserslist will use [Can i Use] data for this queries. + +Browserslist will take browsers queries from tool option, +`browserslist` config, `browserslist` section in `package.json` +or environment variables. + +You can test Browserslist queries in [online demo]. + + + Sponsored by Evil Martians + + +[eslint-plugin-compat]: https://github.com/amilajack/eslint-plugin-compat +[babel-env-preset]: https://github.com/babel/babel-preset-env +[Autoprefixer]: https://github.com/postcss/autoprefixer +[online demo]: http://browserl.ist/ +[Stylelint]: http://stylelint.io/ +[Can I Use]: http://caniuse.com/ + +## Queries + +Browserslist will use browsers query from one of this sources: + +1. Tool options. For example `browsers` option in Autoprefixer. +2. `BROWSERSLIST` environment variable. +3. `browserslist` config file in current or parent directories. +4. `browserslist` key in `package.json` file in current or parent directories. +5. If the above methods did not produce a valid result + Browserslist will use defaults: `> 1%, last 2 versions, Firefox ESR`. + +We recommend to write queries in `browserslist` config or `package.json`. + +You can specify the versions by queries (case insensitive): + +* `last 2 versions`: the last 2 versions for each major browser. +* `last 2 Chrome versions`: the last 2 versions of Chrome browser. +* `> 5%`: versions selected by global usage statistics. +* `> 5% in US`: uses USA usage statistics. It accepts [two-letter country code]. +* `> 5% in my stats`: uses [custom usage data]. +* `ie 6-8`: selects an inclusive range of versions. +* `Firefox > 20`: versions of Firefox newer than 20. +* `Firefox >= 20`: versions of Firefox newer than or equal to 20. +* `Firefox < 20`: versions of Firefox less than 20. +* `Firefox <= 20`: versions of Firefox less than or equal to 20. +* `Firefox ESR`: the latest [Firefox ESR] version. +* `iOS 7`: the iOS browser version 7 directly. +* `not ie <= 8`: exclude browsers selected before by previous queries. + You can add `not ` to any query. + +Browserslist works with separated versions of browsers. +You should avoid queries like `Firefox > 0`. + +Multiple criteria are combined as a boolean `OR`. A browser version must match +at least one of the criteria to be selected. + +All queries are based on the [Can I Use] support table, +e.g. `last 3 iOS versions` might select `8.4, 9.2, 9.3` (mixed major and minor), +whereas `last 3 Chrome versions` might select `50, 49, 48` (major only). + +[two-letter country code]: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements +[custom usage data]: #custom-usage-data +[Can I Use]: http://caniuse.com/ + +## Browsers + +Names are case insensitive: + +### Major Browsers + +* `Chrome` for Google Chrome. +* `Firefox` or `ff` for Mozilla Firefox. +* `Explorer` or `ie` for Internet Explorer. +* `Edge` for Microsoft Edge. +* `iOS` or `ios_saf` for iOS Safari. +* `Opera` for Opera. +* `Safari` for desktop Safari. +* `ExplorerMobile` or `ie_mob` for Internet Explorer Mobile. + +### Others + +* `Android` for Android WebView. +* `BlackBerry` or `bb` for Blackberry browser. +* `ChromeAndroid` or `and_chr` for Chrome for Android + (in Other section, because mostly same as common `Chrome`). +* `FirefoxAndroid` or `and_ff` for Firefox for Android. +* `OperaMobile` or `op_mob` for Opera Mobile. +* `OperaMini` or `op_mini` for Opera Mini. +* `Samsung` for Samsung Internet. +* `UCAndroid` or `and_uc` for UC Browser for Android. +* `Electron` for Electron framework. It will be converted to Chrome version. + +### Electron + +[`electron-to-chromium`](https://www.npmjs.com/package/electron-to-chromium) +could return a compatible Browserslist query +for your (major) Electron version: + +```js +const e2c = require('electron-to-chromium') +autoprefixer({ + browsers: e2c.electronToBrowserList('1.4') //=> "Chrome >= 53" +}) +``` + +## Config File + +Browserslist config should be named `browserslist` and have browsers queries +split by a new line. Comments starts with `#` symbol: + +```yaml +# Browsers that we support + +> 1% +Last 2 versions +IE 8 # sorry +``` + +Browserslist will check config in every directory in `path`. +So, if tool process `app/styles/main.css`, you can put config to root, +`app/` or `app/styles`. + +You can specify direct path in `BROWSERSLIST_CONFIG` environment variables. + +## `package.json` + +If you want to reduce config files in project root, you can specify +browsers in `package.json` with `browserslist` key: + +```js +{ + "private": true, + "dependencies": { + "autoprefixer": "^6.5.4" + }, + "browserslist": [ + "> 1%", + "last 2 versions" + ] +} +``` + +## Environments + +You can also specify different browser queries for various environments. +Browserslist will choose query according to `BROWSERSLIST_ENV` or `NODE_ENV` +variables. If none of them is declared, Browserslist will firstly look +for `development` queries and then use defaults. + +In `package.json`: + +```js +{ + … + "browserslist": { + "production": [ + "last 2 version", + "ie 9" + ], + "development": [ + "last 1 version" + ] + } +} +``` + +In `browserslist` config: + +```ini +[production] +last 2 version +ie 9 + +[development] +last 1 version +``` + +## Environment Variables + +If some tool use Browserslist inside, you can change browsers settings +by [environment variables]: + +* `BROWSERSLIST` with browsers queries. + + ```sh + BROWSERSLIST="> 5%" gulp css + ``` + +* `BROWSERSLIST_CONFIG` with path to config file. + + ```sh + BROWSERSLIST_CONFIG=./config/browserslist gulp css + ``` + +* `BROWSERSLIST_ENV` with environments string. + + ```sh + BROWSERSLIST_ENV="development" gulp css + ``` + +* `BROWSERSLIST_STATS` with path to the custom usage data + for `> 1% in my stats` query. + + ```sh + BROWSERSLIST_STATS=./config/usage_data.json gulp css + ``` + +[environment variables]: https://en.wikipedia.org/wiki/Environment_variable + +## Custom Usage Data + +If you have a website, you can query against the usage statistics of your site: + +1. Import your Google Analytics data into [Can I Use]. + Press `Import…` button in Settings page. +2. Open browser DevTools on [Can I Use] and paste this snippet + into the browser console: + + ```js + var e=document.createElement('a');e.setAttribute('href', 'data:text/plain;charset=utf-8,'+encodeURIComponent(JSON.stringify(JSON.parse(localStorage['usage-data-by-id'])[localStorage['config-primary_usage']])));e.setAttribute('download','stats.json');document.body.appendChild(e);e.click();document.body.removeChild(e); + ``` +3. Save the data to a `browserslist-stats.json` file in your project. + +Of course, you can generate usage statistics file by any other method. +File format should be like: + +```js +{ + "ie": { + "6": 0.01, + "7": 0.4, + "8": 1.5 + }, + "chrome": { + … + }, + … +} +``` + +Note that you can query against your custom usage data +while also querying against global or regional data. +For example, the query `> 1% in my stats, > 5% in US, 10%` is permitted. + +[Can I Use]: http://caniuse.com/ + +## JS API + +```js +var browserslist = require('browserslist'); + +// Your CSS/JS build tool code +var process = function (source, opts) { + var browsers = browserslist(opts.browsers, { + stats: opts.stats, + path: opts.file, + env: opts.env + }); + // Your code to add features for selected browsers +} +``` + +Queries can be a string `"> 5%, last 1 version"` +or an array `['> 5%', 'last 1 version']`. + +If a query is missing, Browserslist will look for a config file. +You can provide a `path` option (that can be a file) to find the config file +relatively to it. + +For non-JS environment and debug purpose you can use CLI tool: + +```sh +browserslist "> 1%, last 2 versions" +``` + +## Coverage + +You can get total users coverage for selected browsers by JS API: + +```js +browserslist.coverage(browserslist('> 1%')) //=> 81.4 +``` + +```js +browserslist.coverage(browserslist('> 1% in US'), 'US') //=> 83.1 +``` + +Or by CLI: + +```sh +$ browserslist --coverage "> 1%" +These browsers account for 81.4% of all users globally +``` + +```sh +$ browserslist --coverage=US "> 1% in US" +These browsers account for 83.1% of all users in the US +``` diff --git a/node_modules/oldie/node_modules/browserslist/cli.js b/node_modules/oldie/node_modules/browserslist/cli.js new file mode 100755 index 00000000..c0848b20 --- /dev/null +++ b/node_modules/oldie/node_modules/browserslist/cli.js @@ -0,0 +1,95 @@ +#!/usr/bin/env node + +var browserslist = require('./'); +var pkg = require('./package.json'); +var args = process.argv.slice(2); + +function isArg(arg) { + return args.some(function (str) { + return str === arg || str.indexOf(arg + '=') === 0; + }); +} + +function getArgValue(arg) { + var found = args.filter(function (str) { + return str.indexOf(arg + '=') === 0; + })[0]; + var value = found && found.split('=')[1]; + return value && value.replace(/^['"]|['"]$/g, ''); +} + +function error(msg) { + process.stderr.write(pkg.name + ': ' + msg + '\n'); + process.exit(1); +} + +function query(queries, opts) { + try { + return browserslist(queries, opts); + } catch (e) { + if ( e.name === 'BrowserslistError' ) { + return error(e.message); + } else { + throw e; + } + } +} + +if ( args.length === 0 || isArg('--help') || isArg('-h') ) { + process.stdout.write([ + pkg.description, + '', + 'Usage:', + ' ' + pkg.name + ' "QUERIES"', + ' ' + pkg.name + ' --coverage "QUERIES"', + ' ' + pkg.name + ' --coverage=US "QUERIES"', + ' ' + pkg.name + ' --config=browserslist "path/to/browserlist/file"', + ' ' + pkg.name + ' --env="environment name defined in config"', + ' ' + pkg.name + ' --stats="path/to/browserlist/stats/file"' + ].join('\n') + '\n'); + +} else if ( isArg('--version') || isArg('-v') ) { + process.stdout.write(pkg.name + ' ' + pkg.version + '\n'); + +} else if ( isArg('--coverage') || isArg('-c') ) { + var browsers = args.find(function (i) { + return i[0] !== '-'; + }); + if ( !browsers ) error('Define a browsers query to get coverage'); + + var country = getArgValue('--coverage') || getArgValue('-c'); + var result = browserslist.coverage(query(browsers), country); + var round = Math.round(result * 100) / 100.0; + + var end = 'globally'; + if (country && country !== 'global') { + end = 'in the ' + country.toUpperCase(); + } + + process.stdout.write( + 'These browsers account for ' + round + '% of all users ' + end + '\n'); + +} else if ( args.length === 1 && args[0][0] !== '-' ) { + query(args[0]).forEach(function (browser) { + process.stdout.write(browser + '\n'); + }); + +} else if (isArg('--config') || isArg('-b')) { + var opts = { + config: getArgValue('--config') || getArgValue('-b') + }; + + if (isArg('--env') || isArg('-e')) { + opts.env = getArgValue('--env') || getArgValue('-e'); + } + + if (isArg('--stats') || isArg('-s')) { + opts.stats = getArgValue('--stats') || getArgValue('-s'); + } + + query(null, opts).forEach(function (browser) { + process.stdout.write(browser + '\n'); + }); +} else { + error('Unknown arguments. Use --help to pick right one.'); +} diff --git a/node_modules/oldie/node_modules/browserslist/index.js b/node_modules/oldie/node_modules/browserslist/index.js new file mode 100644 index 00000000..40623b03 --- /dev/null +++ b/node_modules/oldie/node_modules/browserslist/index.js @@ -0,0 +1,648 @@ +var path = require('path'); +var e2c = require('electron-to-chromium/versions'); +var fs = require('fs'); + +var caniuse = require('caniuse-db/data.json').agents; + +function normalize(versions) { + return versions.filter(function (version) { + return typeof version === 'string'; + }); +} + +var FLOAT_RANGE = /^\d+(\.\d+)?(-\d+(\.\d+)?)*$/; +var IS_SECTION = /^\s*\[(.+)\]\s*$/; + +function uniq(array) { + var filtered = []; + for ( var i = 0; i < array.length; i++ ) { + if ( filtered.indexOf(array[i]) === -1 ) filtered.push(array[i]); + } + return filtered; +} + +function BrowserslistError(message) { + this.name = 'BrowserslistError'; + this.message = message || ''; + this.browserslist = true; + if ( Error.captureStackTrace ) { + Error.captureStackTrace(this, BrowserslistError); + } +} +BrowserslistError.prototype = Error.prototype; + +// Helpers + +function error(name) { + throw new BrowserslistError(name); +} + +function fillUsage(result, name, data) { + for ( var i in data ) { + result[name + ' ' + i] = data[i]; + } +} + +function isFile(file) { + return fs.existsSync(file) && fs.statSync(file).isFile(); +} + +function eachParent(file, callback) { + if ( !fs.readFileSync || !fs.existsSync || !fs.statSync ) { + /* istanbul ignore next */ + return undefined; + } + + if ( file === false ) return undefined; + if ( typeof file === 'undefined' ) file = '.'; + var loc = path.resolve(file); + do { + var result = callback(loc); + if (typeof result !== 'undefined') return result; + } while (loc !== (loc = path.dirname(loc))); + return undefined; +} + +function getStat(opts) { + if ( opts.stats ) { + return opts.stats; + } else if ( process.env.BROWSERSLIST_STATS ) { + return process.env.BROWSERSLIST_STATS; + } else { + return eachParent(opts.path, function (dir) { + var file = path.join(dir, 'browserslist-stats.json'); + if ( isFile(file) ) { + return file; + } + }); + } +} + +function parsePackage(file) { + var config = JSON.parse(fs.readFileSync(file)).browserslist; + if ( typeof config === 'object' && config.length ) { + config = { defaults: config }; + } + return config; +} + +function pickEnv(config, opts) { + if ( typeof config !== 'object' ) return config; + + var env; + if ( typeof opts.env === 'string' ) { + env = opts.env; + } else if ( typeof process.env.BROWSERSLIST_ENV === 'string' ) { + env = process.env.BROWSERSLIST_ENV; + } else if ( typeof process.env.NODE_ENV === 'string' ) { + env = process.env.NODE_ENV; + } else { + env = 'development'; + } + + return config[env] || config.defaults; +} + +function generateFilter(sign, version) { + version = parseFloat(version); + if ( sign === '>' ) { + return function (v) { + return parseFloat(v) > version; + }; + } else if ( sign === '>=' ) { + return function (v) { + return parseFloat(v) >= version; + }; + } else if ( sign === '<' ) { + return function (v) { + return parseFloat(v) < version; + }; + } else if ( sign === '<=' ) { + return function (v) { + return parseFloat(v) <= version; + }; + } +} + +function compareStrings(a, b) { + if (a < b) return -1; + if (a > b) return +1; + return 0; +} + +/** + * Return array of browsers by selection queries. + * + * @param {string[]} queries Browser queries. + * @param {object} opts Options. + * @param {string} [opts.path="."] Path to processed file. + * It will be used to find config files. + * @param {string} [opts.env="development"] Processing environment. + * It will be used to take right + * queries from config file. + * @param {string} [opts.config] Path to config file with queries. + * @param {object} [opts.stats] Custom browser usage statistics + * for "> 1% in my stats" query. + * @return {string[]} Array with browser names in Can I Use. + * + * @example + * browserslist('IE >= 10, IE 8') //=> ['ie 11', 'ie 10', 'ie 8'] + */ +var browserslist = function (queries, opts) { + if ( typeof opts === 'undefined' ) opts = { }; + + if ( typeof queries === 'undefined' || queries === null ) { + if ( process.env.BROWSERSLIST ) { + queries = process.env.BROWSERSLIST; + } else if ( opts.config || process.env.BROWSERSLIST_CONFIG ) { + var file = opts.config || process.env.BROWSERSLIST_CONFIG; + queries = pickEnv(browserslist.readConfig(file), opts); + } else { + queries = pickEnv(browserslist.findConfig(opts.path), opts); + } + } + + if ( typeof queries === 'undefined' || queries === null ) { + queries = browserslist.defaults; + } + + if ( typeof queries === 'string' ) { + queries = queries.split(/,\s*/); + } + + var context = { }; + + var stats = getStat(opts); + if ( stats ) { + if ( typeof stats === 'string' ) { + try { + stats = JSON.parse(fs.readFileSync(stats)); + } catch (e) { + error('Can\'t read ' + stats); + } + } + if ( 'dataByBrowser' in stats ) { + stats = stats.dataByBrowser; + } + + context.customUsage = { }; + for ( var browser in stats ) { + fillUsage(context.customUsage, browser, stats[browser]); + } + } + + var result = []; + + queries.forEach(function (selection) { + if ( selection.trim() === '' ) return; + + var exclude = selection.indexOf('not ') === 0; + if ( exclude ) selection = selection.slice(4); + + for ( var i in browserslist.queries ) { + var type = browserslist.queries[i]; + var match = selection.match(type.regexp); + if ( match ) { + var args = [context].concat(match.slice(1)); + var array = type.select.apply(browserslist, args); + if ( exclude ) { + array = array.concat(array.map(function (j) { + return j.replace(/\s\d+/, ' 0'); + })); + result = result.filter(function (j) { + return array.indexOf(j) === -1; + }); + } else { + result = result.concat(array); + } + return; + } + } + + error('Unknown browser query `' + selection + '`'); + }); + result = result.map(function (i) { + var parts = i.split(' '); + var name = parts[0]; + var version = parts[1]; + if ( version === '0' ) { + return name + ' ' + browserslist.byName(name).versions[0]; + } else { + return i; + } + }).sort(function (name1, name2) { + name1 = name1.split(' '); + name2 = name2.split(' '); + if ( name1[0] === name2[0] ) { + if ( FLOAT_RANGE.test(name1[1]) && FLOAT_RANGE.test(name2[1]) ) { + return parseFloat(name2[1]) - parseFloat(name1[1]); + } else { + return compareStrings(name2[1], name1[1]); + } + } else { + return compareStrings(name1[0], name2[0]); + } + }); + + return uniq(result); +}; + +var normalizeVersion = function (data, version) { + if ( data.versions.indexOf(version) !== -1 ) { + return version; + } else if ( browserslist.versionAliases[data.name][version] ) { + return browserslist.versionAliases[data.name][version]; + } else if ( data.versions.length === 1 ) { + return data.versions[0]; + } +}; + +var loadCountryStatistics = function (country) { + if ( !browserslist.usage[country] ) { + var usage = { }; + var data = require( + 'caniuse-db/region-usage-json/' + country + '.json'); + for ( var i in data.data ) { + fillUsage(usage, i, data.data[i]); + } + browserslist.usage[country] = usage; + } +}; + +// Will be filled by Can I Use data below +browserslist.data = { }; +browserslist.usage = { + global: { }, + custom: null +}; + +// Default browsers query +browserslist.defaults = [ + '> 1%', + 'last 2 versions', + 'Firefox ESR' +]; + +// What browsers will be used in `last n version` query +browserslist.major = [ + 'safari', 'opera', 'ios_saf', 'ie_mob', 'ie', 'edge', 'firefox', 'chrome' +]; + +// Browser names aliases +browserslist.aliases = { + fx: 'firefox', + ff: 'firefox', + ios: 'ios_saf', + explorer: 'ie', + blackberry: 'bb', + explorermobile: 'ie_mob', + operamini: 'op_mini', + operamobile: 'op_mob', + chromeandroid: 'and_chr', + firefoxandroid: 'and_ff', + ucandroid: 'and_uc' +}; + +// Aliases to work with joined versions like `ios_saf 7.0-7.1` +browserslist.versionAliases = { }; + +// Get browser data by alias or case insensitive name +browserslist.byName = function (name) { + name = name.toLowerCase(); + name = browserslist.aliases[name] || name; + return browserslist.data[name]; +}; + +// Get browser data by alias or case insensitive name and throw error +// on unknown browser +browserslist.checkName = function (name) { + var data = browserslist.byName(name); + if ( !data ) error('Unknown browser ' + name); + return data; +}; + +// Read and parse config +browserslist.readConfig = function (file) { + if ( !fs.existsSync(file) || !fs.statSync(file).isFile() ) { + error('Can\'t read ' + file + ' config'); + } + return browserslist.parseConfig(fs.readFileSync(file)); +}; + +// Find config, read file and parse it +browserslist.findConfig = function (from) { + return eachParent(from, function (dir) { + var config = path.join(dir, 'browserslist'); + var pkg = path.join(dir, 'package.json'); + + var pkgBrowserslist; + if ( isFile(pkg) ) { + try { + pkgBrowserslist = parsePackage(pkg); + } catch (e) { + console.warn( + '[Browserslist] Could not parse ' + pkg + '. ' + + 'Ignoring it.'); + } + } + + if ( isFile(config) && pkgBrowserslist ) { + error( + dir + ' contains both browserslist ' + + 'and package.json with browsers'); + } else if ( isFile(config) ) { + return browserslist.readConfig(config); + } else if ( pkgBrowserslist ) { + return pkgBrowserslist; + } + }); +}; + +/** + * Return browsers market coverage. + * + * @param {string[]} browsers Browsers names in Can I Use. + * @param {string} [country="global"] Which country statistics should be used. + * + * @return {number} Total market coverage for all selected browsers. + * + * @example + * browserslist.coverage(browserslist('> 1% in US'), 'US') //=> 83.1 + */ +browserslist.coverage = function (browsers, country) { + if ( country && country !== 'global') { + country = country.toUpperCase(); + loadCountryStatistics(country); + } else { + country = 'global'; + } + + return browsers.reduce(function (all, i) { + var usage = browserslist.usage[country][i]; + if ( usage === undefined ) { + usage = browserslist.usage[country][i.replace(/ [\d.]+$/, ' 0')]; + } + return all + (usage || 0); + }, 0); +}; + +// Return array of queries from config content +browserslist.parseConfig = function (string) { + var result = { defaults: [] }; + var section = 'defaults'; + + string.toString() + .replace(/#[^\n]*/g, '') + .split(/\n/) + .map(function (line) { + return line.trim(); + }) + .filter(function (line) { + return line !== ''; + }) + .forEach(function (line) { + if ( IS_SECTION.test(line) ) { + section = line.match(IS_SECTION)[1].trim(); + result[section] = result[section] || []; + } else { + result[section].push(line); + } + }); + + return result; +}; + +browserslist.queries = { + + lastVersions: { + regexp: /^last\s+(\d+)\s+versions?$/i, + select: function (context, versions) { + var selected = []; + browserslist.major.forEach(function (name) { + var data = browserslist.byName(name); + if ( !data ) return; + var array = data.released.slice(-versions); + + array = array.map(function (v) { + return data.name + ' ' + v; + }); + selected = selected.concat(array); + }); + return selected; + } + }, + + lastByBrowser: { + regexp: /^last\s+(\d+)\s+(\w+)\s+versions?$/i, + select: function (context, versions, name) { + var data = browserslist.checkName(name); + return data.released.slice(-versions).map(function (v) { + return data.name + ' ' + v; + }); + } + }, + + globalStatistics: { + regexp: /^>\s*(\d*\.?\d+)%$/, + select: function (context, popularity) { + popularity = parseFloat(popularity); + var result = []; + + for ( var version in browserslist.usage.global ) { + if ( browserslist.usage.global[version] > popularity ) { + result.push(version); + } + } + + return result; + } + }, + + customStatistics: { + regexp: /^>\s*(\d*\.?\d+)%\s+in\s+my\s+stats$/, + select: function (context, popularity) { + popularity = parseFloat(popularity); + var result = []; + + if ( !context.customUsage ) { + error('Custom usage statistics was not provided'); + } + + for ( var version in context.customUsage ) { + if ( context.customUsage[version] > popularity ) { + result.push(version); + } + } + + return result; + } + }, + + countryStatistics: { + regexp: /^>\s*(\d*\.?\d+)%\s+in\s+(\w\w)$/, + select: function (context, popularity, country) { + popularity = parseFloat(popularity); + country = country.toUpperCase(); + var result = []; + + loadCountryStatistics(country); + var usage = browserslist.usage[country]; + + for ( var version in usage ) { + if ( usage[version] > popularity ) { + result.push(version); + } + } + + return result; + } + }, + + electronRange: { + regexp: /^electron\s+([\d\.]+)\s*-\s*([\d\.]+)$/i, + select: function (context, from, to) { + if ( !e2c[from] ) error('Unknown version ' + from + ' of electron'); + if ( !e2c[to] ) error('Unknown version ' + to + ' of electron'); + + from = parseFloat(from); + to = parseFloat(to); + + return Object.keys(e2c).filter(function (i) { + var parsed = parseFloat(i); + return parsed >= from && parsed <= to; + }).map(function (i) { + return 'chrome ' + e2c[i]; + }); + } + }, + + range: { + regexp: /^(\w+)\s+([\d\.]+)\s*-\s*([\d\.]+)$/i, + select: function (context, name, from, to) { + var data = browserslist.checkName(name); + from = parseFloat(normalizeVersion(data, from) || from); + to = parseFloat(normalizeVersion(data, to) || to); + + var filter = function (v) { + var parsed = parseFloat(v); + return parsed >= from && parsed <= to; + }; + + return data.released.filter(filter).map(function (v) { + return data.name + ' ' + v; + }); + } + }, + + electronVersions: { + regexp: /^electron\s*(>=?|<=?)\s*([\d\.]+)$/i, + select: function (context, sign, version) { + return Object.keys(e2c) + .filter(generateFilter(sign, version)) + .map(function (i) { + return 'chrome ' + e2c[i]; + }); + } + }, + + versions: { + regexp: /^(\w+)\s*(>=?|<=?)\s*([\d\.]+)$/, + select: function (context, name, sign, version) { + var data = browserslist.checkName(name); + var alias = normalizeVersion(data, version); + if ( alias ) { + version = alias; + } + return data.released + .filter(generateFilter(sign, version)) + .map(function (v) { + return data.name + ' ' + v; + }); + } + }, + + esr: { + regexp: /^(firefox|ff|fx)\s+esr$/i, + select: function () { + return ['firefox 52']; + } + }, + + opMini: { + regexp: /(operamini|op_mini)\s+all/i, + select: function () { + return ['op_mini all']; + } + }, + + electron: { + regexp: /^electron\s+([\d\.]+)$/i, + select: function (context, version) { + var chrome = e2c[version]; + if ( !chrome ) error('Unknown version ' + version + ' of electron'); + return ['chrome ' + chrome]; + } + }, + + direct: { + regexp: /^(\w+)\s+(tp|[\d\.]+)$/i, + select: function (context, name, version) { + if ( /tp/i.test(version) ) version = 'TP'; + var data = browserslist.checkName(name); + var alias = normalizeVersion(data, version); + if ( alias ) { + version = alias; + } else { + if ( version.indexOf('.') === -1 ) { + alias = version + '.0'; + } else if ( /\.0$/.test(version) ) { + alias = version.replace(/\.0$/, ''); + } + alias = normalizeVersion(data, alias); + if ( alias ) { + version = alias; + } else { + error('Unknown version ' + version + ' of ' + name); + } + } + return [data.name + ' ' + version]; + } + }, + + defaults: { + regexp: /^defaults$/i, + select: function () { + return browserslist(browserslist.defaults); + } + } + +}; + +// Get and convert Can I Use data + +(function () { + for ( var name in caniuse ) { + var browser = caniuse[name]; + browserslist.data[name] = { + name: name, + versions: normalize(caniuse[name].versions), + released: normalize(caniuse[name].versions.slice(0, -3)) + }; + fillUsage(browserslist.usage.global, name, browser.usage_global); + + browserslist.versionAliases[name] = { }; + for ( var i = 0; i < browser.versions.length; i++ ) { + var full = browser.versions[i]; + if (!full) continue; + + if ( full.indexOf('-') !== -1 ) { + var interval = full.split('-'); + for ( var j = 0; j < interval.length; j++ ) { + browserslist.versionAliases[name][interval[j]] = full; + } + } + } + } +}()); + +module.exports = browserslist; diff --git a/node_modules/oldie/node_modules/browserslist/package.json b/node_modules/oldie/node_modules/browserslist/package.json new file mode 100644 index 00000000..56d7529a --- /dev/null +++ b/node_modules/oldie/node_modules/browserslist/package.json @@ -0,0 +1,54 @@ +{ + "name": "browserslist", + "version": "1.7.7", + "description": "Share browsers list between different front-end tools, like Autoprefixer, Stylelint and babel-env-preset", + "keywords": [ + "caniuse", + "browsers" + ], + "author": "Andrey Sitnik ", + "license": "MIT", + "repository": "ai/browserslist", + "dependencies": { + "caniuse-db": "^1.0.30000639", + "electron-to-chromium": "^1.2.7" + }, + "bin": "./cli.js", + "devDependencies": { + "eslint": "^3.18.0", + "eslint-config-postcss": "^2.0.2", + "jest": "^19.0.2", + "lint-staged": "^3.4.0", + "pre-commit": "^1.1.3", + "yaspeller-ci": "^0.3.0" + }, + "eslintConfig": { + "extends": "eslint-config-postcss/es5", + "env": { + "jest": true + }, + "rules": { + "consistent-return": "off", + "no-process-exit": "off", + "valid-jsdoc": "error" + } + }, + "jest": { + "coverageThreshold": { + "global": { + "statements": 100 + } + } + }, + "scripts": { + "lint-staged": "lint-staged", + "test": "jest --coverage && eslint *.js test/*.js && yaspeller-ci *.md" + }, + "lint-staged": { + "*.md": "yaspeller-ci", + "*.js": "eslint" + }, + "pre-commit": [ + "lint-staged" + ] +} diff --git a/node_modules/oldie/node_modules/chalk/index.js b/node_modules/oldie/node_modules/chalk/index.js new file mode 100644 index 00000000..2d85a917 --- /dev/null +++ b/node_modules/oldie/node_modules/chalk/index.js @@ -0,0 +1,116 @@ +'use strict'; +var escapeStringRegexp = require('escape-string-regexp'); +var ansiStyles = require('ansi-styles'); +var stripAnsi = require('strip-ansi'); +var hasAnsi = require('has-ansi'); +var supportsColor = require('supports-color'); +var defineProps = Object.defineProperties; +var isSimpleWindowsTerm = process.platform === 'win32' && !/^xterm/i.test(process.env.TERM); + +function Chalk(options) { + // detect mode if not set manually + this.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled; +} + +// use bright blue on Windows as the normal blue color is illegible +if (isSimpleWindowsTerm) { + ansiStyles.blue.open = '\u001b[94m'; +} + +var styles = (function () { + var ret = {}; + + Object.keys(ansiStyles).forEach(function (key) { + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + + ret[key] = { + get: function () { + return build.call(this, this._styles.concat(key)); + } + }; + }); + + return ret; +})(); + +var proto = defineProps(function chalk() {}, styles); + +function build(_styles) { + var builder = function () { + return applyStyle.apply(builder, arguments); + }; + + builder._styles = _styles; + builder.enabled = this.enabled; + // __proto__ is used because we must return a function, but there is + // no way to create a function with a different prototype. + /* eslint-disable no-proto */ + builder.__proto__ = proto; + + return builder; +} + +function applyStyle() { + // support varags, but simply cast to string in case there's only one arg + var args = arguments; + var argsLen = args.length; + var str = argsLen !== 0 && String(arguments[0]); + + if (argsLen > 1) { + // don't slice `arguments`, it prevents v8 optimizations + for (var a = 1; a < argsLen; a++) { + str += ' ' + args[a]; + } + } + + if (!this.enabled || !str) { + return str; + } + + var nestedStyles = this._styles; + var i = nestedStyles.length; + + // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, + // see https://github.com/chalk/chalk/issues/58 + // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. + var originalDim = ansiStyles.dim.open; + if (isSimpleWindowsTerm && (nestedStyles.indexOf('gray') !== -1 || nestedStyles.indexOf('grey') !== -1)) { + ansiStyles.dim.open = ''; + } + + while (i--) { + var code = ansiStyles[nestedStyles[i]]; + + // Replace any instances already present with a re-opening code + // otherwise only the part of the string until said closing code + // will be colored, and the rest will simply be 'plain'. + str = code.open + str.replace(code.closeRe, code.open) + code.close; + } + + // Reset the original 'dim' if we changed it to work around the Windows dimmed gray issue. + ansiStyles.dim.open = originalDim; + + return str; +} + +function init() { + var ret = {}; + + Object.keys(styles).forEach(function (name) { + ret[name] = { + get: function () { + return build.call(this, [name]); + } + }; + }); + + return ret; +} + +defineProps(Chalk.prototype, init()); + +module.exports = new Chalk(); +module.exports.styles = ansiStyles; +module.exports.hasColor = hasAnsi; +module.exports.stripColor = stripAnsi; +module.exports.supportsColor = supportsColor; diff --git a/node_modules/oldie/node_modules/chalk/license b/node_modules/oldie/node_modules/chalk/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/node_modules/oldie/node_modules/chalk/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (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. diff --git a/node_modules/oldie/node_modules/chalk/node_modules/supports-color/index.js b/node_modules/oldie/node_modules/chalk/node_modules/supports-color/index.js new file mode 100644 index 00000000..4346e272 --- /dev/null +++ b/node_modules/oldie/node_modules/chalk/node_modules/supports-color/index.js @@ -0,0 +1,50 @@ +'use strict'; +var argv = process.argv; + +var terminator = argv.indexOf('--'); +var hasFlag = function (flag) { + flag = '--' + flag; + var pos = argv.indexOf(flag); + return pos !== -1 && (terminator !== -1 ? pos < terminator : true); +}; + +module.exports = (function () { + if ('FORCE_COLOR' in process.env) { + return true; + } + + if (hasFlag('no-color') || + hasFlag('no-colors') || + hasFlag('color=false')) { + return false; + } + + if (hasFlag('color') || + hasFlag('colors') || + hasFlag('color=true') || + hasFlag('color=always')) { + return true; + } + + if (process.stdout && !process.stdout.isTTY) { + return false; + } + + if (process.platform === 'win32') { + return true; + } + + if ('COLORTERM' in process.env) { + return true; + } + + if (process.env.TERM === 'dumb') { + return false; + } + + if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) { + return true; + } + + return false; +})(); diff --git a/node_modules/oldie/node_modules/chalk/node_modules/supports-color/license b/node_modules/oldie/node_modules/chalk/node_modules/supports-color/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/node_modules/oldie/node_modules/chalk/node_modules/supports-color/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (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. diff --git a/node_modules/oldie/node_modules/chalk/node_modules/supports-color/package.json b/node_modules/oldie/node_modules/chalk/node_modules/supports-color/package.json new file mode 100644 index 00000000..3bb77ac1 --- /dev/null +++ b/node_modules/oldie/node_modules/chalk/node_modules/supports-color/package.json @@ -0,0 +1,49 @@ +{ + "name": "supports-color", + "version": "2.0.0", + "description": "Detect whether a terminal supports color", + "license": "MIT", + "repository": "chalk/supports-color", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "maintainers": [ + "Sindre Sorhus (sindresorhus.com)", + "Joshua Appelman (jbnicolai.com)" + ], + "engines": { + "node": ">=0.8.0" + }, + "scripts": { + "test": "mocha" + }, + "files": [ + "index.js" + ], + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "ansi", + "styles", + "tty", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "support", + "supports", + "capability", + "detect" + ], + "devDependencies": { + "mocha": "*", + "require-uncached": "^1.0.2" + } +} diff --git a/node_modules/oldie/node_modules/chalk/node_modules/supports-color/readme.md b/node_modules/oldie/node_modules/chalk/node_modules/supports-color/readme.md new file mode 100644 index 00000000..b4761f1e --- /dev/null +++ b/node_modules/oldie/node_modules/chalk/node_modules/supports-color/readme.md @@ -0,0 +1,36 @@ +# supports-color [![Build Status](https://travis-ci.org/chalk/supports-color.svg?branch=master)](https://travis-ci.org/chalk/supports-color) + +> Detect whether a terminal supports color + + +## Install + +``` +$ npm install --save supports-color +``` + + +## Usage + +```js +var supportsColor = require('supports-color'); + +if (supportsColor) { + console.log('Terminal supports color'); +} +``` + +It obeys the `--color` and `--no-color` CLI flags. + +For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`. + + +## Related + +- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/oldie/node_modules/chalk/package.json b/node_modules/oldie/node_modules/chalk/package.json new file mode 100644 index 00000000..2b5881e9 --- /dev/null +++ b/node_modules/oldie/node_modules/chalk/package.json @@ -0,0 +1,70 @@ +{ + "name": "chalk", + "version": "1.1.3", + "description": "Terminal string styling done right. Much color.", + "license": "MIT", + "repository": "chalk/chalk", + "maintainers": [ + "Sindre Sorhus (sindresorhus.com)", + "Joshua Appelman (jbnicolai.com)", + "JD Ballard (github.com/qix-)" + ], + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && mocha", + "bench": "matcha benchmark.js", + "coverage": "nyc npm test && nyc report", + "coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls" + }, + "files": [ + "index.js" + ], + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "str", + "ansi", + "style", + "styles", + "tty", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "devDependencies": { + "coveralls": "^2.11.2", + "matcha": "^0.6.0", + "mocha": "*", + "nyc": "^3.0.0", + "require-uncached": "^1.0.2", + "resolve-from": "^1.0.0", + "semver": "^4.3.3", + "xo": "*" + }, + "xo": { + "envs": [ + "node", + "mocha" + ] + } +} diff --git a/node_modules/oldie/node_modules/chalk/readme.md b/node_modules/oldie/node_modules/chalk/readme.md new file mode 100644 index 00000000..5cf111e3 --- /dev/null +++ b/node_modules/oldie/node_modules/chalk/readme.md @@ -0,0 +1,213 @@ +

+
+
+ chalk +
+
+
+

+ +> Terminal string styling done right + +[![Build Status](https://travis-ci.org/chalk/chalk.svg?branch=master)](https://travis-ci.org/chalk/chalk) +[![Coverage Status](https://coveralls.io/repos/chalk/chalk/badge.svg?branch=master)](https://coveralls.io/r/chalk/chalk?branch=master) +[![](http://img.shields.io/badge/unicorn-approved-ff69b4.svg)](https://www.youtube.com/watch?v=9auOCbH5Ns4) + + +[colors.js](https://github.com/Marak/colors.js) used to be 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.** + +![](https://github.com/chalk/ansi-styles/raw/master/screenshot.png) + + +## Why + +- Highly performant +- Doesn't extend `String.prototype` +- Expressive API +- Ability to nest styles +- Clean and focused +- Auto-detects color support +- Actively maintained +- [Used by ~4500 modules](https://www.npmjs.com/browse/depended/chalk) as of July 15, 2015 + + +## Install + +``` +$ npm install --save chalk +``` + + +## Usage + +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 +chalk.blue('Hello world!'); + +// combine styled and normal strings +chalk.blue('Hello') + 'World' + chalk.red('!'); + +// compose multiple styles using the chainable API +chalk.blue.bgRed.bold('Hello world!'); + +// pass in multiple arguments +chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz'); + +// nest styles +chalk.red('Hello', chalk.underline.bgBlue('world') + '!'); + +// nest styles of the same type even (color, underline, background) +chalk.green( + 'I am a green line ' + + chalk.blue.underline.bold('with a blue substring') + + ' that becomes green again!' +); +``` + +Easily define your own themes. + +```js +var chalk = require('chalk'); +var error = chalk.bold.red; +console.log(error('Error!')); +``` + +Take advantage of console.log [string substitution](http://nodejs.org/docs/latest/api/console.html#console_console_log_data). + +```js +var name = 'Sindre'; +console.log(chalk.green('Hello %s'), name); +//=> Hello Sindre +``` + + +## API + +### chalk.`