-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c64c79e
Showing
13 changed files
with
551 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.husky/* linguist-detectable=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-deploy: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
|
||
- run: npm install | ||
- run: npm run build | ||
- run: npm run type-check | ||
- run: npm run coverage | ||
|
||
- name: Converts Markdown to HTML | ||
uses: jaywcjlove/markdown-to-html-cli@main | ||
with: | ||
output: coverage/index.html | ||
github-corners: https://github.com/jaywcjlove/colors-named | ||
favicon: data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🎨</text></svg> | ||
|
||
- name: Create Coverage Badges | ||
uses: jaywcjlove/coverage-badges-cli@main | ||
with: | ||
source: coverage/coverage-summary.json | ||
output: coverage/badges.svg | ||
|
||
- name: Generate Contributors Images | ||
uses: jaywcjlove/github-action-contributors@main | ||
with: | ||
filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\]) | ||
output: coverage/CONTRIBUTORS.svg | ||
avatarSize: 42 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
build | ||
dist | ||
lib | ||
cjs | ||
esm | ||
node_modules | ||
coverage | ||
npm-debug.log* | ||
package-lock.json | ||
|
||
.eslintcache | ||
.DS_Store | ||
.cache | ||
.rdoc-dist | ||
|
||
*.log | ||
*.bak | ||
*.tem | ||
*.temp | ||
#.swp | ||
*.*~ | ||
~*.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx --no-install lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
**/*.md | ||
package.json | ||
package-lock.json | ||
node_modules | ||
dist | ||
build | ||
coverage | ||
lib | ||
test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"printWidth": 120, | ||
"overrides": [ | ||
{ | ||
"files": ".prettierrc", | ||
"options": { "parser": "json" } | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 Kenny Wang<[email protected]> | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
colors-named | ||
=== | ||
|
||
[![Build & Deploy](https://github.com/jaywcjlove/colors-named/actions/workflows/ci.yml/badge.svg)](https://github.com/jaywcjlove/colors-named/actions/workflows/ci.yml) | ||
[![Open in unpkg](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/colors-named/file/README.md) | ||
[![npm version](https://img.shields.io/npm/v/colors-named.svg)](https://www.npmjs.com/package/colors-named) | ||
[![Coverage Status](https://jaywcjlove.github.io/colors-named/badges.svg)](https://jaywcjlove.github.io/colors-named/lcov-report/) | ||
|
||
A array with color names. Based on https://www.w3.org/TR/css-color-4/#named-colors | ||
|
||
## Installation | ||
|
||
This package is [ESM only](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c): Node 12+ is needed to use it and it must be import instead of require. | ||
|
||
```bash | ||
npm install colors-named | ||
``` | ||
|
||
If you still want to use in CommonJS, you can use dynamic `import()` to load. | ||
|
||
```js | ||
const named = await import('colors-named'); | ||
|
||
// Fix compiling in typescript. | ||
// https://github.com/microsoft/TypeScript/issues/43329#issuecomment-922544562 | ||
const named = await (Function('return import("colors-named")')()) as Promise<typeof import("colors-named")>; | ||
``` | ||
|
||
## Usage | ||
|
||
```js | ||
import named from "colors-named"; | ||
|
||
console.log(named) // => ['aliceblue', 'antiquewhite', 'aqua', ... ] | ||
console.log(named.includes('red')) // => true | ||
console.log(named.length) // => 148 | ||
``` | ||
|
||
## API | ||
|
||
```ts | ||
/** | ||
* A array with color names. Based on https://www.w3.org/TR/css-color-4/#named-colors | ||
*/ | ||
declare const names: readonly ["aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige", "bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown", "burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue", "cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod", "darkgray", "darkgreen", "darkgrey", "darkkhaki", "darkmagenta", "darkolivegreen", "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen", "darkslateblue", "darkslategray", "darkslategrey", "darkturquoise", "darkviolet", "deeppink", "deepskyblue", "dimgray", "dimgrey", "dodgerblue", "firebrick", "floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite", "gold", "goldenrod", "gray", "green", "greenyellow", "grey", "honeydew", "hotpink", "indianred", "indigo", "ivory", "khaki", "lavender", "lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral", "lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightgrey", "lightpink", "lightsalmon", "lightseagreen", "lightskyblue", "lightslategray", "lightslategrey", "lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta", "maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple", "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise", "mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin", "navajowhite", "navy", "oldlace", "olive", "olivedrab", "orange", "orangered", "orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred", "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue", "purple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown", "salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue", "slateblue", "slategray", "slategrey", "snow", "springgreen", "steelblue", "tan", "teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white", "whitesmoke", "yellow", "yellowgreen"]; | ||
export default names; | ||
``` | ||
|
||
## Contributors | ||
|
||
As always, thanks to our amazing contributors! | ||
|
||
<a href="https://github.com/jaywcjlove/colors-named/graphs/contributors"> | ||
<img src="https://jaywcjlove.github.io/colors-named/CONTRIBUTORS.svg" /> | ||
</a> | ||
|
||
Made with [action-contributors](https://github.com/jaywcjlove/github-action-contributors). | ||
|
||
## License | ||
|
||
Licensed under the MIT License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"name": "colors-named", | ||
"version": "0.0.1", | ||
"description": "A array with color names.", | ||
"type": "module", | ||
"types": "./lib/index.d.ts", | ||
"exports": "./lib/index.js", | ||
"homepage": "https://jaywcjlove.github.io/colors-named/", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/jaywcjlove/colors-named" | ||
}, | ||
"scripts": { | ||
"prepack": "husky install && npm run build", | ||
"start": "tsbb watch --disable-babel", | ||
"build": "tsbb build --disable-babel", | ||
"type-check": "tsc --noEmit", | ||
"test": "tsbb test", | ||
"coverage": "tsbb test --coverage", | ||
"prettier": "prettier --write \"**/*.{js,ts,json}\"" | ||
}, | ||
"keywords": [ | ||
"color", | ||
"colors", | ||
"colors-named", | ||
"named-colors", | ||
"named" | ||
], | ||
"author": "Kenny Wang<[email protected]>", | ||
"license": "MIT", | ||
"files": [ | ||
"src/index.ts", | ||
"lib" | ||
], | ||
"engines": { | ||
"node": ">=14.16" | ||
}, | ||
"lint-staged": { | ||
"*.{js,ts,json}": "prettier --write" | ||
}, | ||
"devDependencies": { | ||
"husky": "^8.0.1", | ||
"lint-staged": "^13.0.3", | ||
"prettier": "^2.7.1", | ||
"tsbb": "~3.7.6" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": ["config:base"], | ||
"packageRules": [ | ||
{ | ||
"matchPackagePatterns": ["*"], | ||
"rangeStrategy": "replace" | ||
} | ||
] | ||
} |
Oops, something went wrong.