pytailwindcss 0.1.4__tar.gz → 0.3.0__tar.gz
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.
- pytailwindcss-0.3.0/PKG-INFO +138 -0
- pytailwindcss-0.3.0/README.md +112 -0
- {pytailwindcss-0.1.4 → pytailwindcss-0.3.0}/pyproject.toml +9 -10
- {pytailwindcss-0.1.4 → pytailwindcss-0.3.0}/src/pytailwindcss/__init__.py +2 -2
- {pytailwindcss-0.1.4 → pytailwindcss-0.3.0}/src/pytailwindcss/__main__.py +4 -0
- {pytailwindcss-0.1.4 → pytailwindcss-0.3.0}/src/pytailwindcss/utils.py +3 -3
- pytailwindcss-0.1.4/PKG-INFO +0 -113
- pytailwindcss-0.1.4/README.md +0 -89
- pytailwindcss-0.1.4/setup.py +0 -34
- {pytailwindcss-0.1.4 → pytailwindcss-0.3.0}/LICENSE +0 -0
- {pytailwindcss-0.1.4 → pytailwindcss-0.3.0}/src/pytailwindcss/exceptions.py +0 -0
- {pytailwindcss-0.1.4 → pytailwindcss-0.3.0}/src/pytailwindcss/installation.py +0 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pytailwindcss
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: Standalone Tailwind CSS CLI, installable via pip. Use Tailwind CSS without Node.js.
|
|
5
|
+
License: MIT
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Keywords: cli,tailwind,css
|
|
8
|
+
Author: Tim Kamanin
|
|
9
|
+
Author-email: tim@timonweb.com
|
|
10
|
+
Requires-Python: >=3.11,<4.0
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Environment :: Web Environment
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
22
|
+
Classifier: Topic :: Utilities
|
|
23
|
+
Project-URL: Homepage, https://github.com/timonweb/pytailwindcss
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
|
|
26
|
+
# Standalone Tailwind CSS CLI, installable via pip
|
|
27
|
+
|
|
28
|
+
Use *Tailwind CSS* without *Node.js* — install it via pip.
|
|
29
|
+
|
|
30
|
+
## Why
|
|
31
|
+
|
|
32
|
+
*Tailwind CSS* is notoriously dependent on *Node.js*. If you're a *Python* developer, this dependency may not be welcome
|
|
33
|
+
in your team, your Docker container, or your inner circle.
|
|
34
|
+
|
|
35
|
+
The *Tailwind CSS* team recently announced a new standalone CLI build that gives you the full power of *Tailwind CLI* in
|
|
36
|
+
a self-contained executable — no *Node.js* or `npm` required.
|
|
37
|
+
|
|
38
|
+
However, installing the standalone CLI isn't as easy as running `npm install`.
|
|
39
|
+
|
|
40
|
+
That's why I created this package to make it as simple as running the `pip install` command. Now you can install the standalone *Tailwind CLI* via `pip` by running:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
pip install pytailwindcss
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Now you can run `tailwindcss` in your terminal:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
tailwindcss -i input.css -o output.css --minify
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Voilà!
|
|
53
|
+
|
|
54
|
+
## Get started
|
|
55
|
+
|
|
56
|
+
1. Install `pytailwindcss` via `pip`:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
pip install pytailwindcss
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
2. **[Recommended]** Preinstall the `tailwindcss` binary:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
tailwindcss_install
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
By default, the latest binary version will be downloaded. To pin to a specific Tailwind CSS version, set the `TAILWINDCSS_VERSION` environment variable before running the command:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# In a Dockerfile
|
|
72
|
+
ENV TAILWINDCSS_VERSION=v4.1.16
|
|
73
|
+
RUN tailwindcss_install
|
|
74
|
+
|
|
75
|
+
# On Linux/macOS
|
|
76
|
+
export TAILWINDCSS_VERSION=v4.1.16
|
|
77
|
+
tailwindcss_install
|
|
78
|
+
|
|
79
|
+
# On Windows (cmd)
|
|
80
|
+
set TAILWINDCSS_VERSION=v4.1.16
|
|
81
|
+
tailwindcss_install
|
|
82
|
+
|
|
83
|
+
# On Windows (PowerShell)
|
|
84
|
+
$env:TAILWINDCSS_VERSION="v4.1.16"
|
|
85
|
+
tailwindcss_install
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
To see a list of available Tailwind CSS releases, visit: https://github.com/tailwindlabs/tailwindcss/releases
|
|
89
|
+
|
|
90
|
+
If you skip this step, the binary will be downloaded automatically on the first run of the `tailwindcss` command.
|
|
91
|
+
|
|
92
|
+
3. The `tailwindcss` command should now be available in your terminal. Try running it:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
tailwindcss
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
You should see the help output for the `tailwindcss` command. If you skipped step 2, the binary will be downloaded automatically on this first run. Use `tailwindcss` to create a new project or work with an existing *Tailwind CSS* project.
|
|
99
|
+
|
|
100
|
+
4. Create a new *Tailwind CSS* project by navigating to your project directory and initializing it:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
tailwindcss init
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
This command creates the default *tailwind.config.js* file.
|
|
107
|
+
|
|
108
|
+
5. Start a watcher to compile CSS automatically during development:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
tailwindcss -i input.css -o output.css --watch
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
6. Compile and minify your CSS for production:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
tailwindcss -i input.css -o output.css --minify
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
That's it! For more information on using *Tailwind CSS* and its CLI, refer to the [official Tailwind CSS documentation](https://tailwindcss.com/docs).
|
|
121
|
+
|
|
122
|
+
## Caveats
|
|
123
|
+
|
|
124
|
+
While this approach simplifies your setup, there are some trade-offs. Without *Node.js*, you won't be able to install third-party plugins or additional dependencies for your *Tailwind CSS* setup. However, this might not be a dealbreaker for most use cases.
|
|
125
|
+
|
|
126
|
+
You can still customize *Tailwind CSS* via the *tailwind.config.js* file, and the standalone build includes all official *Tailwind CSS* plugins: `@tailwindcss/aspect-ratio`, `@tailwindcss/forms`, `@tailwindcss/line-clamp`, and `@tailwindcss/typography`. This covers approximately 90% of typical *Tailwind CSS* usage scenarios.
|
|
127
|
+
|
|
128
|
+
Here's what the *Tailwind CSS* team says about the standalone build:
|
|
129
|
+
> If you're working on a project where you don't otherwise need *Node.js* or `npm`, the standalone build can be a great choice. If Tailwind was the only reason you had a package.json file, this is probably going to feel like a nicer solution.
|
|
130
|
+
|
|
131
|
+
## Bugs and Suggestions
|
|
132
|
+
|
|
133
|
+
Found a bug or have a suggestion? Please use the issue tracker on GitHub:
|
|
134
|
+
|
|
135
|
+
[https://github.com/timonweb/pytailwindcss/issues](https://github.com/timonweb/pytailwindcss/issues)
|
|
136
|
+
|
|
137
|
+
2021 - 2025 (c) Tim Kamanin — [A Full-Stack Django and Wagtail Developer](https://timonweb.com)
|
|
138
|
+
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Standalone Tailwind CSS CLI, installable via pip
|
|
2
|
+
|
|
3
|
+
Use *Tailwind CSS* without *Node.js* — install it via pip.
|
|
4
|
+
|
|
5
|
+
## Why
|
|
6
|
+
|
|
7
|
+
*Tailwind CSS* is notoriously dependent on *Node.js*. If you're a *Python* developer, this dependency may not be welcome
|
|
8
|
+
in your team, your Docker container, or your inner circle.
|
|
9
|
+
|
|
10
|
+
The *Tailwind CSS* team recently announced a new standalone CLI build that gives you the full power of *Tailwind CLI* in
|
|
11
|
+
a self-contained executable — no *Node.js* or `npm` required.
|
|
12
|
+
|
|
13
|
+
However, installing the standalone CLI isn't as easy as running `npm install`.
|
|
14
|
+
|
|
15
|
+
That's why I created this package to make it as simple as running the `pip install` command. Now you can install the standalone *Tailwind CLI* via `pip` by running:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pip install pytailwindcss
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Now you can run `tailwindcss` in your terminal:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
tailwindcss -i input.css -o output.css --minify
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Voilà!
|
|
28
|
+
|
|
29
|
+
## Get started
|
|
30
|
+
|
|
31
|
+
1. Install `pytailwindcss` via `pip`:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
pip install pytailwindcss
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
2. **[Recommended]** Preinstall the `tailwindcss` binary:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
tailwindcss_install
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
By default, the latest binary version will be downloaded. To pin to a specific Tailwind CSS version, set the `TAILWINDCSS_VERSION` environment variable before running the command:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# In a Dockerfile
|
|
47
|
+
ENV TAILWINDCSS_VERSION=v4.1.16
|
|
48
|
+
RUN tailwindcss_install
|
|
49
|
+
|
|
50
|
+
# On Linux/macOS
|
|
51
|
+
export TAILWINDCSS_VERSION=v4.1.16
|
|
52
|
+
tailwindcss_install
|
|
53
|
+
|
|
54
|
+
# On Windows (cmd)
|
|
55
|
+
set TAILWINDCSS_VERSION=v4.1.16
|
|
56
|
+
tailwindcss_install
|
|
57
|
+
|
|
58
|
+
# On Windows (PowerShell)
|
|
59
|
+
$env:TAILWINDCSS_VERSION="v4.1.16"
|
|
60
|
+
tailwindcss_install
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
To see a list of available Tailwind CSS releases, visit: https://github.com/tailwindlabs/tailwindcss/releases
|
|
64
|
+
|
|
65
|
+
If you skip this step, the binary will be downloaded automatically on the first run of the `tailwindcss` command.
|
|
66
|
+
|
|
67
|
+
3. The `tailwindcss` command should now be available in your terminal. Try running it:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
tailwindcss
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
You should see the help output for the `tailwindcss` command. If you skipped step 2, the binary will be downloaded automatically on this first run. Use `tailwindcss` to create a new project or work with an existing *Tailwind CSS* project.
|
|
74
|
+
|
|
75
|
+
4. Create a new *Tailwind CSS* project by navigating to your project directory and initializing it:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
tailwindcss init
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
This command creates the default *tailwind.config.js* file.
|
|
82
|
+
|
|
83
|
+
5. Start a watcher to compile CSS automatically during development:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
tailwindcss -i input.css -o output.css --watch
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
6. Compile and minify your CSS for production:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
tailwindcss -i input.css -o output.css --minify
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
That's it! For more information on using *Tailwind CSS* and its CLI, refer to the [official Tailwind CSS documentation](https://tailwindcss.com/docs).
|
|
96
|
+
|
|
97
|
+
## Caveats
|
|
98
|
+
|
|
99
|
+
While this approach simplifies your setup, there are some trade-offs. Without *Node.js*, you won't be able to install third-party plugins or additional dependencies for your *Tailwind CSS* setup. However, this might not be a dealbreaker for most use cases.
|
|
100
|
+
|
|
101
|
+
You can still customize *Tailwind CSS* via the *tailwind.config.js* file, and the standalone build includes all official *Tailwind CSS* plugins: `@tailwindcss/aspect-ratio`, `@tailwindcss/forms`, `@tailwindcss/line-clamp`, and `@tailwindcss/typography`. This covers approximately 90% of typical *Tailwind CSS* usage scenarios.
|
|
102
|
+
|
|
103
|
+
Here's what the *Tailwind CSS* team says about the standalone build:
|
|
104
|
+
> If you're working on a project where you don't otherwise need *Node.js* or `npm`, the standalone build can be a great choice. If Tailwind was the only reason you had a package.json file, this is probably going to feel like a nicer solution.
|
|
105
|
+
|
|
106
|
+
## Bugs and Suggestions
|
|
107
|
+
|
|
108
|
+
Found a bug or have a suggestion? Please use the issue tracker on GitHub:
|
|
109
|
+
|
|
110
|
+
[https://github.com/timonweb/pytailwindcss/issues](https://github.com/timonweb/pytailwindcss/issues)
|
|
111
|
+
|
|
112
|
+
2021 - 2025 (c) Tim Kamanin — [A Full-Stack Django and Wagtail Developer](https://timonweb.com)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "pytailwindcss"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.3.0"
|
|
4
4
|
description = "Standalone Tailwind CSS CLI, installable via pip. Use Tailwind CSS without Node.js."
|
|
5
5
|
authors = ["Tim Kamanin <tim@timonweb.com>"]
|
|
6
6
|
homepage = "https://github.com/timonweb/pytailwindcss"
|
|
@@ -11,9 +11,10 @@ classifiers = [
|
|
|
11
11
|
"Development Status :: 4 - Beta",
|
|
12
12
|
"Intended Audience :: Developers",
|
|
13
13
|
"License :: OSI Approved :: MIT License",
|
|
14
|
-
"Programming Language :: Python :: 3.
|
|
15
|
-
"Programming Language :: Python :: 3.
|
|
16
|
-
"Programming Language :: Python :: 3.
|
|
14
|
+
"Programming Language :: Python :: 3.11",
|
|
15
|
+
"Programming Language :: Python :: 3.12",
|
|
16
|
+
"Programming Language :: Python :: 3.13",
|
|
17
|
+
"Programming Language :: Python :: 3.14",
|
|
17
18
|
"Operating System :: OS Independent",
|
|
18
19
|
"Topic :: Software Development :: Libraries",
|
|
19
20
|
"Topic :: Utilities",
|
|
@@ -26,16 +27,14 @@ packages = [
|
|
|
26
27
|
|
|
27
28
|
[tool.poetry.scripts]
|
|
28
29
|
tailwindcss = "pytailwindcss.__main__:main"
|
|
30
|
+
tailwindcss_install = "pytailwindcss.__main__:install"
|
|
29
31
|
|
|
30
32
|
[tool.poetry.dependencies]
|
|
31
|
-
python = "^3.
|
|
33
|
+
python = "^3.11"
|
|
32
34
|
|
|
33
35
|
[tool.poetry.dev-dependencies]
|
|
34
|
-
pytest = "^
|
|
35
|
-
|
|
36
|
-
flake8 = "^4.0.1"
|
|
37
|
-
black = "^21.12b0"
|
|
38
|
-
pre-commit = "^2.16.0"
|
|
36
|
+
pytest = "^8.4.2"
|
|
37
|
+
pre-commit = "^4.3.0"
|
|
39
38
|
|
|
40
39
|
[build-system]
|
|
41
40
|
requires = ["poetry-core>=1.0.0"]
|
|
@@ -39,7 +39,7 @@ def run(
|
|
|
39
39
|
version = env.get("TAILWINDCSS_VERSION", "latest") if env else "latest"
|
|
40
40
|
|
|
41
41
|
if bin_path is None:
|
|
42
|
-
bin_path = get_bin_path()
|
|
42
|
+
bin_path = get_bin_path(version)
|
|
43
43
|
|
|
44
44
|
if auto_install and not bin_path.exists():
|
|
45
45
|
install(version, bin_path)
|
|
@@ -65,5 +65,5 @@ def install(version: str = None, bin_path: Union[pathlib.Path, str] = None):
|
|
|
65
65
|
if version is None:
|
|
66
66
|
version = "latest"
|
|
67
67
|
if bin_path is None:
|
|
68
|
-
bin_path = get_bin_path()
|
|
68
|
+
bin_path = get_bin_path(version)
|
|
69
69
|
return install_binary(version, ensure_is_pathlib_path(bin_path))
|
|
@@ -9,7 +9,7 @@ def make_subprocess_run_kwargs(cwd=None, env=None, live_output=False):
|
|
|
9
9
|
"""
|
|
10
10
|
opts = {
|
|
11
11
|
"cwd": cwd or os.getcwd(),
|
|
12
|
-
"env": env or
|
|
12
|
+
"env": env or None,
|
|
13
13
|
}
|
|
14
14
|
if live_output is False:
|
|
15
15
|
opts.update(
|
|
@@ -30,11 +30,11 @@ def format_cli_args(cli_args):
|
|
|
30
30
|
return cli_args
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
def get_bin_path():
|
|
33
|
+
def get_bin_path(version="latest"):
|
|
34
34
|
"""
|
|
35
35
|
Returns a path for the tailwindcss binary.
|
|
36
36
|
"""
|
|
37
|
-
return pathlib.Path(__file__).parent.resolve() / "bin" / "tailwindcss"
|
|
37
|
+
return pathlib.Path(__file__).parent.resolve() / "bin" / version / "tailwindcss"
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
def ensure_is_pathlib_path(path):
|
pytailwindcss-0.1.4/PKG-INFO
DELETED
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: pytailwindcss
|
|
3
|
-
Version: 0.1.4
|
|
4
|
-
Summary: Standalone Tailwind CSS CLI, installable via pip. Use Tailwind CSS without Node.js.
|
|
5
|
-
Home-page: https://github.com/timonweb/pytailwindcss
|
|
6
|
-
License: MIT
|
|
7
|
-
Keywords: cli,tailwind,css
|
|
8
|
-
Author: Tim Kamanin
|
|
9
|
-
Author-email: tim@timonweb.com
|
|
10
|
-
Requires-Python: >=3.8,<4.0
|
|
11
|
-
Classifier: Development Status :: 4 - Beta
|
|
12
|
-
Classifier: Environment :: Web Environment
|
|
13
|
-
Classifier: Intended Audience :: Developers
|
|
14
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
-
Classifier: Operating System :: OS Independent
|
|
16
|
-
Classifier: Programming Language :: Python :: 3
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
20
|
-
Classifier: Topic :: Software Development :: Libraries
|
|
21
|
-
Classifier: Topic :: Utilities
|
|
22
|
-
Description-Content-Type: text/markdown
|
|
23
|
-
|
|
24
|
-
# Standalone Tailwind CSS CLI, installable via pip
|
|
25
|
-
|
|
26
|
-
Use *Tailwind CSS* without *Node.js* and install it via pip.
|
|
27
|
-
|
|
28
|
-
## Why
|
|
29
|
-
|
|
30
|
-
*Tailwind CSS* is notoriously dependent on *Node.js*. If you're a *Python* developer, this dependency may not be welcome
|
|
31
|
-
in your team, your Docker container, or your inner circle.
|
|
32
|
-
|
|
33
|
-
The *Tailwind CSS* team recently announced a new standalone CLI build that gives you the full power of *Tailwind CLI* in
|
|
34
|
-
a self-contained executable — no *Node.js* or `npm` required.
|
|
35
|
-
|
|
36
|
-
However, installing such a standalone CLI isn't as easy as running `npm install`, the installation command for *Node.js*
|
|
37
|
-
.
|
|
38
|
-
|
|
39
|
-
That's why I decided to make it as simple as running `pip install` command. As a result you can install the standalone *
|
|
40
|
-
Tailwind CLI* via `pip` by running the following command:
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
pip install pytailwindcss
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
Now you can run `tailwindcss` in your terminal as:
|
|
47
|
-
|
|
48
|
-
```
|
|
49
|
-
tailwindcss -i input.css -o output.css --minify
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
Voila!
|
|
53
|
-
|
|
54
|
-
## Get started
|
|
55
|
-
|
|
56
|
-
1. Install `tailwindcss` via `pip` by executing the following command:
|
|
57
|
-
|
|
58
|
-
```
|
|
59
|
-
pip install pytailwindcss
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
2. The `tailwindcss` command should now be available in your terminal. Try to run it:
|
|
63
|
-
|
|
64
|
-
```
|
|
65
|
-
tailwindcss
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
If the installation was successful, you should see the message about binary being downloaded on the first run. When download is complete, you should see the help output for the `tailwindcss` command. Use `tailwindcss`
|
|
69
|
-
to create a new project or work with an existing *Tailwind CSS* project.
|
|
70
|
-
|
|
71
|
-
3. Let's create a new project. Go to the directory where you want to host your *Tailwind CSS* project and initialize it
|
|
72
|
-
by running:
|
|
73
|
-
|
|
74
|
-
```
|
|
75
|
-
tailwindcss init
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
This command will create the default *tailwind.config.js* file.
|
|
79
|
-
|
|
80
|
-
4. Start a watcher by running:
|
|
81
|
-
|
|
82
|
-
```
|
|
83
|
-
tailwindcss -i input.css -o output.css --watch
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
5. Compile and minify your CSS for production by running:
|
|
87
|
-
|
|
88
|
-
```
|
|
89
|
-
tailwindcss -i input.css -o output.css --minify
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
You got it. Please refer to [official Tailwind documentation](https://tailwindcss.com/docs) for more information on
|
|
93
|
-
using *Tailwind CSS* and its CLI.
|
|
94
|
-
|
|
95
|
-
## Caveats
|
|
96
|
-
|
|
97
|
-
It's not all roses, though. Giving up *Node.js* means you won't be able to install plugins or additional dependencies for
|
|
98
|
-
your *Tailwind CSS* setup. At the same time, that might not be a dealbreaker. You can still customize *Tailwind CSS* via
|
|
99
|
-
the *tailwind.config.js* file. And the standalone build also comes with all official *Tailwind CSS* plugins
|
|
100
|
-
like `@tailwindcss/aspect-ratio`, `@tailwindcss/forms`, `@tailwindcss/line-clamp`, and `@tailwindcss/typography`. So in
|
|
101
|
-
90% of *Tailwind CSS* usage cases you should be covered, and the setup is so simplified now.
|
|
102
|
-
|
|
103
|
-
Here is what the *Tailwind CSS* team says about going the standalone *Tailwind CSS* route:
|
|
104
|
-
> If you’re working on a project where you don’t otherwise need *Node.js* or `npm`, the standalone build can be a great choice. If Tailwind was the only reason you had a package.json file, this is probably going to feel like a nicer solution.
|
|
105
|
-
|
|
106
|
-
## Bugs and suggestions
|
|
107
|
-
|
|
108
|
-
If you have found a bug, please use the issue tracker on GitHub.
|
|
109
|
-
|
|
110
|
-
[https://github.com/timonweb/pytailwindcss/issues](https://github.com/timonweb/pytailwindcss/issues)
|
|
111
|
-
|
|
112
|
-
2021 (c) [Tim Kamanin - A Full Stack Django and Wagtail Developer](https://timonweb.com)
|
|
113
|
-
|
pytailwindcss-0.1.4/README.md
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
# Standalone Tailwind CSS CLI, installable via pip
|
|
2
|
-
|
|
3
|
-
Use *Tailwind CSS* without *Node.js* and install it via pip.
|
|
4
|
-
|
|
5
|
-
## Why
|
|
6
|
-
|
|
7
|
-
*Tailwind CSS* is notoriously dependent on *Node.js*. If you're a *Python* developer, this dependency may not be welcome
|
|
8
|
-
in your team, your Docker container, or your inner circle.
|
|
9
|
-
|
|
10
|
-
The *Tailwind CSS* team recently announced a new standalone CLI build that gives you the full power of *Tailwind CLI* in
|
|
11
|
-
a self-contained executable — no *Node.js* or `npm` required.
|
|
12
|
-
|
|
13
|
-
However, installing such a standalone CLI isn't as easy as running `npm install`, the installation command for *Node.js*
|
|
14
|
-
.
|
|
15
|
-
|
|
16
|
-
That's why I decided to make it as simple as running `pip install` command. As a result you can install the standalone *
|
|
17
|
-
Tailwind CLI* via `pip` by running the following command:
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
pip install pytailwindcss
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
Now you can run `tailwindcss` in your terminal as:
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
tailwindcss -i input.css -o output.css --minify
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
Voila!
|
|
30
|
-
|
|
31
|
-
## Get started
|
|
32
|
-
|
|
33
|
-
1. Install `tailwindcss` via `pip` by executing the following command:
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
pip install pytailwindcss
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
2. The `tailwindcss` command should now be available in your terminal. Try to run it:
|
|
40
|
-
|
|
41
|
-
```
|
|
42
|
-
tailwindcss
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
If the installation was successful, you should see the message about binary being downloaded on the first run. When download is complete, you should see the help output for the `tailwindcss` command. Use `tailwindcss`
|
|
46
|
-
to create a new project or work with an existing *Tailwind CSS* project.
|
|
47
|
-
|
|
48
|
-
3. Let's create a new project. Go to the directory where you want to host your *Tailwind CSS* project and initialize it
|
|
49
|
-
by running:
|
|
50
|
-
|
|
51
|
-
```
|
|
52
|
-
tailwindcss init
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
This command will create the default *tailwind.config.js* file.
|
|
56
|
-
|
|
57
|
-
4. Start a watcher by running:
|
|
58
|
-
|
|
59
|
-
```
|
|
60
|
-
tailwindcss -i input.css -o output.css --watch
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
5. Compile and minify your CSS for production by running:
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
tailwindcss -i input.css -o output.css --minify
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
You got it. Please refer to [official Tailwind documentation](https://tailwindcss.com/docs) for more information on
|
|
70
|
-
using *Tailwind CSS* and its CLI.
|
|
71
|
-
|
|
72
|
-
## Caveats
|
|
73
|
-
|
|
74
|
-
It's not all roses, though. Giving up *Node.js* means you won't be able to install plugins or additional dependencies for
|
|
75
|
-
your *Tailwind CSS* setup. At the same time, that might not be a dealbreaker. You can still customize *Tailwind CSS* via
|
|
76
|
-
the *tailwind.config.js* file. And the standalone build also comes with all official *Tailwind CSS* plugins
|
|
77
|
-
like `@tailwindcss/aspect-ratio`, `@tailwindcss/forms`, `@tailwindcss/line-clamp`, and `@tailwindcss/typography`. So in
|
|
78
|
-
90% of *Tailwind CSS* usage cases you should be covered, and the setup is so simplified now.
|
|
79
|
-
|
|
80
|
-
Here is what the *Tailwind CSS* team says about going the standalone *Tailwind CSS* route:
|
|
81
|
-
> If you’re working on a project where you don’t otherwise need *Node.js* or `npm`, the standalone build can be a great choice. If Tailwind was the only reason you had a package.json file, this is probably going to feel like a nicer solution.
|
|
82
|
-
|
|
83
|
-
## Bugs and suggestions
|
|
84
|
-
|
|
85
|
-
If you have found a bug, please use the issue tracker on GitHub.
|
|
86
|
-
|
|
87
|
-
[https://github.com/timonweb/pytailwindcss/issues](https://github.com/timonweb/pytailwindcss/issues)
|
|
88
|
-
|
|
89
|
-
2021 (c) [Tim Kamanin - A Full Stack Django and Wagtail Developer](https://timonweb.com)
|
pytailwindcss-0.1.4/setup.py
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
from setuptools import setup
|
|
3
|
-
|
|
4
|
-
package_dir = \
|
|
5
|
-
{'': 'src'}
|
|
6
|
-
|
|
7
|
-
packages = \
|
|
8
|
-
['pytailwindcss']
|
|
9
|
-
|
|
10
|
-
package_data = \
|
|
11
|
-
{'': ['*']}
|
|
12
|
-
|
|
13
|
-
entry_points = \
|
|
14
|
-
{'console_scripts': ['tailwindcss = pytailwindcss.__main__:main']}
|
|
15
|
-
|
|
16
|
-
setup_kwargs = {
|
|
17
|
-
'name': 'pytailwindcss',
|
|
18
|
-
'version': '0.1.4',
|
|
19
|
-
'description': 'Standalone Tailwind CSS CLI, installable via pip. Use Tailwind CSS without Node.js.',
|
|
20
|
-
'long_description': "# Standalone Tailwind CSS CLI, installable via pip\n\nUse *Tailwind CSS* without *Node.js* and install it via pip.\n\n## Why\n\n*Tailwind CSS* is notoriously dependent on *Node.js*. If you're a *Python* developer, this dependency may not be welcome\nin your team, your Docker container, or your inner circle.\n\nThe *Tailwind CSS* team recently announced a new standalone CLI build that gives you the full power of *Tailwind CLI* in\na self-contained executable — no *Node.js* or `npm` required.\n\nHowever, installing such a standalone CLI isn't as easy as running `npm install`, the installation command for *Node.js*\n.\n\nThat's why I decided to make it as simple as running `pip install` command. As a result you can install the standalone *\nTailwind CLI* via `pip` by running the following command:\n\n```bash\npip install pytailwindcss\n```\n\nNow you can run `tailwindcss` in your terminal as:\n\n```\ntailwindcss -i input.css -o output.css --minify\n```\n\nVoila!\n\n## Get started\n\n1. Install `tailwindcss` via `pip` by executing the following command:\n\n ```\n pip install pytailwindcss\n ```\n\n2. The `tailwindcss` command should now be available in your terminal. Try to run it:\n\n ```\n tailwindcss\n ```\n\n If the installation was successful, you should see the message about binary being downloaded on the first run. When download is complete, you should see the help output for the `tailwindcss` command. Use `tailwindcss`\n to create a new project or work with an existing *Tailwind CSS* project.\n\n3. Let's create a new project. Go to the directory where you want to host your *Tailwind CSS* project and initialize it\n by running:\n\n ```\n tailwindcss init\n ```\n\n This command will create the default *tailwind.config.js* file.\n\n4. Start a watcher by running:\n\n ```\n tailwindcss -i input.css -o output.css --watch\n ```\n\n5. Compile and minify your CSS for production by running:\n\n ```\n tailwindcss -i input.css -o output.css --minify\n ```\n\nYou got it. Please refer to [official Tailwind documentation](https://tailwindcss.com/docs) for more information on\nusing *Tailwind CSS* and its CLI.\n\n## Caveats\n\nIt's not all roses, though. Giving up *Node.js* means you won't be able to install plugins or additional dependencies for\nyour *Tailwind CSS* setup. At the same time, that might not be a dealbreaker. You can still customize *Tailwind CSS* via\nthe *tailwind.config.js* file. And the standalone build also comes with all official *Tailwind CSS* plugins\nlike `@tailwindcss/aspect-ratio`, `@tailwindcss/forms`, `@tailwindcss/line-clamp`, and `@tailwindcss/typography`. So in\n90% of *Tailwind CSS* usage cases you should be covered, and the setup is so simplified now.\n\nHere is what the *Tailwind CSS* team says about going the standalone *Tailwind CSS* route:\n> If you’re working on a project where you don’t otherwise need *Node.js* or `npm`, the standalone build can be a great choice. If Tailwind was the only reason you had a package.json file, this is probably going to feel like a nicer solution.\n\n## Bugs and suggestions\n\nIf you have found a bug, please use the issue tracker on GitHub.\n\n[https://github.com/timonweb/pytailwindcss/issues](https://github.com/timonweb/pytailwindcss/issues)\n\n2021 (c) [Tim Kamanin - A Full Stack Django and Wagtail Developer](https://timonweb.com)\n",
|
|
21
|
-
'author': 'Tim Kamanin',
|
|
22
|
-
'author_email': 'tim@timonweb.com',
|
|
23
|
-
'maintainer': None,
|
|
24
|
-
'maintainer_email': None,
|
|
25
|
-
'url': 'https://github.com/timonweb/pytailwindcss',
|
|
26
|
-
'package_dir': package_dir,
|
|
27
|
-
'packages': packages,
|
|
28
|
-
'package_data': package_data,
|
|
29
|
-
'entry_points': entry_points,
|
|
30
|
-
'python_requires': '>=3.8,<4.0',
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
setup(**setup_kwargs)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|