Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge extend objects deeply by default #88

Closed
muhammadsammy opened this issue Jan 3, 2021 · 4 comments
Closed

Merge extend objects deeply by default #88

muhammadsammy opened this issue Jan 3, 2021 · 4 comments
Labels
good first issue Good for newcomers
Milestone

Comments

@muhammadsammy
Copy link
Owner

(#2679)

@muhammadsammy muhammadsammy created this issue from a note in TailwindCSS 2 (📝 To do) Jan 3, 2021
@muhammadsammy muhammadsammy added this to the Backlog milestone Jan 3, 2021
@muhammadsammy muhammadsammy removed this from 📝 To do in TailwindCSS 2 Jan 3, 2021
@muhammadsammy muhammadsammy added the good first issue Good for newcomers label Jan 13, 2021
@femialaka
Copy link

Hi, I would like to get stuck in can you tell me how to set up locally on a Mac. For example do I create a link to the cloned version? I setup a react project in Typescript and created a link from the cloned version of Tailwindcss-classnames to the app but got the following error:

npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/tailwindcss-classnames/lib/cli/index.js'
npm ERR! enoent This is related to npm not being able to find a file.

can you help with this please.

@muhammadsammy
Copy link
Owner Author

muhammadsammy commented Jan 20, 2021

Sure! You can now invoke the cli by running yarn run-cli or npm run run-cli inside the repo source and it will prompt you with questions.
You have to pull the latest changes as I just added this npm script here 86e5eb9 .
Don't hesitate to ask about anything confusing and thanks for your interrest!

@DaDom
Copy link
Contributor

DaDom commented May 18, 2021

Was this change already implemented, but the issue not closed?
As far as I can see the generation already works according to this change in tailwindcss.

For example, if I use the following basic tailwind configuration:

module.exports = {
  theme: {
    extend: {
      colors: {
        red: {
          5000: '#FF0000'
        }
      }
    }
  }
}

Now I run npm run run-cli and the resulting tailwindcss-classnames.ts contains:

...
export type TTextColor =
    ...
    | 'text-red-50'
    | 'text-red-100'
    | 'text-red-200'
    | 'text-red-300'
    | 'text-red-400'
    | 'text-red-500'
    | 'text-red-600'
    | 'text-red-700'
    | 'text-red-800'
    | 'text-red-900'
    | 'text-red-5000'
    ...

This looks like a correct deep-merge to me, or did I misunderstand the issue?

@muhammadsammy
Copy link
Owner Author

I think you're right 👍. I will close this. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants