timonweb / django-tailwind Goto Github PK
View Code? Open in Web Editor NEWDjango + Tailwind CSS = 💚
Home Page: https://django-tailwind.readthedocs.io
License: MIT License
Django + Tailwind CSS = 💚
Home Page: https://django-tailwind.readthedocs.io
License: MIT License
Hi Tim,
I have been having issues installing and now stuck at step 5.
I have compared your clone and the best I can find with reference is in test.
Kindly do a dummy's quick installation video. I think it would assist a lot.
My opinion.
Thanks
Hey,
I wanted to try out Tailwind UI in a Django project, for that I need to include a plugin. However, I get an error when I try to run the dev server with the plugin in place.
I'd love to help update this to 1.4 but I'm not very familiar with javascript. If there's a recommendation you could make to help clarify what needs to be added for a version upgrade I'd love to help out.
django-tailwind throws installation errors when you set this as your python version during poetry init. If you set to 3.8.1 you are fine.
I was hoping support for the Yarn Package Manager could be added as a way of expanding the reach and scope of the project. Thank you.
help please when I run: python manage.py tailwind start I get the following error:
`C:\Users\DAVID\PycharmProjects\Tailwind\theme\static_src\node_modules\watch\main.js:73
if (err) throw err;
^
[Error: ENOENT: no such file or directory, stat 'C:\Users\DAVID\PycharmProjects\Tailwind\theme\static_src\run'] {
errno: -4058,
code: 'ENOENT',
syscall: 'stat',
path: 'C:\Users\DAVID\PycharmProjects\Tailwind\theme\static_src\run'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! django_tailwind@ start: watch 'npm run build-postcss' ./src
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the django_tailwind@ start script.
`
Is it a problem with the configuration? or django-tailwind
django_tailwind@ start C:\Users\This PC\Desktop\coding-dojo\python_stack\django\book_author_proj\theme\static_src
npm run dev
django_tailwind@ dev C:\Users\This PC\Desktop\coding-dojo\python_stack\django\book_author_proj\theme\static_src
watch 'npm run dev:sass && npm run dev:postcss' ./src
Watching run
Watching dev:sass
C:\Users\This PC\Desktop\coding-dojo\python_stack\django\book_author_proj\theme\static_src\node_modules\watch\main.js:73
if (err) throw err;
^
[Error: ENOENT: no such file or directory, stat 'C:\Users\This PC\Desktop\coding-dojo\python_stack\django\book_author_proj\theme\static_src\run'] { errno: -4058, code: 'ENOENT', syscall: 'stat', path: 'C:\\Users\\This PC\\Desktop\\coding-dojo\\python_stack\\django\\book_author_proj\\theme\\static_src\\run' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! django_tailwind@ dev:
watch 'npm run dev:sass && npm run dev:postcss' ./src
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the django_tailwind@ dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.`
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\This PC\AppData\Roaming\npm-cache\_logs\2020-06-03T11_47_15_291Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! django_tailwind@ start: ```npm run dev``
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the django_tailwind@ start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.`
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\This PC\AppData\Roaming\npm-cache\_logs\2020-06-03T11_47_15_351Z-debug.log
Sorry if release notes exist and I couldn't find them.
Could you add release notes to explain each version upgrade? this will help people understand what new features/bug fixes/ breaking change will occur by upgrading the package to the new version.
Many thanks for your work!
Everything works fine on me rendering the tailwind css in my Django project. But when I type the classname the IDE would not show the options to make completion work. I did install a Tailwind CSS IntelliSense plugin in my VScode, it works fine in my official tailwind enviroment.
So is this django-tailwind module not trigger the plugin ? Anyway, how to make to completion work.
This is my requirements.txt
## Django
django==3.2b1 # https://www.djangoproject.com/
django-extensions==3.1.0 # https://github.com/django-extensions/django-extensions
django-allauth==0.44.0 # https://github.com/pennersr/django-allauth
psycopg2==2.8.6 --no-binary psycopg2 # https://github.com/psycopg/psycopg2
dj_database_url==0.5.0 # https://github.com/jacobian/dj-database-url
django-htmx # https://github.com/adamchainz/django-htmx
## 3rd party system connectors and wrappers to call their API
### DigitalOcean
python-digitalocean==1.16.0 # https://github.com/koalalorenzo/python-digitalocean#how-to-install
### tailwind
django-tailwind # https://github.com/timonweb/django-tailwind/releases
and my settings.py include tailwind
But I still get unknown command. Why?
when starting an app usign ./manage.py tailwind init foo
- it works flawlessly. Django says that it sort of "recommends" top level directory apps. But the directory structure of bigger projects could be more complicated. Apps are normal python packages which could be installed in any directory, e.g. in one of my projects under the plugins/
directory.
But calling ./manage.py tailwind init plugins.foo
tells me that
CommandError: 'plugins.foo' is not a valid app name. Please make sure the name is a valid identifier.
According to the Django docs for AppConfig.name, it is a "full Python path to the application, e.g. 'django.contrib.admin'."
Only the label must be a single Python identifier.
So I think django-tailwind mixes up these two (I too did this in a similar library) - could you correct this?
If I create a tailwind app with tailwind init
, and copy the static_src folder + base template manually into another app, or move that whole app directory a level deeper, and set TAILWIND_APP_NAME="plugins.foo
- it does work, and I can use tailwind install
.
Hi, I have this error when installing on osx:
...
node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.13.1/darwin-x64-83_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.13.1/darwin-x64-83_binding.node":
HTTP error 404 Not Found
Hint: If github.com is not accessible in your location
try setting a proxy via HTTP_PROXY, e.g.
export HTTP_PROXY=http://example.com:1234
...
The problem seems to be access to node-sass v4.13.1
I changed the version to the latest (v.4.14.0) in package.json and now can install correctly.
This version fixes: Reporting wrong LibSass version
Hi,
I'm currently using django + tailwindcss and i have forms which i render manually in my forms.py like this :
so my question is how to make the classes used in my forms be in the styles.css as if i had put them in the *.html file and how to whitelist from python3 manage.py tailwind build ( i google a bit about purgecss whitlisting but didn't know how to implement it in this project), Also i'm not interested in using django crispy forms because i use a tailwind css plugin named kutty https://kutty.netlify.app/ for rendering the classes of these forms.
Thank's in advance
im having issues starting tailwind when i run the py manage.py tailwind start command i get the following error
django_tailwind@ start E:\projects\1stDjangoApp\ToDoList\theme\static_src
watch 'npm run build-postcss' ./src
Watching run
Watching build-postcss'
Watching ./src
E:\projects\1stDjangoApp\ToDoList\theme\static_src\node_modules\watch\main.js:73
if (err) throw err;
^
Error: ENOENT: no such file or directory, stat 'E:\projects\1stDjangoApp\ToDoList\theme\static_src\run'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! django_tailwind@ start: watch 'npm run build-postcss' ./src
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the django_tailwind@ start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Dell\AppData\Roaming\npm-cache_logs\2020-02-03T08_52_21_435Z-debug.log
I have configured tailwind.config.js
as following:
module.exports = {
purge: [
// Templates within theme app (e.g. base.html)
"../templates/**/*.html",
],
}
}
When I run ./manage.py tailwind build
, a full 3.2 MB css file gets generated. But when I explicitly turn on purging with:
module.exports = {
purge: {
enabled: true,
content: [
// Templates within theme app (e.g. base.html)
"../templates/**/*.html",
],
}
}
}
Then a stylesheet of only 10 KB gets generated, so that means that purging works and that the path to the HTML templates is correct.
Now, the Tailwind documentation says:
Now whenever you compile your CSS with
NODE_ENV
set toproduction
, Tailwind will automatically purge unused styles from your CSS.
Does that mean that ./manage.py tailwind build
doesn't run with that environment variable turned on? And is this a bug or is this intentional behavior and should I run ./manage.py tailwind build
with the forementioned env variable?
Thank you for your effort and I'm looking forward to a response!
I just created a new django project running on Python 3.8.3 and I manage dependencies with poetry
. I tried adding django-tailwind
to the project with:
poetry add django-tailwind
and got the following error:
[SolverProblemError]
The current project's Python requirement (^3.8) is not compatible with some of the required packages Python requirement:
- django-tailwind requires Python >=3.6,<3.9
Because django-tailwind (0.9.0) requires Python >=3.6,<3.9
and no versions of django-tailwind match >0.9.0,<0.10.0, django-tailwind is forbidden.
So, because achsoapp depends on django-tailwind (^0.9.0), version solving failed.
I tried changing the Python requirement in my project from python = "^3.8"
to ^3.7
and ^3.6
, but the only thing that allowed installation was python = ">=3.6,<3.9"
.
The project works great with Django 3.1 but cannot be used with it. https://github.com/timonweb/django-tailwind/blob/master/pyproject.toml#L29
Hi Tim! First of all, many thanks for creating such a useful project. I really appreciate all your work on making it easier to use TailwindCSS with Django. ✨
As you may have heard, TailwindCSS v2.0 was just released this week, and while I don’t yet fully understand the scope of the new changes, the TailwindCSS folks have provided a v2 upgrade guide.
It’s not clear to me what might be needed for this project to fully support the changes in the new version. Do you have any thoughts about what might be required?
I'm getting this error every time I try to run python manage.py tailwind install
. I've also tried running npm install
from the static_src
directory.
(django_nlu) vagrant@vagrant:~/code/django_nlu$ python manage.py tailwind install
npm WARN django_tailwind@ No description
npm WARN django_tailwind@ No repository field.
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /home/vagrant/code/django_nlu/theme/static_src/node_modules/dir-glob/node_modules/path-type/package.json.2383928083
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/home/vagrant/code/django_nlu/theme/static_src/node_modules/dir-glob/node_modules/path-type/package.json.2383928083'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/vagrant/.npm/_logs/2020-05-17T16_15_15_832Z-debug.log
Hi,
Do you intend to implement new Tailwind CSS JIT?
Thanks :)
Eric
I noticed that tailwind start
only watches for changes to files in ./src
, therefore ignoring changes to files directly at ./
such as tailwind.config.js
.
Would it not be better to watch ./
for changes instead of ./src
?
This is not an issue with django-tailwind but a note for anyone using it along with PyCharm and the JetBrains Tailwind CSS plug in.
I filed a bug with JetBrains, as the intellisense/code assistance was not working for Django templates inside of the 'normal' app structure of [project root]/app_name/templates/app_name/htmlfiles.html
which may eventually make the steps below unnecessary.
It was found that if you create symlinks to node_modules
, package.json
and tailwind.config.js
in the root of the Django project (same directory as manage.py
) to the appropriate targets under theme/static_src
that the JetBrains official Tailwind CSS plug in works perfectly with the setup described in the django-tailwind's readme.
In the root of your Django project, assuming you named your django-tailwind app 'theme'
ln -s theme/static_src/package.json package.json
ln -s theme/static_src/tailwind.config.js tailwind.config.js
ln -s theme/static_src/node_modules/ node_modules
Reference to JetBrains YouTrack bug tracker:
https://youtrack.jetbrains.com/issue/WEB-50354#focus=Comments-27-4829062.0-0
Hello,
I noticed that "python3 manage.py tailwind start" doesn't exit after finish so i have to exit it it by Keyboard Interrupt (Ctrl + C) every time , its not that big of a deal since i just let it go for 20 seconds before interrupting it and it works but it would be better if it did automatically.
Python : 3.8.5
django-tailwind : latest
NPM_BIN_PATH at the window not working please make sample for me
Hi there,
Anyone brave enough to test the latest state of the master branch? Especially the upgrade instructions here: https://django-tailwind.readthedocs.io/en/latest/migration.html.
@justinmayer, do you want to play? ;)
Hi! I was super excited to see this library because i am trying to not use Bootstrap. However, i am finding that i am lost on how to use it. Now i followed the instructions exactly but still lost. I think that is mostly due to still learning Django but might not be.
For reference i am tying to follow along to this tutorial . I have 2 apps. first is my accounts app and second is the newly created 'theme' app. I am lost on how i use the base.html
in the accounts app. Should these not be shared in the way i am trying? When i try extending the base.html
i get a "TemplateDoesNotExist" error.
Hi Tim,
Thanks for building this Django integration!
What do I need to do to set up the equivalent of step two here to be able to use @apply, which happens in a separate CSS file? https://tailwindcss.com/docs/installation or in more detail: https://tailwindcss.com/course/composing-utilities-with-apply/
Many thanks
I got the following project structure:
/my_project
|--my_site
|--apps/
|--app1/
|--app2/
|--common/
|--settings/
|--prod.py
|--dev.py
|--theme/ (tailwind app)
|--urls.py
|--asgi.py
|--wsgi.py
|--setup.py
|--manage.py
|--.flake8
|--etc pp
now in my settings.py (here prod.py/dev.py) i have to install my theme as website.theme, the app name however is theme.
In the validation.py of django-tailwind it checks if the app is installed, by looking for the app name (theme), instead of in this case website.theme.
Not quiet sure if my project structure is odd (but it follows a pretty common approach), or even an issue of django-tailwind (cause the 'apps.is_installed("theme")' of django returns false.
So my next approach was to rename the app (theme/apps.py) to website.theme and in settings also alter the TAILWIND_APP_NAME to 'website.theme'.
The install command now passed the "is installed"-mark, but therefore failed on the "is a tailwind app"-mark, due to LookupError in djangos apps/registry.py in get_app_config("website.theme").
I think I bypassed the issue by renaming the theme app back to "theme" and just returning at the "is installed"-mark. But this process makes deployment that much harder than just saying: Run 'pip install -r requirements'.
If you think this is not an issue of this project, just ignore it. I thought I mention my thoughts. ;)
Other than that, gotta admit I<3 django-tailwind. GJ man
Related to this comment about feedback #56 (comment) on the new django-tailwind v2
I saw this in the migration docs
There's a python manage.py tailwind start
which I suspect is meant for the jit mode. I am using jit.
but because I use docker what happens is that I just have this script that's executed as part of my docker up
#!/bin/sh
set -o errexit
set -o pipefail
set -o nounset
set -o xtrace
python manage.py migrate
python manage.py runserver 0.0.0.0:8000
Do I write a separate script for the tailwind server as well?
After getting info on where the npm is stored by executing where npm
on Windows, I gotthe information that the path is located at C:\Program Files\nodejs\npm
& C:\Program Files\nodejs\npm.cmd
. Putting this information to settings.py
does not do anything, I still get the
CommandError:
It looks like node.js and/or npm is not installed or cannot be found.
I have tried the following:
NPM_BIN_PATH = C:\Program Files\nodejs\npm
NPM_BIN_PATH = "'Program Files'\nodejs\npm"
NPM_BIN_PATH = "Program Files\nodejs\npm"
NPM_BIN_PATH = C:/Program Files/nodejs/npm
NPM_BIN_PATH = "'Program Files'/nodejs/npm"
NPM_BIN_PATH = "Program Files/nodejs/npm"
Nothing seems to work. Any suggestions?
Thanks a ton in advance.
Hi there, I'm a bit lost during the installation process, specifically step #8:
https://django-tailwind.readthedocs.io/en/latest/installation.html
I'm using my own base template in another app, primary.html:
<!DOCTYPE html>
<html lang="en">
{% load tailwind_tags %}
<head>
{% load static %}
<meta charset="UTF-8">
{% tailwind_css %}
<title>Placeholder</title>
</head>
<body>
{% block content %}{% endblock %}
</body>
</html>
However, this returns the following error:
TemplateSyntaxError at /
'tailwind_tags' is not a registered tag library. Must be one of:
admin_list
admin_modify
admin_urls
cache
i18n
l10n
log
static
tz
I've been trying to figure this out for the last 45 minutes, to no avail. tailwind
and theme
(the app name for tailwind) have been added to INSTALLED_APPS
, as well as TAILWIND_APP_NAME = 'theme'
. All command line steps have been followed. Would you know what the cause of this is?
Thanks for your time,
Mark
I encountered a couple issues getting this library to work on my system, and I thought I should post them here in case they're helpful for others.
First error (running tailwind start
):
Tracking file by folder pattern: migrations
> django_tailwind@ start ***\static_src
> npm run dev
> django_tailwind@ dev ***\static_src
> watch 'npm run dev:sass && npm run dev:postcss' ./src
> Watching run
> Watching dev:sass
***\static_src\node_modules\watch\main.js:73
if (err) throw err;
^
[Error: ENOENT: no such file or directory, stat '***\static_src\dev:sass'] {
errno: -4058,
code: 'ENOENT',
syscall: 'stat',
path: ***\\static_src\\dev:sass'
}
`
The fix here was modifying the dev script in `package.json` from:
"dev": "watch 'npm run dev:sass && npm run dev:postcss' ./src",
to:
"dev": "watch "npm run dev:sass && npm run dev:postcss" ./src",
Second error (still on `tailwind run`):
TypeError: node.getIterator is not a function
at LazyResult.visitTick (\static_src\node_modules\postcss\lib\lazy-result.js:484:33)
at LazyResult.runAsync (\static_src\node_modules\postcss\lib\lazy-result.js:372:30)
at async Promise.all (index 0)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! django_tailwind@ dev:postcss: postcss --config . --map true --output ../static/css/styles.css ../static/css/styles.css
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the django_tailwind@ dev:postcss script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
The fix here was to update `postcss-scss` to v.3.0.4.
Now, everything is working great. Thanks! Let me know if there's any other info you'd like.
Hello,
I wish to use https://github.com/tailwindlabs/tailwindcss-forms to get my django forms to look good. How can I go about integrating this plugin ?
Related to this comment about feedback, #56 (comment)
I saw this
/code # python manage.py tailwind init
app_name [theme]:
Select mode:
1 - jit
2 - default
Choose from 1, 2 [1]:
So I have fear about selecting the wrong one.
My question is how easy is it to switch from default to jit or jit to default after the theme app is generated?
If it's easy to undo then I have less compunction about selecting any mode.
And do you mind not naming default mode default?
Because it's weird that the default choice is jit mode. Maybe call default mode Refresh per build? or any other name that's not also default?
Everything works fine until the:
python manage.py tailwind install
Then it throws an error:
CommandError: npm is not installed or cannot be found at path "None"
Any ideas?
Thanks in advance
Hi,
Thanks for the great plugin. I have two questions regarding this project:
package.json
file in the root of the project:Heroku Node.js support will only be applied when the application has a package.json file in the root directory.
But this plugin creates its own package.json
inside of the theme
folder. I'm wondering how can this be resolved, and also: what commands should be ran before deploying on Heroku, and which should be deployed in the deployment process?
I’m asking because I want to integrate Tailwind with an existing project. I need to use the prefix option for compatibility reasons, and I’m wondering how I can do that without committing the node_modules directory (which is inside theme...) to the repo, but still overwrite the config file.
I'm using Vue from a CDN, and after setting up django-tailwind, the template does not render dynamic content. I tried setting up different delimiters:
<div id="app">
[[msg]]
</div>
var app = new Vue({
delimiters: ['[[', ']]'],
el: '#app',
data: {
msg: "Hello"
}
In my template, all I see is [[msg]], instead of "Hello".
I also tried
{% verbatim %}
{{msg}}
{% endverbatim %}
Without success. Do I need to configure something to have Vue templates work?
In the docs, the author has specified how to use all the utlity classes of Tailwind
in an app. But hasn't mentioned how to use Tailwind
in other Django apps.
TAILWIND_APP_NAME = <the app name>
is the way to specify the Tailwind
app
So how do I specify other apps I have like which I would like to use Tailwind
.
By creating a list:
TAILWIND_APP_NAME = [<app1>, <app2>]Or some other way? Thanks.
I followed the installation instructions and now I'm getting the following when using python3 manage.py tailwind start
SyntaxError: Unexpected token {
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/mnt/c/Users/Matt/Desktop/Code/python/church/bhc/design/static_src/node_modules/fs-extra/lib/mkdirs/index.js:3:44)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! django_tailwind@ dev:postcss: * postcss --config . --map true --output ../static/css/styles.css ../static/css/styles.css *
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the django_tailwind@ dev:postcss script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/$USERNAME/.npm/_logs/2020-07-26T18_56_35_038Z-debug.log
NOTE: Needed to replace back ticks with asterisks for formatting
I'm using WSL so I have no idea how to find the log file but after getting this the first time, I tried installing postcss with npm and, though it installed, I still get the same error. Is there anything I can do to try to fix it? I'll attempt to find the file and upload it for better debugging but again, I have no idea where it is so I need to search (may take a bit)
ERROR: Complete output from command python setup.py egg_info:
ERROR: Traceback (most recent call last):
File "<string>", line 1, in <module>
File "~\Temp\pip-install-owbdvwgs\django-tailwind\setup.py", line 10, in <module>
long_description=open("README.md").read(),
File "~\Anaconda3\envs\mls\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 84: character maps to <undefined>
----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in ~\Temp\pip-install-owbdvwgs\django-tailwind\
How can I add django-tailwind if I already have an app created? I wasn't able to use python manage.py tailwind init
since the app exists already.
I keep having troubles on tailwind installation and setup i do not know how to go about it
node:internal/fs/utils:320 throw err; ^ Error: ENOENT: no such file or directory, scandir 'C:\Users\Lanre Adetoro\CODE\djangoProject1\osmotheme\static_src\node_modules\node-sass\vendor' at Object.readdirSync (node:fs:1044:3)
what do you think might be the problem
This is not specifically a django-tailwind
problem, but could be a good augmentation for the documentation.
The problem I'm experiencing is that I have a Docker container for my Django project, but that container itself doesn't have node
or npm
available.
Again, I would imagine this requires more Docker training for myself rather than asking a package to do a bunch of extra work, but it would be definitely be helpful if the README could walk us through it.
Keep up the great work!
Hey guys!
When I run the command 'Python manage.py tailwind build' I get the following error:
'NODE_ENV' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! django_tailwind@ build:postcss: NODE_ENV=production postcss --config . --map false --output ../static/css/styles.css ../static/css/styles.css
npm ERR! Exit status 1
npm ERR!
Running the 'tailwind start' command works fine.
I have already set my NPM_BIN_PATH in settings.
I'm also simultaneously taking a course on tailwind for beginners.
the course provides a package.json amongst many other things for their starter templates.
I'm unsure how to place some of these files within the context of django-tailwind.
Can advise?
Let's concentrate on these 3 files: tailwind.config.js, postcss.config.js, and package.json
{
"name": "beginner-tailwind-site",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "parcel src/index.html",
"build": "parcel build src/index.html"
},
"repository": {
"type": "git",
"url": "git+https://github.com/chris-on-code/beginner-tailwind-site.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/chris-on-code/beginner-tailwind-site/issues"
},
"homepage": "https://github.com/chris-on-code/beginner-tailwind-site#readme",
"dependencies": {
"tailwindcss": "^1.8.0"
},
"devDependencies": {
"parcel-bundler": "latest",
"postcss-modules": "latest",
"autoprefixer": "^9.8.6"
}
}
module.exports = {
plugins: [require("tailwindcss"), require("autoprefixer")],
};
module.exports = {
purge: ["src/**/*.html"],
theme: {
extend: {},
},
variants: {},
plugins: [],
};
I made a sass variable in sass file but in css file the actual sass is compiled!
SASS
$primary: #333;
.bg-primary {
background: $primary
}
CSS file
$primary: #333;
.bg-primary {
background: $primary
}
**Expected CSS file **
.bg-primary {
background: #333;
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.