Skip to content

Commit

Permalink
Use Bun for build (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
leo authored Feb 23, 2024
1 parent c62c0b4 commit e475259
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 1,734 deletions.
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Leonard Lamprecht
Copyright (c) 2024 Ronin GmbH

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This package lets you accomplish all of those things with ease.
First, install the package:

```bash
npm install tailwindcss-constants --save
npm install tailwindcss-constants
```

Then invoke it from your application code:
Expand All @@ -31,7 +31,7 @@ const Component = () => {
console.log('Test');
}, transitionDuration.value);
});

return <span class={transitionDuration.util('transition-colors duration-300')}>Test</span>;
};
```
Expand All @@ -52,7 +52,7 @@ If you're applying a class name conditionally like so...

```js
const Component = () => {
return <span class={someVariable && 'bg-black'}>Test</span>;
return <span class={someVariable && "bg-black"}>Test</span>;
};
```

Expand All @@ -77,7 +77,7 @@ By default, `.util` matches utility classes against your defined constant by che
If you'd like to assert with a custom suffix, you can pass it like this:

```jsx
const darkBackground = new TailwindConstant(500, '-dark');
const darkBackground = new TailwindConstant(500, "-dark");
```

Now the second argument you've passed will be used instead of `-[your-constant]`.
Expand All @@ -87,7 +87,13 @@ Additionally, `.util` also allows for passing extra conditions as a second argum
```jsx
const Component = () => {
const [state, setState] = useState(null);
return <span class={transitionDuration.util('transition-colors duration-300', state)}>Test</span>;
return (
<span
class={transitionDuration.util("transition-colors duration-300", state)}
>
Test
</span>
);
};
```

Expand Down
Binary file added bun.lockb
Binary file not shown.
2 changes: 2 additions & 0 deletions bunfig.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[install]
exact = true
Loading

0 comments on commit e475259

Please sign in to comment.