-
Notifications
You must be signed in to change notification settings - Fork 200
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
Update makefile section in tailwindcss #1890
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -97,8 +97,13 @@ We also need a CSS entry point for Tailwind. Create a new file at `tailwind/app. | |||||
We need to add a new build command for starting a tailwind build process to our `Makefile`. For that append this to the `Makefile` in your project: | ||||||
|
||||||
```makefile | ||||||
tailwind-dev: | ||||||
tailwindcss -c tailwind/tailwind.config.js -i ./tailwind/app.css -o static/app.css --watch | ||||||
# Install npm packages. We have `NODE_ENV=production` so it won't install `devDependencies` | ||||||
node_modules: | ||||||
NODE_ENV=production npm ci | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So it doesn't install devDependencies |
||||||
|
||||||
# We rely on the `node_modules`. So if `node_modules` directory doesn't exist, calling `make tailwind-dev` will trigger `make node_modules`. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
As make |
||||||
tailwind-dev: node_modules | ||||||
node_modules/.bin/tailwindcss -c tailwind/tailwind.config.js -i ./tailwind/app.css -o static/app.css --watch | ||||||
``` | ||||||
|
||||||
**Make requires tab characters instead of 4 spaces in the second line. Make sure you're using a tab character when pasting this into the file** | ||||||
|
@@ -108,8 +113,8 @@ This defines a new command `make tailwind-dev` that runs `npx tailwindcss build` | |||||
For production builds, we also need a new make target: | ||||||
|
||||||
```makefile | ||||||
static/app.css: | ||||||
tailwindcss -c tailwind/tailwind.config.js -i ./tailwind/app.css -o static/app.css --minify | ||||||
static/app.css: node_modules | ||||||
NODE_ENV=production node_modules/.bin/tailwind -c tailwind/tailwind.config.js -i ./tailwind/app.css -o static/app.css --minify | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AFAIK |
||||||
``` | ||||||
|
||||||
**Make requires tab characters instead of 4 spaces in the second line. Make sure you're using a tab character when pasting this into the file** | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likely because you already have a node_modules directory. Can you delete it and try again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tried again (using this PR), but the same message