-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ improve(patch): build performance (#2596)
- **🧹 chore(none): additional examples** - **🔨 improve(patch): improve build performance** - **🔨 improve(patch): add react error boundary**
- Loading branch information
1 parent
35861a7
commit 63225e4
Showing
421 changed files
with
7,549 additions
and
3,916 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
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
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,14 @@ | ||
import type {UserConfig} from 'vitest' | ||
|
||
import {env} from 'node:process' | ||
|
||
import GithubActionsReporter from 'vitest-github-actions-reporter' | ||
|
||
const reporters: Array<any> = [`basic`] | ||
if (env.GITHUB_ACTIONS) reporters.push(new GithubActionsReporter()) | ||
|
||
const shared = { | ||
export default { | ||
hookTimeout: 240000, | ||
reporters, | ||
reporters: env.GITHUB_ACTIONS | ||
? [`basic`, new GithubActionsReporter()] | ||
: [`basic`], | ||
testTimeout: 240000, | ||
} | ||
|
||
export default shared | ||
watch: false, | ||
} satisfies UserConfig |
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 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
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,13 +1,13 @@ | ||
{ | ||
entry: ["app", ["app.js"]], | ||
"entry": ["app", ["app.js"]], | ||
|
||
/** | ||
* Comments are okay | ||
*/ | ||
babel: { | ||
setPluginOptions: [ | ||
"babel": { | ||
"setPluginOptions": [ | ||
"@babel/plugin-transform-runtime", | ||
{helpers: false, regenerator: false} | ||
{"helpers": false, "regenerator": false} | ||
] | ||
} | ||
} |
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
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,9 +1,6 @@ | ||
import type {Config} from 'tailwindcss' | ||
import daisyui from 'daisyui' | ||
|
||
const config: Config = { | ||
export default { | ||
content: ['src/**/*.js'], | ||
plugins: [daisyui], | ||
} | ||
|
||
export default config | ||
plugins: [await import('daisyui').then(m => m.default)], | ||
} satisfies Config |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
;['fancy', 'ecma'].map(console.log) |
File renamed without changes.
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 |
---|---|---|
|
@@ -3,5 +3,4 @@ | |
"compilerOptions": { | ||
"types": ["@roots/bud", "@roots/bud-esbuild"] | ||
}, | ||
"files": ["./bud.config.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import {bud} from '@roots/bud' | ||
|
||
bud.eslint.setRules({ | ||
'no-console': 'error', | ||
}) |
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,14 @@ | ||
{ | ||
"name": "@examples/eslint-bud-config", | ||
"$schema": "https://bud.js.org/bud.package.json", | ||
"private": true, | ||
"type": "module", | ||
"browserslist": [ | ||
"extends @roots/browserslist-config" | ||
], | ||
"devDependencies": { | ||
"@roots/bud": "workspace:*", | ||
"@roots/bud-eslint": "workspace:*", | ||
"@roots/eslint-config": "workspace:*" | ||
} | ||
} |
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 @@ | ||
console.log('error') |
4 changes: 2 additions & 2 deletions
4
examples/eslint/tsconfig.json → examples/eslint-bud-config/tsconfig.json
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,7 +1,7 @@ | ||
{ | ||
"extends": ["@roots/bud/config/tsconfig.json"], | ||
"compilerOptions": { | ||
|
||
"types": ["@roots/bud", "@roots/bud-eslint"] | ||
} | ||
}, | ||
"files": ["./bud.config.ts"] | ||
} |
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,3 +1,6 @@ | ||
module.exports = { | ||
extends: ['@roots/eslint-config'], | ||
rules: { | ||
'no-console': 'error', | ||
} | ||
} |
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,4 +1 @@ | ||
const target = document.querySelector('body') | ||
|
||
target.innerHTML = `<div><h1>Hello</h1></div>` | ||
|
||
console.log('eslint should error') |
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,4 +1,4 @@ | ||
import {factory} from '@roots/bud' | ||
import { factory } from '@roots/bud' | ||
|
||
/** | ||
* Run this example with: | ||
|
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,12 @@ | ||
{ | ||
"extends": "@roots/bud/config/tsconfig.json", | ||
"compilerOptions": { | ||
"paths": { | ||
"@src/*": ["./src/*"] | ||
}, | ||
"types": ["@roots/bud", "@roots/bud-swc"] | ||
}, | ||
"files": ["./node-script.js"], | ||
"include": ["./src"], | ||
"exclude": ["./dist"] | ||
} |
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,4 +1,4 @@ | ||
import {factory} from '@roots/bud' | ||
import { factory } from '@roots/bud' | ||
|
||
/** | ||
* Run this example with: | ||
|
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,22 +1,17 @@ | ||
// @ts-check | ||
import { bud } from '@roots/bud' | ||
|
||
/** | ||
* @param {import('@roots/bud').Bud} bud | ||
*/ | ||
export default async bud => { | ||
bud | ||
.entry({ | ||
app: ['@scripts/app', '@styles/app'], | ||
editor: ['@scripts/editor', '@styles/editor'], | ||
}) | ||
.copyDir('images') | ||
.watch(['resources/views/*.blade.php']) | ||
.serve(3000) | ||
.proxy('http://example.test') | ||
bud | ||
.entry({ | ||
app: ['@scripts/app', '@styles/app'], | ||
editor: ['@scripts/editor', '@styles/editor'], | ||
}) | ||
.copyDir('images') | ||
.watch(['resources/views/*.blade.php']) | ||
.serve(3000) | ||
.proxy('http://example.test') | ||
|
||
bud.wp.json | ||
.useTailwindColors('extend') | ||
.useTailwindFontFamily() | ||
.useTailwindFontSize() | ||
.useTailwindSpacing() | ||
} | ||
bud.wp.json | ||
.useTailwindColors('extend') | ||
.useTailwindFontFamily() | ||
.useTailwindFontSize() | ||
.useTailwindSpacing() |
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 |
---|---|---|
|
@@ -3,5 +3,4 @@ | |
"compilerOptions": { | ||
"types": ["@roots/bud", "@roots/bud-swc"] | ||
}, | ||
"files": ["./bud.config.ts"] | ||
} |
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
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.