Skip to content

Commit

Permalink
fix(performance): using clsx in place of classnames package
Browse files Browse the repository at this point in the history
issue - #126
  • Loading branch information
imrishabh18 authored May 6, 2021
1 parent a1b1182 commit 611a0f4
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"dist"
],
"dependencies": {
"classnames": "^2.2.6",
"clsx": "^1.1.1",
"colors": "^1.4.0",
"commander": "^7.0.0",
"inquirer": "^7.1.0",
Expand Down Expand Up @@ -93,7 +93,7 @@
"rollup-plugin-terser": "^7.0.2",
"semver": "^7.3.2",
"standard-version": "^9.1.0",
"tailwindcss": "^2.1.0",
"tailwindcss": "^2.1.2",
"ts-jest": "~26.5.1",
"typescript": "^4.1.3"
}
Expand Down
2 changes: 1 addition & 1 deletion src/cli/core/FileContentGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class FileContentGenerator {
};

private importStatementsTemplate = (): string => {
return "import classnamesLib from 'classnames';" + '\n' + `T_CUSTOM_CLASSES_IMPORT_STATEMENT`;
return "import classnamesLib from 'clsx';" + '\n' + `T_CUSTOM_CLASSES_IMPORT_STATEMENT`;
};

private allClassnamesTypesTemplate = (): string => {
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/// DO NOT EDIT THIS FILE DIRECTLY!
//////////////////////////////////////////////////////////////////////////////

import classnamesLib from 'classnames';
import classnamesLib from 'clsx';

export type TScreenReaders = 'sr-only' | 'not-sr-only';

Expand Down
13 changes: 9 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1686,6 +1686,11 @@ clone@~0.1.9:
resolved "https://registry.yarnpkg.com/clone/-/clone-0.1.19.tgz#613fb68639b26a494ac53253e15b1a6bd88ada85"
integrity sha1-YT+2hjmyaklKxTJT4Vsaa9iK2oU=

clsx@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.1.1.tgz#98b3134f9abbdf23b2663491ace13c5c03a73188"
integrity sha512-6/bPho624p3S2pMyvP5kKBPXnI3ufHLObBFCfgx+LkeR5lg2XYy2hqZqUf45ypD8COn2bhgGJSUE+l5dhNBieA==

co@^4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
Expand Down Expand Up @@ -6668,10 +6673,10 @@ table@^6.0.4:
slice-ansi "^4.0.0"
string-width "^4.2.0"

tailwindcss@^2.1.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-2.1.1.tgz#642f6038c9283a8e1454da34585b8b7c1a1e8877"
integrity sha512-zZ6axGqpSZOCBS7wITm/WNHkBzDt5CIZlDlx0eCVldwTxFPELCVGbgh7Xpb3/kZp3cUxOmK7bZUjqhuMrbN6xQ==
tailwindcss@^2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-2.1.2.tgz#29402bf73a445faedd03df6d3b177e7b52b7c4a1"
integrity sha512-T5t+wwd+/hsOyRw2HJuFuv0LTUm3MUdHm2DJ94GPVgzqwPPFa9XxX0KlwLWupUuiOUj6uiKURCzYPHFcuPch/w==
dependencies:
"@fullhuman/postcss-purgecss" "^3.1.3"
bytes "^3.0.0"
Expand Down

0 comments on commit 611a0f4

Please sign in to comment.