-
Notifications
You must be signed in to change notification settings - Fork 800
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Boost: Add "load default strings" to excludes in concatenate UI (#40496)
Co-authored-by: Adnan Haque <[email protected]>
- Loading branch information
Showing
6 changed files
with
101 additions
and
77 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
projects/plugins/boost/app/assets/src/js/features/minify-meta/lib/stores.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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { z } from 'zod'; | ||
import { useDataSync } from '@automattic/jetpack-react-data-sync-client'; | ||
|
||
const MinifyDefaults = z.array( z.string() ); | ||
type MinifyDefaults = z.infer< typeof MinifyDefaults >; | ||
|
||
export function useMinifyDefaults( | ||
preferenceDSKey: 'minify_js_excludes' | 'minify_css_excludes' | ||
): MinifyDefaults | undefined { | ||
const [ { data } ] = useDataSync( | ||
'jetpack_boost_ds', | ||
`${ preferenceDSKey }_default`, | ||
MinifyDefaults | ||
); | ||
|
||
return 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
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: added | ||
|
||
Concatenate JS/CSS: Add a button that allows loading default excludes. |
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