Skip to content
This repository has been archived by the owner on May 27, 2022. It is now read-only.

Commit

Permalink
Update packages
Browse files Browse the repository at this point in the history
  • Loading branch information
zaknesler committed Dec 18, 2018
1 parent 09c249e commit bc692c6
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 20 deletions.
36 changes: 17 additions & 19 deletions src/Tailwind.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ protected static function installAuthRoutes()
protected static function updatePackageArray(array $packages)
{
return [
'axios' => '^0.18.0',
'cross-env' => '^5.2.0',
'laravel-mix' => '^2.1.14',
'laravel-mix-purgecss' => '^3.0.0',
'less' => '^3.8.1',
'less-loader' => '^4.1.0',
'tailwindcss' => '^0.7.2',
'vue' => '^2.5.17',
'axios' => '^0.18',
'cross-env' => '^5.2',
'laravel-mix' => '^4.0',
'laravel-mix-purgecss' => '^3.0',
'less' => '^3.9',
'less-loader' => '^4.1',
'tailwindcss' => '^0.7',
'vue' => '^2.5',
];
}

Expand All @@ -111,17 +111,12 @@ protected static function compileControllerStub()
*/
protected static function ensureResourceDirectoriesExist()
{
if (! file_exists(resource_path('less'))) {
File::makeDirectory(resource_path('less'), 0755, true);
}

if (! file_exists(resource_path('js'))) {
File::makeDirectory(resource_path('js'), 0755, true);
}

if (! file_exists(resource_path('js/components'))) {
File::makeDirectory(resource_path('js/components'), 0755, true);
}
collect(['less', 'js', 'js/components'])
->each(function($dir) {
if (! file_exists(resource_path($dir))) {
File::makeDirectory(resource_path($dir), 0755, true);
}
});
}

/**
Expand All @@ -131,6 +126,9 @@ protected static function ensureResourceDirectoriesExist()
*/
protected static function installScripts()
{
File::delete(base_path('tailwind.js'));
File::delete(base_path('webpack.mix.js'));

copy(__DIR__.'/stubs/tailwind.stub', base_path('tailwind.js'));
copy(__DIR__.'/stubs/webpack.stub', base_path('webpack.mix.js'));

Expand Down
25 changes: 25 additions & 0 deletions src/stubs/tailwind.stub
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ module.exports = {
| provided by the platform.
|
| Class name: .font-{name}
| CSS property: font-family
|
*/

Expand Down Expand Up @@ -246,6 +247,7 @@ module.exports = {
| prefer, be it rems, ems, pixels or other.
|
| Class name: .text-{size}
| CSS property: font-size
|
*/

Expand Down Expand Up @@ -273,6 +275,7 @@ module.exports = {
| all of these, so we recommend removing those you don't need.
|
| Class name: .font-{weight}
| CSS property: font-weight
|
*/

Expand All @@ -298,6 +301,7 @@ module.exports = {
| them in Tailwind, leadings.
|
| Class name: .leading-{size}
| CSS property: line-height
|
*/

Expand All @@ -318,6 +322,7 @@ module.exports = {
| them in Tailwind, tracking.
|
| Class name: .tracking-{size}
| CSS property: letter-spacing
|
*/

Expand All @@ -338,6 +343,7 @@ module.exports = {
| independently if that makes sense for your project.
|
| Class name: .text-{color}
| CSS property: color
|
*/

Expand All @@ -354,6 +360,7 @@ module.exports = {
| these independently if that makes sense for your project.
|
| Class name: .bg-{color}
| CSS property: background-color
|
*/

Expand All @@ -370,6 +377,7 @@ module.exports = {
| that are specific to your project here as well.
|
| Class name: .bg-{size}
| CSS property: background-size
|
*/

Expand All @@ -390,6 +398,7 @@ module.exports = {
| width that will be used when you do not specify a border width.
|
| Class name: .border{-side?}{-width?}
| CSS property: border-width
|
*/

Expand All @@ -416,6 +425,7 @@ module.exports = {
| specify a border color.
|
| Class name: .border-{color}
| CSS property: border-color
|
*/

Expand All @@ -435,6 +445,7 @@ module.exports = {
| a good idea to put it first so other values are able to override it.
|
| Class name: .rounded{-side?}{-size?}
| CSS property: border-radius
|
*/

Expand Down Expand Up @@ -464,6 +475,7 @@ module.exports = {
| awesome classes like .w-2/3.
|
| Class name: .w-{size}
| CSS property: width
|
*/

Expand Down Expand Up @@ -512,6 +524,7 @@ module.exports = {
| needed.
|
| Class name: .h-{size}
| CSS property: height
|
*/

Expand Down Expand Up @@ -548,6 +561,7 @@ module.exports = {
| these values as needed.
|
| Class name: .min-w-{size}
| CSS property: min-width
|
*/

Expand All @@ -568,6 +582,7 @@ module.exports = {
| values as needed.
|
| Class name: .min-h-{size}
| CSS property: min-height
|
*/

Expand All @@ -590,6 +605,7 @@ module.exports = {
| modify these values as needed.
|
| Class name: .max-w-{size}
| CSS property: max-width
|
*/

Expand Down Expand Up @@ -618,6 +634,7 @@ module.exports = {
| these values as needed.
|
| Class name: .max-h-{size}
| CSS property: max-height
|
*/

Expand All @@ -639,6 +656,7 @@ module.exports = {
| values as needed.
|
| Class name: .p{side?}-{size}
| CSS property: padding
|
*/

Expand Down Expand Up @@ -674,6 +692,7 @@ module.exports = {
| values as needed.
|
| Class name: .m{side?}-{size}
| CSS property: margin
|
*/

Expand Down Expand Up @@ -709,6 +728,7 @@ module.exports = {
| values as needed.
|
| Class name: .-m{side?}-{size}
| CSS property: margin
|
*/

Expand Down Expand Up @@ -744,6 +764,7 @@ module.exports = {
| suffixed `.shadow` utility.
|
| Class name: .shadow-{size?}
| CSS property: box-shadow
|
*/

Expand All @@ -767,6 +788,7 @@ module.exports = {
| values as needed.
|
| Class name: .z-{index}
| CSS property: z-index
|
*/

Expand All @@ -791,6 +813,7 @@ module.exports = {
| values as needed.
|
| Class name: .opacity-{name}
| CSS property: opacity
|
*/

Expand All @@ -814,6 +837,7 @@ module.exports = {
| generated CSS file size down.
|
| Class name: .fill-{name}
| CSS property: fill
|
*/

Expand All @@ -833,6 +857,7 @@ module.exports = {
| keep the generated CSS file size down.
|
| Class name: .stroke-{name}
| CSS property: stroke
|
*/

Expand Down
3 changes: 2 additions & 1 deletion src/stubs/webpack.stub
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
require('laravel-mix-purgecss')

const mix = require('laravel-mix')
const tailwind = require('tailwindcss')
require('laravel-mix-purgecss')

mix.setPublicPath('public')
.less('resources/less/app.less', 'public/css')
Expand Down

0 comments on commit bc692c6

Please sign in to comment.