forked from saade/filament-fullcalendar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
914 additions
and
1,627 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import esbuild from 'esbuild' | ||
|
||
const isDev = process.argv.includes('--dev') | ||
|
||
async function compile(options) { | ||
const context = await esbuild.context(options) | ||
|
||
if (isDev) { | ||
await context.watch() | ||
} else { | ||
await context.rebuild() | ||
await context.dispose() | ||
} | ||
} | ||
|
||
const defaultOptions = { | ||
define: { | ||
'process.env.NODE_ENV': isDev ? `'development'` : `'production'`, | ||
}, | ||
bundle: true, | ||
mainFields: ['module', 'main'], | ||
platform: 'neutral', | ||
sourcemap: isDev ? 'inline' : false, | ||
sourcesContent: isDev, | ||
treeShaking: true, | ||
target: ['es2020'], | ||
minify: !isDev, | ||
plugins: [{ | ||
name: 'watchPlugin', | ||
setup: function (build) { | ||
build.onStart(() => { | ||
console.log(`Build started at ${new Date(Date.now()).toLocaleTimeString()}: ${build.initialOptions.outfile}`) | ||
}) | ||
|
||
build.onEnd((result) => { | ||
if (result.errors.length > 0) { | ||
console.log(`Build failed at ${new Date(Date.now()).toLocaleTimeString()}: ${build.initialOptions.outfile}`, result.errors) | ||
} else { | ||
console.log(`Build finished at ${new Date(Date.now()).toLocaleTimeString()}: ${build.initialOptions.outfile}`) | ||
} | ||
}) | ||
} | ||
}, | ||
{ | ||
name: 'empty-css-imports', | ||
setup(build) { | ||
build.onLoad({ filter: /\.css$/ }, () => ({ contents: '' })) | ||
}, | ||
}], | ||
} | ||
|
||
compile({ | ||
...defaultOptions, | ||
entryPoints: ['./resources/js/filament-fullcalendar.js'], | ||
outfile: './dist/filament-fullcalendar.js', | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,11 +8,13 @@ | |
], | ||
"homepage": "https://github.com/saade/filament-fullcalendar", | ||
"license": "MIT", | ||
"authors": [{ | ||
"name": "Saade", | ||
"email": "[email protected]", | ||
"role": "Developer" | ||
}], | ||
"authors": [ | ||
{ | ||
"name": "Saade", | ||
"email": "[email protected]", | ||
"role": "Developer" | ||
} | ||
], | ||
"require": { | ||
"php": "^8.0", | ||
"filament/filament": "^3.0", | ||
|
@@ -57,12 +59,9 @@ | |
"laravel": { | ||
"providers": [ | ||
"Saade\\FilamentFullCalendar\\FilamentFullCalendarServiceProvider" | ||
], | ||
"aliases": { | ||
"FilamentFullCalendar": "Saade\\FilamentFullCalendar\\Facades\\FilamentFullCalendar" | ||
} | ||
] | ||
} | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": true | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.