tailwindcss-custom-colors 1.0.7 → 1.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2023 Quentin Juarez
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Quentin Juarez
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,173 +1,173 @@
1
- ## Installation
2
-
3
- ```bash
4
- # With npm
5
- npm i tailwindcss-custom-colors@latest
6
-
7
- # With yarn
8
- yarn add tailwindcss-custom-colors@latest
9
- ```
10
-
11
- [![npm version](https://badge.fury.io/js/tailwindcss-custom-colors.svg)](https://badge.fury.io/js/tailwindcss-custom-colors)
12
-
13
- <!-- ![NPM](https://img.shields.io/npm/l/tailwindcss-custom-colors)
14
- ![GitHub Repo stars](https://img.shields.io/github/stars/ibodev1/tailwindcss-custom-colors?style=social)
15
- ![node-current](https://img.shields.io/node/v/tailwindcss-custom-colors)
16
- ![GitHub last commit](https://img.shields.io/github/last-commit/ibodev1/tailwindcss-custom-colors)
17
- ![npm](https://img.shields.io/npm/dw/tailwindcss-custom-colors)
18
- ![GitHub top language](https://img.shields.io/github/languages/top/ibodev1/tailwindcss-custom-colors) -->
19
-
20
- ## Usage
21
-
22
- ### Import
23
-
24
- ```js
25
- import { generateConfig } from "tailwindcss-custom-colors";
26
- ```
27
-
28
- ```js
29
- import { generateStyleVariables } from "tailwindcss-custom-colors";
30
- ```
31
-
32
- ### generateConfig()
33
-
34
- ```js
35
- const extendedColors = generateConfig(colorNames, options);
36
- ```
37
-
38
- #### The generateConfig function takes the following parameters:
39
-
40
- - `colorNames`: An array of color names or a single color name.
41
- - `options` (optional): An object of options that allows you to customize the generated colors. The available options are `suffixMultiplier` (default: `100`), which determines the suffix used to generate variables names (e.g `[1, 10, 100]`) and `variablePrefix` (default: `undefined`), which determines the prefix for the css variable name, none by default.
42
-
43
- The function returns a config object for Tailwind CSS with the specified color names and their respective tints.
44
-
45
- ### generateStyleVariables()
46
-
47
- ```js
48
- const variables = generateStyleVariables(colorParams, options);
49
- ```
50
-
51
- #### The generateStyleVariables function takes the following parameters:
52
-
53
- - `colorParams`: An array of color params or a single color params including a color (hex) and a name.
54
- - `options` (optional): An object of options that allows you to customize the generated colors. The available options are `suffixMultiplier` (default: `100`), which determines the suffix used to generate variables names (e.g `[1, 10, 100]`) and `variablePrefix` (default: `undefined`), which determines the prefix for the css variable name, none by default.
55
-
56
- ## Example
57
-
58
- Extend your tailwind config
59
-
60
- _tailwind.config.js_
61
-
62
- ```js
63
- /** @type {import('tailwindcss').Config} */
64
- import { generateConfig } from "tailwindcss-custom-colors";
65
-
66
- const extendedColors = generateConfig(["primary", "secondary"]);
67
-
68
- module.exports = {
69
- content: ["./src/**/*.{index,vue,js,ts,jsx,tsx}"],
70
- theme: {
71
- extend: {
72
- colors: extendedColors,
73
- },
74
- },
75
- plugins: [],
76
- };
77
- ```
78
-
79
- #### Output for `extendedColors`:
80
-
81
- ```json
82
- {
83
- "primary": {
84
- "100": "rgb(var(--primary-100) / <alpha-value>)",
85
- "200": "rgb(var(--primary-200) / <alpha-value>)",
86
- "300": "rgb(var(--primary-300) / <alpha-value>)",
87
- "400": "rgb(var(--primary-400) / <alpha-value>)",
88
- "500": "rgb(var(--primary-500) / <alpha-value>)",
89
- "600": "rgb(var(--primary-600) / <alpha-value>)",
90
- "700": "rgb(var(--primary-700) / <alpha-value>)",
91
- "800": "rgb(var(--primary-800) / <alpha-value>)",
92
- "900": "rgb(var(--primary-900) / <alpha-value>)",
93
- "DEFAULT": "rgb(var(--primary) / <alpha-value>)",
94
- "contrast": "rgb(var(--primary-contrast) / <alpha-value>)",
95
- "complement": "rgb(var(--primary-complement) / <alpha-value>)"
96
- },
97
- "secondary": {
98
- "100": "rgb(var(--secondary-100) / <alpha-value>)",
99
- "200": "rgb(var(--secondary-200) / <alpha-value>)",
100
- "300": "rgb(var(--secondary-300) / <alpha-value>)",
101
- "400": "rgb(var(--secondary-400) / <alpha-value>)",
102
- "500": "rgb(var(--secondary-500) / <alpha-value>)",
103
- "600": "rgb(var(--secondary-600) / <alpha-value>)",
104
- "700": "rgb(var(--secondary-700) / <alpha-value>)",
105
- "800": "rgb(var(--secondary-800) / <alpha-value>)",
106
- "900": "rgb(var(--secondary-900) / <alpha-value>)",
107
- "DEFAULT": "rgb(var(--secondary) / <alpha-value>)",
108
- "contrast": "rgb(var(--secondary-contrast) / <alpha-value>)",
109
- "complement": "rgb(var(--secondary-complement) / <alpha-value>)"
110
- }
111
- }
112
- ```
113
-
114
- ### Variables
115
-
116
- Generate css variables
117
-
118
- ```js
119
- import { generateStyleVariables } from "tailwindcss-custom-colors";
120
-
121
- const variables = generateStyleVariables(
122
- {
123
- color: "#940BDF",
124
- name: "primary",
125
- },
126
- {
127
- color: "#FFD534",
128
- name: "secondary",
129
- }
130
- );
131
- ```
132
-
133
- #### Output for `variables`:
134
-
135
- ```css
136
- --primary: 148 11 223;
137
- --primary-contrast: 255 255 255;
138
- --primary-complement: 0 0 0;
139
- --primary-100: 223 172 251;
140
- --primary-200: 207 128 249;
141
- --primary-300: 188 80 247;
142
- --primary-400: 172 36 245;
143
- --primary-500: 148 11 223;
144
- --primary-600: 120 8 180;
145
- --primary-700: 91 6 136;
146
- --primary-800: 58 4 88;
147
- --primary-900: 29 2 44;
148
- --secondary: 255 213 52;
149
- --secondary-contrast: 0 0 0;
150
- --secondary-complement: 255 255 255;
151
- --secondary-100: 255 263 296;
152
- --secondary-200: 255 251 235;
153
- --secondary-300: 255 239 173;
154
- --secondary-400: 255 226 112;
155
- --secondary-500: 255 213 52;
156
- --secondary-600: 245 196 0;
157
- --secondary-700: 184 147 0;
158
- --secondary-800: 122 98 0;
159
- --secondary-900: 61 49 0;
160
- ```
161
-
162
- ### Import variables
163
-
164
- ```js
165
- const style = document.createElement("style");
166
- style.innerHTML = `
167
- @layer base {
168
- :root {
169
- ${variables}
170
- }
171
- }`;
172
- document.head.appendChild(style);
173
- ```
1
+ ## Installation
2
+
3
+ ```bash
4
+ # With npm
5
+ npm i tailwindcss-custom-colors@latest
6
+
7
+ # With yarn
8
+ yarn add tailwindcss-custom-colors@latest
9
+ ```
10
+
11
+ [![npm version](https://badge.fury.io/js/tailwindcss-custom-colors.svg)](https://badge.fury.io/js/tailwindcss-custom-colors)
12
+
13
+ <!-- ![NPM](https://img.shields.io/npm/l/tailwindcss-custom-colors)
14
+ ![GitHub Repo stars](https://img.shields.io/github/stars/ibodev1/tailwindcss-custom-colors?style=social)
15
+ ![node-current](https://img.shields.io/node/v/tailwindcss-custom-colors)
16
+ ![GitHub last commit](https://img.shields.io/github/last-commit/ibodev1/tailwindcss-custom-colors)
17
+ ![npm](https://img.shields.io/npm/dw/tailwindcss-custom-colors)
18
+ ![GitHub top language](https://img.shields.io/github/languages/top/ibodev1/tailwindcss-custom-colors) -->
19
+
20
+ ## Usage
21
+
22
+ ### Import
23
+
24
+ ```js
25
+ import { generateConfig } from "tailwindcss-custom-colors";
26
+ ```
27
+
28
+ ```js
29
+ import { generateStyleVariables } from "tailwindcss-custom-colors";
30
+ ```
31
+
32
+ ### generateConfig()
33
+
34
+ ```js
35
+ const extendedColors = generateConfig(colorNames, options);
36
+ ```
37
+
38
+ #### The generateConfig function takes the following parameters:
39
+
40
+ - `colorNames`: An array of color names or a single color name.
41
+ - `options` (optional): An object of options that allows you to customize the generated colors. The available options are `suffixMultiplier` (default: `100`), which determines the suffix used to generate variables names (e.g `[1, 10, 100]`) and `variablePrefix` (default: `undefined`), which determines the prefix for the css variable name, none by default.
42
+
43
+ The function returns a config object for Tailwind CSS with the specified color names and their respective tints.
44
+
45
+ ### generateStyleVariables()
46
+
47
+ ```js
48
+ const variables = generateStyleVariables(colorParams, options);
49
+ ```
50
+
51
+ #### The generateStyleVariables function takes the following parameters:
52
+
53
+ - `colorParams`: An array of color params or a single color params including a color (hex) and a name.
54
+ - `options` (optional): An object of options that allows you to customize the generated colors. The available options are `suffixMultiplier` (default: `100`), which determines the suffix used to generate variables names (e.g `[1, 10, 100]`) and `variablePrefix` (default: `undefined`), which determines the prefix for the css variable name, none by default.
55
+
56
+ ## Example
57
+
58
+ Extend your tailwind config
59
+
60
+ _tailwind.config.js_
61
+
62
+ ```js
63
+ /** @type {import('tailwindcss').Config} */
64
+ import { generateConfig } from "tailwindcss-custom-colors";
65
+
66
+ const extendedColors = generateConfig(["primary", "secondary"]);
67
+
68
+ module.exports = {
69
+ content: ["./src/**/*.{index,vue,js,ts,jsx,tsx}"],
70
+ theme: {
71
+ extend: {
72
+ colors: extendedColors,
73
+ },
74
+ },
75
+ plugins: [],
76
+ };
77
+ ```
78
+
79
+ #### Output for `extendedColors`:
80
+
81
+ ```json
82
+ {
83
+ "primary": {
84
+ "100": "rgb(var(--primary-100) / <alpha-value>)",
85
+ "200": "rgb(var(--primary-200) / <alpha-value>)",
86
+ "300": "rgb(var(--primary-300) / <alpha-value>)",
87
+ "400": "rgb(var(--primary-400) / <alpha-value>)",
88
+ "500": "rgb(var(--primary-500) / <alpha-value>)",
89
+ "600": "rgb(var(--primary-600) / <alpha-value>)",
90
+ "700": "rgb(var(--primary-700) / <alpha-value>)",
91
+ "800": "rgb(var(--primary-800) / <alpha-value>)",
92
+ "900": "rgb(var(--primary-900) / <alpha-value>)",
93
+ "DEFAULT": "rgb(var(--primary) / <alpha-value>)",
94
+ "contrast": "rgb(var(--primary-contrast) / <alpha-value>)",
95
+ "complement": "rgb(var(--primary-complement) / <alpha-value>)"
96
+ },
97
+ "secondary": {
98
+ "100": "rgb(var(--secondary-100) / <alpha-value>)",
99
+ "200": "rgb(var(--secondary-200) / <alpha-value>)",
100
+ "300": "rgb(var(--secondary-300) / <alpha-value>)",
101
+ "400": "rgb(var(--secondary-400) / <alpha-value>)",
102
+ "500": "rgb(var(--secondary-500) / <alpha-value>)",
103
+ "600": "rgb(var(--secondary-600) / <alpha-value>)",
104
+ "700": "rgb(var(--secondary-700) / <alpha-value>)",
105
+ "800": "rgb(var(--secondary-800) / <alpha-value>)",
106
+ "900": "rgb(var(--secondary-900) / <alpha-value>)",
107
+ "DEFAULT": "rgb(var(--secondary) / <alpha-value>)",
108
+ "contrast": "rgb(var(--secondary-contrast) / <alpha-value>)",
109
+ "complement": "rgb(var(--secondary-complement) / <alpha-value>)"
110
+ }
111
+ }
112
+ ```
113
+
114
+ ### Variables
115
+
116
+ Generate css variables
117
+
118
+ ```js
119
+ import { generateStyleVariables } from "tailwindcss-custom-colors";
120
+
121
+ const variables = generateStyleVariables(
122
+ {
123
+ color: "#940BDF",
124
+ name: "primary",
125
+ },
126
+ {
127
+ color: "#FFD534",
128
+ name: "secondary",
129
+ }
130
+ );
131
+ ```
132
+
133
+ #### Output for `variables`:
134
+
135
+ ```css
136
+ --primary: 148 11 223;
137
+ --primary-contrast: 255 255 255;
138
+ --primary-complement: 0 0 0;
139
+ --primary-100: 223 172 251;
140
+ --primary-200: 207 128 249;
141
+ --primary-300: 188 80 247;
142
+ --primary-400: 172 36 245;
143
+ --primary-500: 148 11 223;
144
+ --primary-600: 120 8 180;
145
+ --primary-700: 91 6 136;
146
+ --primary-800: 58 4 88;
147
+ --primary-900: 29 2 44;
148
+ --secondary: 255 213 52;
149
+ --secondary-contrast: 0 0 0;
150
+ --secondary-complement: 255 255 255;
151
+ --secondary-100: 255 263 296;
152
+ --secondary-200: 255 251 235;
153
+ --secondary-300: 255 239 173;
154
+ --secondary-400: 255 226 112;
155
+ --secondary-500: 255 213 52;
156
+ --secondary-600: 245 196 0;
157
+ --secondary-700: 184 147 0;
158
+ --secondary-800: 122 98 0;
159
+ --secondary-900: 61 49 0;
160
+ ```
161
+
162
+ ### Import variables
163
+
164
+ ```js
165
+ const style = document.createElement("style");
166
+ style.innerHTML = `
167
+ @layer base {
168
+ :root {
169
+ ${variables}
170
+ }
171
+ }`;
172
+ document.head.appendChild(style);
173
+ ```
package/dist/index.js CHANGED
@@ -26,6 +26,13 @@ const defaultOptions = {
26
26
  },
27
27
  steps: 100,
28
28
  };
29
+ const computeOptions = (options) => {
30
+ const computedOptions = {
31
+ ...defaultOptions,
32
+ ...options,
33
+ };
34
+ return computedOptions;
35
+ };
29
36
  /**
30
37
  * Generate a config colors object for tailwindcss
31
38
  * @param {string[] | string} colorNames - An array of color names or a single color name
@@ -33,10 +40,7 @@ const defaultOptions = {
33
40
  * @returns {TailwindColorsConfig} A config object for tailwindcss
34
41
  */
35
42
  const generateConfig = (colorNames, options) => {
36
- const { suffixMultiplier, variablePrefix, contrast, complement, steps } = {
37
- ...defaultOptions,
38
- ...(options || {}),
39
- };
43
+ const { suffixMultiplier, variablePrefix, contrast, complement, steps } = computeOptions(options || {});
40
44
  const colors = Array.isArray(colorNames) ? colorNames : [colorNames];
41
45
  const config = {};
42
46
  colors.forEach((colorName) => {
@@ -69,10 +73,7 @@ exports.generateConfig = generateConfig;
69
73
  * @returns {string} A string of css variables
70
74
  */
71
75
  const generateStyleVariables = (colorParams, options) => {
72
- const { suffixMultiplier, variablePrefix, contrast, complement, classification, steps, } = {
73
- ...defaultOptions,
74
- ...(options || {}),
75
- };
76
+ const { suffixMultiplier, variablePrefix, contrast, complement, classification, steps, } = computeOptions(options || {});
76
77
  const colors = Array.isArray(colorParams) ? colorParams : [colorParams];
77
78
  const styles = colors.map(({ color, name }) => {
78
79
  const hslColor = (0, hexToHsl_1.default)(color);
@@ -115,10 +116,7 @@ exports.generateStyleVariables = generateStyleVariables;
115
116
  * @returns {TailwindColorsConfig} A config object for tailwindcss
116
117
  */
117
118
  const generateConfigWithColors = (colorParams, options) => {
118
- const { suffixMultiplier, variablePrefix, contrast, complement, classification, steps, } = {
119
- ...defaultOptions,
120
- ...(options || {}),
121
- };
119
+ const { suffixMultiplier, variablePrefix, contrast, complement, classification, steps, } = computeOptions(options || {});
122
120
  const colors = Array.isArray(colorParams) ? colorParams : [colorParams];
123
121
  const config = {};
124
122
  colors.forEach(({ color, name }) => {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,2CAKwB;AACxB,+CAAkD;AAClD,gEAAwC;AACxC,0DAAkC;AAClC,wEAAgD;AAEhD,MAAM,MAAM,GAAG;IACb,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IAChC,EAAE,EAAE;QACF,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG;KAC5E;CACF,CAAC;AA0BF,MAAM,cAAc,GAAmB;IACrC,gBAAgB,EAAE,GAAG;IACrB,cAAc,EAAE,SAAS;IACzB,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE,IAAI;IAChB,cAAc,EAAE;QACd,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,SAAS;KAChB;IACD,KAAK,EAAE,GAAG;CACX,CAAC;AAMF;;;;;GAKG;AACH,MAAM,cAAc,GAAG,CACrB,UAA6B,EAC7B,OAAiB,EACK,EAAE;IACxB,MAAM,EAAE,gBAAgB,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG;QACxE,GAAG,cAAc;QACjB,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC;KACnB,CAAC;IAEF,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;IAErE,M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AC3B,QAAQ,EACR,cAAc,CACf,mBAAmB;iBACrB;gBACH,CAAC,CAAC,EAAE,CAAC;YACP,GAAG,CAAC,UAAU;gBACZ,CAAC,CAAC;oBACE,UAAU,EAAE,OAAO,IAAA,mBAAc,EAC/B,QAAQ,EACR,cAAc,CACf,mBAAmB;iBACrB;gBACH,CAAC,CAAC,EAAE,CAAC;SACR,CAAC;QAEF,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;YAC9B,MAAM,UAAU,GAAG,GAAG,KAAK,GAAG,gBAAgB,EAAE,CAAC;YACjD,IAAI,KAAK,KAAK,CAAC,EAAE;gBACf,UAAU,CAAC,UAAU,CAAC,GAAG,UAAU,CAAC,OAAO,CAAC;aAC7C;iBAAM,IAAI,KAAK,GAAG,CAAC,EAAE;gBACpB,IAAI,KAAK,GAAG,IAAA,eAAK,EAAC,CAAC,GAAG,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC;gBACpC,UAAU,CAAC,UAAU,CAAC,GAAG,OAAO,IAAA,gBAAO,EACrC,QAAQ,EACR,KAAK,CACN,mBAAmB,CAAC;aACtB;iBAAM;gBACL,IAAI,KAAK,GAAG,IAAA,eAAK,EAAC,GAAG,GAAG,KAAK,GAAG,GAAG,CAAC,CAAC;gBACrC,UAAU,CAAC,UAAU,CAAC,GAAG,OAAO,IAAA,eAAM,EACpC,QAAQ,EACR,KAAK,CACN,mBAAmB,CAAC;aACtB;QACH,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC;IAC5B,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAE+C,4DAAwB"}
package/package.json CHANGED
@@ -1,35 +1,36 @@
1
- {
2
- "name": "tailwindcss-custom-colors",
3
- "version": "1.0.7",
4
- "description": "Reactive color shades generator for TailwindCSS",
5
- "author": "quentinjuarez",
6
- "repository": {
7
- "type": "git",
8
- "url": "https://github.com/quentinjuarez/tailwindcss-custom-colors"
9
- },
10
- "main": "dist/index.js",
11
- "files": [
12
- "dist/**/*"
13
- ],
14
- "scripts": {
15
- "test": "jest",
16
- "build": "tsc",
17
- "patch": "yarn build && npm version patch && git push --follow-tags"
18
- },
19
- "keywords": [
20
- "tailwind",
21
- "tailwindcss",
22
- "colors",
23
- "palette",
24
- "shades",
25
- "tints"
26
- ],
27
- "devDependencies": {
28
- "@types/jest": "^29.5.3",
29
- "@types/node": "^20.4.4",
30
- "jest": "^29.6.1",
31
- "ts-jest": "^29.1.1",
32
- "typescript": "^5.1.6"
33
- },
34
- "license": "MIT"
35
- }
1
+ {
2
+ "name": "tailwindcss-custom-colors",
3
+ "version": "1.0.12",
4
+ "description": "Reactive color shades generator for TailwindCSS",
5
+ "author": "quentinjuarez",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/quentinjuarez/tailwindcss-custom-colors"
9
+ },
10
+ "main": "dist/index.js",
11
+ "files": [
12
+ "dist/**/*"
13
+ ],
14
+ "scripts": {
15
+ "test": "jest",
16
+ "build": "tsc",
17
+ "patch": "yarn build && npm version patch && git push --follow-tags"
18
+ },
19
+ "keywords": [
20
+ "tailwind",
21
+ "tailwindcss",
22
+ "colors",
23
+ "palette",
24
+ "shades",
25
+ "tints"
26
+ ],
27
+ "devDependencies": {
28
+ "@types/jest": "^29.5.3",
29
+ "@types/node": "^20.4.4",
30
+ "jest": "^29.6.1",
31
+ "ts-jest": "^29.1.1",
32
+ "typescript": "^5.1.6"
33
+ },
34
+ "license": "MIT",
35
+ "packageManager": "yarn@3.5.0"
36
+ }