generated from spatie/package-skeleton-laravel
-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from saade/feat/v3-support
v3 support
- Loading branch information
Showing
38 changed files
with
6,066 additions
and
685 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
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 |
---|---|---|
@@ -1,14 +1,13 @@ | ||
.DS_Store | ||
.idea | ||
.php_cs | ||
.php_cs.cache | ||
.phpunit.result.cache | ||
.vscode | ||
build | ||
composer.lock | ||
coverage | ||
docs | ||
node_modules | ||
phpunit.xml | ||
phpstan.neon | ||
testbench.yaml | ||
vendor | ||
node_modules | ||
.php-cs-fixer.cache |
This file was deleted.
Oops, something went wrong.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,50 @@ | ||
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}`) | ||
} | ||
}) | ||
} | ||
}], | ||
} | ||
|
||
compile({ | ||
...defaultOptions, | ||
entryPoints: ['./resources/js/index.js'], | ||
outfile: './resources/dist/filament-laravel-log.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
Oops, something went wrong.