Skip to content

Commit 5cb8f1e

Browse files
Merge pull request #48 from rverrips/master
Updated Views for Tailwindcss v1
2 parents c2c1cb6 + fb51206 commit 5cb8f1e

22 files changed

+136
-82
lines changed

README.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,30 @@
22

33
A Laravel front-end scaffolding preset for [Tailwind CSS](https://tailwindcss.com) - a Utility-First CSS Framework for Rapid UI Development.
44

5-
*Current version:* **Tailwind CSS 0.6.6**
5+
*Current version:* **Tailwind CSS 1.0**
66

77
## Usage
88

99
1. Fresh install Laravel >= 5.7.0 and cd to your app.
1010
2. Install this preset via `composer require laravel-frontend-presets/tailwindcss`. Laravel will automatically discover this package. No need to register the service provider.
11-
3. Use `php artisan preset tailwindcss` for the basic Tailwind CSS preset OR use `php artisan preset tailwindcss-auth` for the basic preset, auth route entry and Tailwind CSS auth views in one go. (NOTE: If you run this command several times, be sure to clean up the duplicate Auth entries in `routes/web.php`)
12-
4. `npm install && npm run dev && npm run dev` (this is required twice, due to the way that `laravel-mix-tailwind` installs the Tailwind CSS dependency)
11+
12+
### For Presets without Authentication
13+
14+
1. Use `php artisan preset tailwindcss` for the basic Tailwind CSS preset
15+
2. `npm install && npm run dev`
16+
3. `php artisan serve` (or equivalent) to run server and test preset.
17+
18+
### For Presets with Authentication
19+
20+
1. Use `php artisan preset tailwindcss-auth` for the basic preset, auth route entry and Tailwind CSS auth views in one go. (NOTE: If you run this command several times, be sure to clean up the duplicate Auth entries in `routes/web.php`)
21+
4. `npm install && npm run dev`
1322
5. Configure your favorite database (mysql, sqlite etc.)
1423
6. `php artisan migrate` to create basic user tables.
1524
7. `php artisan serve` (or equivalent) to run server and test preset.
1625

1726
### Config
1827

19-
The default `tailwind.js` configuration file included by this package simply uses the config from the Tailwind vendor files. Should you wish to make changes, you should remove the file and run `node_modules/.bin/tailwind init`, which will generate a fresh configuration file for you, which you are free to change to suit your needs.
28+
The default `tailwind.config.js` configuration file included by this package simply uses the config from the Tailwind vendor files. Should you wish to make changes, you should remove the file and run `node_modules/.bin/tailwind init`, which will generate a fresh configuration file for you, which you are free to change to suit your needs.
2029

2130
### Screenshots
2231

@@ -26,8 +35,6 @@ The default `tailwind.js` configuration file included by this package simply use
2635

2736
![Login](/screenshots/login.png)
2837

29-
![Send Password Reset](/screenshots/send-password-reset.png)
30-
3138
![Reset Password](/screenshots/reset-password.png)
3239

3340
![Dashboard](/screenshots/dashboard.png)

screenshots/dashboard.png

-71.8 KB
Loading

screenshots/login.png

-81.3 KB
Loading

screenshots/register.png

-85.2 KB
Loading

screenshots/reset-password.png

-84.4 KB
Loading

screenshots/send-password-reset.png

-108 KB
Binary file not shown.

screenshots/verify.png

-56 KB
Loading

screenshots/welcome.png

-70.4 KB
Loading

src/TailwindCssPreset.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,13 @@ protected static function updatePackageArray(array $packages)
3030
'laravel-mix' => '^4.0.14',
3131
'laravel-mix-purgecss' => '^4.1',
3232
'laravel-mix-tailwind' => '^0.1.0',
33-
'tailwindcss' => '^0.7.4',
33+
'tailwindcss' => 'next',
3434
'vue' => '^2.5.17',
3535
'vue-template-compiler' => '^2.6.4',
3636
], Arr::except($packages, [
3737
'bootstrap',
3838
'bootstrap-sass',
39+
'popper.js',
3940
'laravel-mix',
4041
'jquery',
4142
]));
@@ -58,7 +59,7 @@ protected static function updateStyles()
5859

5960
protected static function updateBootstrapping()
6061
{
61-
copy(__DIR__.'/tailwindcss-stubs/tailwind.js', base_path('tailwind.js'));
62+
copy(__DIR__.'/tailwindcss-stubs/tailwind.config.js', base_path('tailwind.config.js'));
6263

6364
copy(__DIR__.'/tailwindcss-stubs/webpack.mix.js', base_path('webpack.mix.js'));
6465

src/tailwindcss-stubs/resources/css/app.css

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33
* Normalize.css and some additional base styles.
44
*
55
* You can see the styles here:
6-
* https://github.com/tailwindcss/tailwindcss/blob/master/css/preflight.css
6+
* https://github.com/tailwindcss/tailwindcss/blob/master/css/base.css
7+
*
8+
* If using `postcss-import`, use this import instead:
9+
*
10+
* @import "tailwindcss/base";
711
*/
8-
@tailwind preflight;
12+
@tailwind base;
913

1014
/**
1115
* This injects any component classes registered by plugins.
@@ -26,7 +30,7 @@
2630
* .btn { ... }
2731
* .form-input { ... }
2832
*
29-
* Or if using a preprocessor:
33+
* Or if using a preprocessor or `postcss-import`:
3034
*
3135
* @import "components/buttons";
3236
* @import "components/forms";

0 commit comments

Comments
 (0)