-
Notifications
You must be signed in to change notification settings - Fork 62
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
1 parent
c205603
commit daf28f1
Showing
14 changed files
with
914 additions
and
927 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 |
---|---|---|
|
@@ -44,4 +44,5 @@ testem.log | |
.DS_Store | ||
Thumbs.db | ||
|
||
.nx/cache | ||
.nx/cache | ||
.nx/workspace-data |
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,4 +3,5 @@ | |
/dist | ||
/coverage | ||
|
||
/.nx/cache | ||
/.nx/cache | ||
/.nx/workspace-data |
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,66 @@ | ||
import esbuild from 'esbuild'; | ||
import ImportGlobPlugin from 'esbuild-plugin-import-glob'; | ||
import fs from 'node:fs'; | ||
import path from 'node:path'; | ||
import { fileURLToPath } from 'node:url'; | ||
import yargs from 'yargs'; | ||
|
||
const CURRENT_DIR = path.dirname(fileURLToPath(import.meta.url)); | ||
const OUT_DIR = path.resolve(CURRENT_DIR, '../../dist/apps/benchmark/'); | ||
|
||
const argv = yargs(process.argv) | ||
.options({ | ||
watch: { type: 'boolean', default: false }, | ||
}) | ||
.parseSync(); | ||
|
||
/** @type {esbuild.Plugin} */ | ||
const WatchRebuildPlugin = { | ||
name: 'watch-rebuild', | ||
setup(build) { | ||
build.onEnd(result => { | ||
if (result.errors.length === 0) { | ||
console.log('Rebuild was successful, watching for changes...'); | ||
} | ||
|
||
console.log(`Rebuild ended with ${result.errors.length} errors`); | ||
console.log( | ||
[result.errors, result.warnings] | ||
.flat() | ||
.map(e => e.text) | ||
.join('\n'), | ||
); | ||
}); | ||
}, | ||
}; | ||
|
||
/** @type {esbuild.BuildOptions} */ | ||
const esbuildConfig = { | ||
entryPoints: ['./src/index.tsx'], | ||
outfile: path.join(OUT_DIR, 'bundle.js'), | ||
minify: true, | ||
bundle: true, | ||
|
||
plugins: /** @type {esbuild.Plugin[]} */ ( | ||
[argv.watch && WatchRebuildPlugin, ImportGlobPlugin.default()].filter(Boolean) | ||
), | ||
}; | ||
|
||
async function copyIndexHtml() { | ||
await fs.promises.copyFile(path.resolve(CURRENT_DIR, './index.html'), path.join(OUT_DIR, 'index.html')); | ||
} | ||
|
||
if (argv.watch) { | ||
const context = await esbuild.context(esbuildConfig); | ||
|
||
await copyIndexHtml(); | ||
await context.watch(); | ||
} else { | ||
try { | ||
await esbuild.build(esbuildConfig); | ||
await copyIndexHtml(); | ||
} catch (e) { | ||
console.error(e); | ||
process.exit(1); | ||
} | ||
} |
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
7 changes: 7 additions & 0 deletions
7
change/@griffel-jest-serializer-2e0f1b09-c42e-43b9-9c5c-87b88239c2e5.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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "chore: bump Nx to 19.3.2", | ||
"packageName": "@griffel/jest-serializer", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
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
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
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.