Use ESM module syntax

This commit is contained in:
Dan Harrin
2023-06-12 15:23:12 +01:00
parent 4698792914
commit 90064d2eb2
16 changed files with 646 additions and 628 deletions
+597 -589
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,5 +1,5 @@
{
"/app.js": "/app.js?id=fcda8e0c18f50f4cb756f09547f0811c",
"/app.js": "/app.js?id=840a20d9c51be9710735091577e4160f",
"/echo.js": "/echo.js?id=19f331c9f76ec80cb5e5e344fef18d68",
"/app.css": "/app.css?id=ceb9a486dfc44ebe8adaa3bd510821e8"
}
+7 -5
View File
@@ -86,9 +86,11 @@ To finish installing Tailwind, you must create a new `tailwind.config.js` file i
In `tailwind.config.js`, register the plugins you installed, and add custom colors used by the form builder:
```js
const colors = require('tailwindcss/colors') // [tl! focus]
import colors from 'tailwindcss/colors' // [tl! focus:start]
import forms from '@tailwindcss/forms'
import typography from '@tailwindcss/typography' // [tl! focus:end]
module.exports = {
export default {
content: [
'./resources/**/*.blade.php',
'./vendor/filament/**/*.blade.php', // [tl! focus]
@@ -105,8 +107,8 @@ module.exports = {
},
},
plugins: [
require('@tailwindcss/forms'), // [tl! focus:start]
require('@tailwindcss/typography'), // [tl! focus:end]
forms, // [tl! focus:start]
typography, // [tl! focus:end]
],
}
```
@@ -135,7 +137,7 @@ export default defineConfig({
And add Tailwind to the `postcss.config.js` file:
```js
module.exports = {
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
+3 -3
View File
@@ -28706,12 +28706,12 @@ var Masked = class {
break;
details.aggregate(d);
}
if (checkTail != null) {
details.tailShift += this.appendTail(checkTail).tailShift;
}
if ((this.eager === true || this.eager === "append") && flags !== null && flags !== void 0 && flags.input && str) {
details.aggregate(this._appendEager());
}
if (checkTail != null) {
details.tailShift += this.appendTail(checkTail).tailShift;
}
return details;
}
remove() {
+7 -5
View File
@@ -57,9 +57,11 @@ To finish installing Tailwind, you must create a new `tailwind.config.js` file i
In `tailwind.config.js`, register the plugins you installed, and add custom colors used by the form builder:
```js
const colors = require('tailwindcss/colors') // [tl! focus]
import colors from 'tailwindcss/colors' // [tl! focus:start]
import forms from '@tailwindcss/forms'
import typography from '@tailwindcss/typography' // [tl! focus:end]
module.exports = {
export default {
content: [
'./resources/**/*.blade.php',
'./vendor/filament/**/*.blade.php', // [tl! focus]
@@ -75,8 +77,8 @@ module.exports = {
},
},
plugins: [
require('@tailwindcss/forms'), // [tl! focus:start]
require('@tailwindcss/typography'), // [tl! focus:end]
forms, // [tl! focus:start]
typography, // [tl! focus:end]
],
}
```
@@ -98,7 +100,7 @@ npm install autoprefixer --save-dev
Create a `postcss.config.js` file in the root of your project, and register Tailwind CSS and Autoprefixer as plugins:
```js
module.exports = {
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
@@ -1,4 +1,4 @@
module.exports = {
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
@@ -1,6 +1,8 @@
const colors = require('tailwindcss/colors')
import colors from 'tailwindcss/colors'
import forms from '@tailwindcss/forms'
import typography from '@tailwindcss/typography'
module.exports = {
export default {
content: ['./resources/**/*.blade.php', './vendor/filament/**/*.blade.php'],
theme: {
extend: {
@@ -13,7 +15,7 @@ module.exports = {
},
},
plugins: [
require('@tailwindcss/forms'),
require('@tailwindcss/typography'),
forms,
typography,
],
}
@@ -56,9 +56,9 @@ To finish installing Tailwind, you must create a new `tailwind.config.js` file i
In `tailwind.config.js`, add custom colors used by notifications:
```js
const colors = require('tailwindcss/colors') // [tl! focus]
import colors from 'tailwindcss/colors' // [tl! focus]
module.exports = {
export default {
content: [
'./resources/**/*.blade.php',
'./vendor/filament/**/*.blade.php', // [tl! focus]
@@ -93,7 +93,7 @@ npm install autoprefixer --save-dev
Create a `postcss.config.js` file in the root of your project, and register Tailwind CSS and Autoprefixer as plugins:
```js
module.exports = {
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
@@ -1,4 +1,4 @@
module.exports = {
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
@@ -1,6 +1,6 @@
const colors = require('tailwindcss/colors')
import colors from 'tailwindcss/colors'
module.exports = {
export default {
content: ['./resources/**/*.blade.php', './vendor/filament/**/*.blade.php'],
theme: {
extend: {
+7 -5
View File
@@ -56,9 +56,11 @@ To finish installing Tailwind, you must create a new `tailwind.config.js` file i
In `tailwind.config.js`, register the plugins you installed, and add custom colors used by the table builder:
```js
const colors = require('tailwindcss/colors') // [tl! focus]
import colors from 'tailwindcss/colors' // [tl! focus:start]
import forms from '@tailwindcss/forms'
import typography from '@tailwindcss/typography' // [tl! focus:end]
module.exports = {
export default {
content: [
'./resources/**/*.blade.php',
'./vendor/filament/**/*.blade.php', // [tl! focus]
@@ -74,8 +76,8 @@ module.exports = {
},
},
plugins: [
require('@tailwindcss/forms'), // [tl! focus:start]
require('@tailwindcss/typography'), // [tl! focus:end]
forms, // [tl! focus:start]
typography, // [tl! focus:end]
],
}
```
@@ -97,7 +99,7 @@ npm install autoprefixer --save-dev
Create a `postcss.config.js` file in the root of your project, and register Tailwind CSS and Autoprefixer as plugins:
```js
module.exports = {
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
+2 -2
View File
@@ -365,7 +365,7 @@ protected function getTableRecordClassesUsing(): ?Closure
These classes are not automatically compiled by Tailwind CSS. If you want to apply Tailwind CSS classes that are not already used in Blade files, you should update your `content` configuration in `tailwind.config.js` to also scan for classes in your desired PHP files:
```js
module.exports = {
export default {
content: ['./app/Filament/**/*.php'],
}
```
@@ -373,7 +373,7 @@ module.exports = {
Alternatively, you may add the classes to your [safelist](https://tailwindcss.com/docs/content-configuration#safelisting-classes):
```js
module.exports = {
export default {
safelist: [
'border-green-600',
'border-l-2',
@@ -1,4 +1,4 @@
module.exports = {
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
@@ -1,6 +1,8 @@
const colors = require('tailwindcss/colors')
import colors from 'tailwindcss/colors'
import forms from '@tailwindcss/forms'
import typography from '@tailwindcss/typography'
module.exports = {
export default {
content: ['./resources/**/*.blade.php', './vendor/filament/**/*.blade.php'],
theme: {
extend: {
@@ -13,7 +15,7 @@ module.exports = {
},
},
plugins: [
require('@tailwindcss/forms'),
require('@tailwindcss/typography'),
forms,
typography,
],
}