Skip to content
This repository has been archived by the owner on Jul 12, 2021. It is now read-only.

Commit

Permalink
refactor: use laravel-tailwindcss preset
Browse files Browse the repository at this point in the history
  • Loading branch information
innocenzi committed Aug 3, 2020
1 parent 1b40aeb commit 2a1516f
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 175 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Install preset
run: |
cd ../app
npx use-preset laravel-tall --auth --debug
npx use-preset laravel-tall --auth --debug --no-interaction
- name: Install dependencies
run: |
Expand Down
20 changes: 9 additions & 11 deletions src/preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@ const { Preset } = require('use-preset');
module.exports = Preset.make('Laravel TALL')
.option('auth', false)
.option('pagination', true)
.option('interaction', true)

.apply('use-preset/laravel-tailwindcss')
.with('--no-interaction')
.title('Add Tailwind CSS from its preset')
.chain()

.editJson('package.json')
.title('Add Tailwind and Alpine')
.title('Add Alpine.js, remove Lodash & Axios')
.merge({
devDependencies: {
'@tailwindcss/ui': '^0.3',
'@tailwindcss/typography': '^0.2',
alpinejs: '^2',
tailwindcss: '^1',
'postcss-nested': '^4',
'postcss-import': '^12',
},
})
.delete(['devDependencies.lodash', 'devDependencies.axios'])
Expand All @@ -28,11 +29,6 @@ module.exports = Preset.make('Laravel TALL')
}
})
.chain()

.delete()
.title('Delete SASS')
.directories('resources/sass')
.chain()

.copyDirectory('default')
.to('/')
Expand Down Expand Up @@ -71,11 +67,13 @@ module.exports = Preset.make('Laravel TALL')
.chain()

.installDependencies()
.if(({ flags }) => Boolean(flags.interaction))
.for('node')
.title('Install node dependencies')
.chain()

.updateDependencies()
.if(({ flags }) => Boolean(flags.interaction))
.for('php')
.title('Install PHP dependencies')
.chain();
18 changes: 0 additions & 18 deletions templates/default/postcss.config.js

This file was deleted.

40 changes: 0 additions & 40 deletions templates/default/resources/css/app.css

This file was deleted.

26 changes: 0 additions & 26 deletions templates/default/resources/css/base.css

This file was deleted.

9 changes: 0 additions & 9 deletions templates/default/resources/css/components.css

This file was deleted.

36 changes: 0 additions & 36 deletions templates/default/tailwind.config.js

This file was deleted.

22 changes: 0 additions & 22 deletions templates/default/webpack.mix.js

This file was deleted.

30 changes: 18 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@
chalk "^2.0.0"
js-tokens "^4.0.0"

"@hapi/bourne@^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@hapi/bourne/-/bourne-2.0.0.tgz#5bb2193eb685c0007540ca61d166d4e1edaf918d"
integrity sha512-WEezM1FWztfbzqIUbsDzFRVMxSoLy3HugVcux6KDDtTqzPsLE8NDRHfXvev66aH1i2oOKKar3/XDjbvh/OUBdg==

"@kwsites/file-exists@^1.1.1":
version "1.1.1"
resolved "https://registry.yarnpkg.com/@kwsites/file-exists/-/file-exists-1.1.1.tgz#ad1efcac13e1987d8dbaf235ef3be5b0d96faa99"
integrity sha512-m9/5YGR18lIwxSFDwfE3oA7bWuq9kdau6ugN4H2rJeyhFQZcG9AgSHkQtSD15a8WvTgfz9aikZMrKPHvbpqFiw==
dependencies:
debug "^4.1.1"

"@kwsites/promise-deferred@^1.1.1":
version "1.1.1"
resolved "https://registry.yarnpkg.com/@kwsites/promise-deferred/-/promise-deferred-1.1.1.tgz#8ace5259254426ccef57f3175bc64ed7095ed919"
integrity sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==

"@nodelib/fs.scandir@2.1.3":
version "2.1.3"
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b"
Expand All @@ -57,12 +57,12 @@
fastq "^1.6.0"

"@poppinss/utils@^2.2.6":
version "2.2.7"
resolved "https://registry.yarnpkg.com/@poppinss/utils/-/utils-2.2.7.tgz#709c3c45a4474627fdf17a16accdddd93a8e3370"
integrity sha512-ZykSMAGCQvo3JThhtCdV/YCvLpAHDDQ487+HQo8znGg/NNI7UGmrkrvqifUWmyzKeJzolJPiyhZgjmzif+Xwxw==
version "2.5.2"
resolved "https://registry.yarnpkg.com/@poppinss/utils/-/utils-2.5.2.tgz#0ed740234cb82f62a7d14ceab39b17b5d520d76c"
integrity sha512-NrBtC977jTSyQdkH2YskEsUmJsu7rpZpCf+NZao6wkq/ANaydkVIFdYUmKGd2/K0xzZ/YZmZ+mUtI0m8VlaFFg==
dependencies:
"@hapi/bourne" "^2.0.0"
buffer-alloc "^1.2.0"
fast-safe-stringify "^2.0.7"
fs-readdir-recursive "^1.1.0"
ms "^2.1.2"
require-all "^3.0.0"
Expand Down Expand Up @@ -638,6 +638,11 @@ fast-glob@^3.2.4:
micromatch "^4.0.2"
picomatch "^2.2.1"

fast-safe-stringify@^2.0.7:
version "2.0.7"
resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz#124aa885899261f68aedb42a7c080de9da608743"
integrity sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==

fastq@^1.6.0:
version "1.8.0"
resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.8.0.tgz#550e1f9f59bbc65fe185cb6a9b4d95357107f481"
Expand Down Expand Up @@ -1673,11 +1678,12 @@ signal-exit@^3.0.0, signal-exit@^3.0.2:
integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==

simple-git@^2.7.0:
version "2.10.0"
resolved "https://registry.yarnpkg.com/simple-git/-/simple-git-2.10.0.tgz#9b9b6af5c7660b8ede5636296cc78774f85ac636"
integrity sha512-/lqaK+C7FwGe3du9E9gIIMjpRSPif71Ct80cYqpevdLGSU9LJXL+CBf2tT6bxXgmp/i3NsOj37jP43KjhlEZIA==
version "2.17.0"
resolved "https://registry.yarnpkg.com/simple-git/-/simple-git-2.17.0.tgz#541205913734018d32d051af847ad9fec2f95901"
integrity sha512-l2F16fJvHWSx+E1C8WduwpNDfqf+JDD8nsEaD5szUZlbz5Y6paSnR4wlGxIa6Mr6I4kl3F9QmTaPIQjSxlcafA==
dependencies:
"@kwsites/file-exists" "^1.1.1"
"@kwsites/promise-deferred" "^1.1.1"
debug "^4.1.1"

slice-ansi@^3.0.0:
Expand Down

0 comments on commit 2a1516f

Please sign in to comment.