mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-12 14:11:56 +00:00
Latest decky changed merged into i18n and updated translation.
This commit is contained in:
@@ -44,7 +44,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"decky-frontend-lib": "^3.18.10",
|
"decky-frontend-lib": "^3.18.10",
|
||||||
"i18next": "^22.0.6",
|
"i18next": "^22.0.6",
|
||||||
"i18next-fs-backend": "^2.0.0",
|
"i18next-http-backend": "^2.1.1",
|
||||||
"react-file-icon": "^1.2.0",
|
"react-file-icon": "^1.2.0",
|
||||||
"react-i18next": "^12.0.0",
|
"react-i18next": "^12.0.0",
|
||||||
"react-icons": "^4.4.0",
|
"react-icons": "^4.4.0",
|
||||||
|
|||||||
Generated
+592
-936
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"plugin_version_label": "Plugin Version",
|
||||||
|
"plugin_full_access": "This plugin has full access to your Steam Deck.",
|
||||||
|
"plugin_install": "Install",
|
||||||
|
"plugin_no_desc": "No description provided."
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"install_title": "Install {{artifact}}",
|
||||||
|
"install_desc": "Are you sure you want to install {{artifact}} {{version}}?",
|
||||||
|
"install_button_idle": "Install",
|
||||||
|
"install_button_processing": "Installing"
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"store_tabs_title": "Browse",
|
||||||
|
"store_tabs_about": "About",
|
||||||
|
|
||||||
|
"store_tabs_alph_desc": "Alphabetical (A to Z)",
|
||||||
|
"store_tabs_alph_asce": "Alphabetical (Z to A)",
|
||||||
|
|
||||||
|
"store_sort_label": "Sort",
|
||||||
|
"store_sort_label_def": "Last Updated (Newest)",
|
||||||
|
"store_filter_label": "Filter",
|
||||||
|
"store_fiter_label_def": "All",
|
||||||
|
"store_search_label": "Search",
|
||||||
|
|
||||||
|
"store_testing_cta": "Please consider testing new plugins to help the Decky Loader team!",
|
||||||
|
"store_contrib_label": "Contributing",
|
||||||
|
"store_contrib_desc": "If you would like to contribute to the Decky Plugin Store, check the SteamDeckHomebrew/decky-plugin-template repository on GitHub. Information on development and distribution is available in the README.",
|
||||||
|
"store_source_label": "Source Code",
|
||||||
|
"store_source_desc": "All plugin source code is available on SteamDeckHomebrew/decky-plugin-database repository on GitHub."
|
||||||
|
}
|
||||||
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
"decky_update_available": "Update to {{tag_name}} available!",
|
"decky_update_available": "Update to {{tag_name}} available!",
|
||||||
"plugin_update_one": "Updates available for 1 plugin!",
|
"plugin_update_one": "Updates available for 1 plugin!",
|
||||||
"plugin_update_other": "Updates available for {{number}} plugins!",
|
"plugin_update_other": "Updates available for {{number}} plugins!",
|
||||||
"plugin_uninstall": "Uninstall {{name}}?",
|
"plugin_uninstall": "Are you sure you want to uninstall {{name}}?",
|
||||||
"plugin_load_error": "Error loading plugin {{name}}",
|
"plugin_load_error": "Error loading plugin {{name}}",
|
||||||
"plugin_load_error_toast": "Error loading {{name}}",
|
"plugin_load_error_toast": "Error loading {{name}}",
|
||||||
"error": "Error",
|
"error": "Error",
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"plugin_version_label": "Versione Plugin",
|
||||||
|
"plugin_full_access": "Questo pluugin ha accesso completo al tuo Steam Deck.",
|
||||||
|
"plugin_install": "Installa",
|
||||||
|
"plugin_no_desc": "Nessuna descrizione fornita."
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"install_title": "Installa {{artifact}}",
|
||||||
|
"install_desc": "Sei sicuro di voler installare {{artifact}} {{version}}?",
|
||||||
|
"install_button_idle": "Installa",
|
||||||
|
"install_button_processing": "Installando"
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"store_tabs_title": "Naviga",
|
||||||
|
"store_tabs_about": "About",
|
||||||
|
|
||||||
|
"store_tabs_alph_desc": "Alfabetico (A a Z)",
|
||||||
|
"store_tabs_alph_asce": "Alfabetico (Z a A)",
|
||||||
|
|
||||||
|
"store_sort_label": "Ordina",
|
||||||
|
"store_sort_label_def": "Ultimo aggiornato (Più recente)",
|
||||||
|
"store_filter_label": "Filtra",
|
||||||
|
"store_fiter_label_def": "Tutto",
|
||||||
|
"store_search_label": "Cerca",
|
||||||
|
|
||||||
|
"store_testing_cta": "Valuta la possibilità di testare nuovi plugin per aiutare il team di Decky Loader!",
|
||||||
|
"store_contrib_label": "Contribuisci",
|
||||||
|
"store_contrib_desc": "Se desideri contribuire allo store di Decky, puoi trovare un template caricato su GitHub all'indirizzo SteamDeckHomebrew/decky-plugin-template. Informazioni riguardo sviluppo e distribuzione sono disponibili nel README.",
|
||||||
|
"store_source_label": "Codice Sorgente",
|
||||||
|
"store_source_desc": "Tutto il codice sorgente dei plugin è disponibile su GitHub all'indirizzo SteamDeckHomebrew/decky-plugin-database"
|
||||||
|
}
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
import { ConfirmModal, Navigation, QuickAccessTab } from 'decky-frontend-lib';
|
import { ConfirmModal, Navigation, QuickAccessTab } from 'decky-frontend-lib';
|
||||||
import { FC, useState } from 'react';
|
import { FC, useState } from 'react';
|
||||||
|
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
const { t } = useTranslation('PluginInstallModal');
|
||||||
|
|
||||||
interface PluginInstallModalProps {
|
interface PluginInstallModalProps {
|
||||||
artifact: string;
|
artifact: string;
|
||||||
version: string;
|
version: string;
|
||||||
@@ -26,13 +29,13 @@ const PluginInstallModal: FC<PluginInstallModalProps> = ({ artifact, version, ha
|
|||||||
onCancel={async () => {
|
onCancel={async () => {
|
||||||
await onCancel();
|
await onCancel();
|
||||||
}}
|
}}
|
||||||
strTitle={`Install ${artifact}`}
|
strTitle={t("install_title", artifact)}
|
||||||
strOKButtonText={loading ? 'Installing' : 'Install'}
|
strOKButtonText={loading ? t("install_button_processing") : t("install_button_idle")}
|
||||||
>
|
>
|
||||||
{hash == 'False' ? (
|
{hash == 'False' ? (
|
||||||
<h3 style={{ color: 'red' }}>!!!!NO HASH PROVIDED!!!!</h3>
|
<h3 style={{ color: 'red' }}>!!!!NO HASH PROVIDED!!!!</h3>
|
||||||
) : (
|
) : (
|
||||||
`Are you sure you want to install ${artifact} ${version}?`
|
t("install_desc", artifact, version)
|
||||||
)}
|
)}
|
||||||
</ConfirmModal>
|
</ConfirmModal>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ const PluginCard: FC<PluginCardProps> = ({ plugin }) => {
|
|||||||
plugin.description
|
plugin.description
|
||||||
) : (
|
) : (
|
||||||
<span>
|
<span>
|
||||||
<i style={{ color: '#666' }}>No description provided.</i>
|
<i style={{ color: '#666' }}>{t("plugin_no_desc")}</i>
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
</span>
|
</span>
|
||||||
@@ -112,7 +112,7 @@ const PluginCard: FC<PluginCardProps> = ({ plugin }) => {
|
|||||||
color: '#fee75c',
|
color: '#fee75c',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<i>This plugin has full access to your Steam Deck.</i>{' '}
|
<i>{t("plugin_full_access")}</i>{' '}
|
||||||
<a
|
<a
|
||||||
className="deckyStoreCardDescriptionRootLink"
|
className="deckyStoreCardDescriptionRootLink"
|
||||||
href="https://deckbrew.xyz/root"
|
href="https://deckbrew.xyz/root"
|
||||||
@@ -149,7 +149,7 @@ const PluginCard: FC<PluginCardProps> = ({ plugin }) => {
|
|||||||
layout="below"
|
layout="below"
|
||||||
onClick={() => requestPluginInstall(plugin.name, plugin.versions[selectedOption])}
|
onClick={() => requestPluginInstall(plugin.name, plugin.versions[selectedOption])}
|
||||||
>
|
>
|
||||||
<span className="deckyStoreCardInstallText">Install</span>
|
<span className="deckyStoreCardInstallText">{t("plugin_install")}</span>
|
||||||
</ButtonItem>
|
</ButtonItem>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@@ -166,7 +166,7 @@ const PluginCard: FC<PluginCardProps> = ({ plugin }) => {
|
|||||||
label: version.name,
|
label: version.name,
|
||||||
})) as SingleDropdownOption[]
|
})) as SingleDropdownOption[]
|
||||||
}
|
}
|
||||||
menuLabel="Plugin Version"
|
menuLabel={t("plugin_version_label") as string}
|
||||||
selectedOption={selectedOption}
|
selectedOption={selectedOption}
|
||||||
onChange={({ data }) => setSelectedOption(data)}
|
onChange={({ data }) => setSelectedOption(data)}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ import {
|
|||||||
} from 'decky-frontend-lib';
|
} from 'decky-frontend-lib';
|
||||||
import { FC, useEffect, useMemo, useState } from 'react';
|
import { FC, useEffect, useMemo, useState } from 'react';
|
||||||
|
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
const { t } = useTranslation('Store');
|
||||||
|
|
||||||
import logo from '../../../assets/plugin_store.png';
|
import logo from '../../../assets/plugin_store.png';
|
||||||
import Logger from '../../logger';
|
import Logger from '../../logger';
|
||||||
import { StorePlugin, getPluginList } from '../../store';
|
import { StorePlugin, getPluginList } from '../../store';
|
||||||
@@ -54,13 +57,13 @@ const StorePage: FC<{}> = () => {
|
|||||||
}}
|
}}
|
||||||
tabs={[
|
tabs={[
|
||||||
{
|
{
|
||||||
title: 'Browse',
|
title: t("store_tabs_title"),
|
||||||
content: <BrowseTab children={{ data: data }} />,
|
content: <BrowseTab children={{ data: data }} />,
|
||||||
id: 'browse',
|
id: 'browse',
|
||||||
renderTabAddon: () => <span className={TabCount}>{data.length}</span>,
|
renderTabAddon: () => <span className={TabCount}>{data.length}</span>,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'About',
|
title: t("store_tabs_about"),
|
||||||
content: <AboutTab />,
|
content: <AboutTab />,
|
||||||
id: 'about',
|
id: 'about',
|
||||||
},
|
},
|
||||||
@@ -75,8 +78,8 @@ const StorePage: FC<{}> = () => {
|
|||||||
const BrowseTab: FC<{ children: { data: StorePlugin[] } }> = (data) => {
|
const BrowseTab: FC<{ children: { data: StorePlugin[] } }> = (data) => {
|
||||||
const sortOptions = useMemo(
|
const sortOptions = useMemo(
|
||||||
(): DropdownOption[] => [
|
(): DropdownOption[] => [
|
||||||
{ data: 1, label: 'Alphabetical (A to Z)' },
|
{ data: 1, label: t("store_tabs_alph_desc") },
|
||||||
{ data: 2, label: 'Alphabetical (Z to A)' },
|
{ data: 2, label: t("store_tabs_alph_asce") },
|
||||||
],
|
],
|
||||||
[],
|
[],
|
||||||
);
|
);
|
||||||
@@ -105,11 +108,11 @@ const BrowseTab: FC<{ children: { data: StorePlugin[] } }> = (data) => {
|
|||||||
width: '47.5%',
|
width: '47.5%',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<span className="DialogLabel">Sort</span>
|
<span className="DialogLabel">{t("store_sort_label")}</span>
|
||||||
<Dropdown
|
<Dropdown
|
||||||
menuLabel="Sort"
|
menuLabel={t("store_sort_label") as string}
|
||||||
rgOptions={sortOptions}
|
rgOptions={sortOptions}
|
||||||
strDefaultLabel="Last Updated (Newest)"
|
strDefaultLabel={t("store_sort_label_def") as string}
|
||||||
selectedOption={selectedSort}
|
selectedOption={selectedSort}
|
||||||
onChange={(e) => setSort(e.data)}
|
onChange={(e) => setSort(e.data)}
|
||||||
/>
|
/>
|
||||||
@@ -122,11 +125,11 @@ const BrowseTab: FC<{ children: { data: StorePlugin[] } }> = (data) => {
|
|||||||
marginLeft: 'auto',
|
marginLeft: 'auto',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<span className="DialogLabel">Filter</span>
|
<span className="DialogLabel">{t("store_filter_label")}</span>
|
||||||
<Dropdown
|
<Dropdown
|
||||||
menuLabel="Filter"
|
menuLabel={t("store_filter_label")}
|
||||||
rgOptions={filterOptions}
|
rgOptions={filterOptions}
|
||||||
strDefaultLabel="All"
|
strDefaultLabel={t("store_fiter_label_def")}
|
||||||
selectedOption={selectedFilter}
|
selectedOption={selectedFilter}
|
||||||
onChange={(e) => setFilter(e.data)}
|
onChange={(e) => setFilter(e.data)}
|
||||||
/>
|
/>
|
||||||
@@ -136,7 +139,7 @@ const BrowseTab: FC<{ children: { data: StorePlugin[] } }> = (data) => {
|
|||||||
<div style={{ justifyContent: 'center', display: 'flex' }}>
|
<div style={{ justifyContent: 'center', display: 'flex' }}>
|
||||||
<Focusable style={{ display: 'flex', alignItems: 'center', width: '96%' }}>
|
<Focusable style={{ display: 'flex', alignItems: 'center', width: '96%' }}>
|
||||||
<div style={{ width: '100%' }}>
|
<div style={{ width: '100%' }}>
|
||||||
<TextField label="Search" value={searchFieldValue} onChange={(e) => setSearchValue(e.target.value)} />
|
<TextField label={t("store_search_label")} value={searchFieldValue} onChange={(e) => setSearchValue(e.target.value)} />
|
||||||
</div>
|
</div>
|
||||||
</Focusable>
|
</Focusable>
|
||||||
</div>
|
</div>
|
||||||
@@ -151,11 +154,11 @@ const BrowseTab: FC<{ children: { data: StorePlugin[] } }> = (data) => {
|
|||||||
maxWidth: '100%',
|
maxWidth: '100%',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<span className="DialogLabel">Sort</span>
|
<span className="DialogLabel">{t("store_sort_label")}</span>
|
||||||
<Dropdown
|
<Dropdown
|
||||||
menuLabel="Sort"
|
menuLabel={t("store_sort_label") as string}
|
||||||
rgOptions={sortOptions}
|
rgOptions={sortOptions}
|
||||||
strDefaultLabel="Last Updated (Newest)"
|
strDefaultLabel={t("store_sort_label_def") as string}
|
||||||
selectedOption={selectedSort}
|
selectedOption={selectedSort}
|
||||||
onChange={(e) => setSort(e.data)}
|
onChange={(e) => setSort(e.data)}
|
||||||
/>
|
/>
|
||||||
@@ -165,7 +168,7 @@ const BrowseTab: FC<{ children: { data: StorePlugin[] } }> = (data) => {
|
|||||||
<div style={{ justifyContent: 'center', display: 'flex' }}>
|
<div style={{ justifyContent: 'center', display: 'flex' }}>
|
||||||
<Focusable style={{ display: 'flex', alignItems: 'center', width: '96%' }}>
|
<Focusable style={{ display: 'flex', alignItems: 'center', width: '96%' }}>
|
||||||
<div style={{ width: '100%' }}>
|
<div style={{ width: '100%' }}>
|
||||||
<TextField label="Search" value={searchFieldValue} onChange={(e) => setSearchValue(e.target.value)} />
|
<TextField label={t("store_search_label")} value={searchFieldValue} onChange={(e) => setSearchValue(e.target.value)} />
|
||||||
</div>
|
</div>
|
||||||
</Focusable>
|
</Focusable>
|
||||||
</div>
|
</div>
|
||||||
@@ -216,7 +219,7 @@ const AboutTab: FC<{}> = () => {
|
|||||||
/>
|
/>
|
||||||
<span className="deckyStoreAboutHeader">Testing</span>
|
<span className="deckyStoreAboutHeader">Testing</span>
|
||||||
<span>
|
<span>
|
||||||
Please consider testing new plugins to help the Decky Loader team!{' '}
|
{t("store_testing_cta")}{' '}
|
||||||
<a
|
<a
|
||||||
href="https://deckbrew.xyz/testing"
|
href="https://deckbrew.xyz/testing"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
@@ -227,13 +230,12 @@ const AboutTab: FC<{}> = () => {
|
|||||||
deckbrew.xyz/testing
|
deckbrew.xyz/testing
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
<span className="deckyStoreAboutHeader">Contributing</span>
|
<span className="deckyStoreAboutHeader">{t("store_contrib_label")}</span>
|
||||||
<span>
|
<span>
|
||||||
If you would like to contribute to the Decky Plugin Store, check the SteamDeckHomebrew/decky-plugin-template
|
{t("store_contrib_desc")}
|
||||||
repository on GitHub. Information on development and distribution is available in the README.
|
|
||||||
</span>
|
</span>
|
||||||
<span className="deckyStoreAboutHeader">Source Code</span>
|
<span className="deckyStoreAboutHeader">{t("store_source_label")}</span>
|
||||||
<span>All plugin source code is available on SteamDeckHomebrew/decky-plugin-database repository on GitHub.</span>
|
<span>{t("store_source_desc")}</span>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
+2
-16
@@ -1,26 +1,12 @@
|
|||||||
import i18next from 'i18next';
|
import i18next from 'i18next';
|
||||||
import Backend from 'i18next-fs-backend';
|
import Backend from 'i18next-http-backend';
|
||||||
import { initReactI18next } from 'react-i18next';
|
import { initReactI18next } from 'react-i18next';
|
||||||
|
|
||||||
i18next
|
i18next
|
||||||
.use(initReactI18next)
|
|
||||||
.use(Backend)
|
.use(Backend)
|
||||||
|
.use(initReactI18next)
|
||||||
.init({
|
.init({
|
||||||
debug: true,
|
debug: true,
|
||||||
backend: {
|
|
||||||
// path where resources get loaded from, or a function
|
|
||||||
// returning a path:
|
|
||||||
// function(lngs, namespaces) { return customPath; }
|
|
||||||
// the returned path will interpolate lng, ns if provided like giving a static path
|
|
||||||
loadPath: '/home/deck/homebrew/locales/{{lng}}/{{ns}}.json',
|
|
||||||
|
|
||||||
// path to post missing resources
|
|
||||||
// addPath: '/locales/{{lng}}/{{ns}}.missing.json',
|
|
||||||
|
|
||||||
// if you use i18next-fs-backend as caching layer in combination with i18next-chained-backend, you can optionally set an expiration time
|
|
||||||
// an example on how to use it as cache layer can be found here: https://github.com/i18next/i18next-fs-backend/blob/master/example/caching/app.js
|
|
||||||
// expirationTime: 60 * 60 * 1000
|
|
||||||
},
|
|
||||||
fallbackLng: 'en',
|
fallbackLng: 'en',
|
||||||
fallbackNS: 'Common',
|
fallbackNS: 'Common',
|
||||||
lng: 'en',
|
lng: 'en',
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"select_version": "Select a version"
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"select_version": "Seleziona una versione"
|
|
||||||
}
|
|
||||||
@@ -344,7 +344,7 @@ class PluginLoader extends Logger {
|
|||||||
fetchNoCors(url: string, request: any = {}) {
|
fetchNoCors(url: string, request: any = {}) {
|
||||||
let args = { method: 'POST', headers: {} };
|
let args = { method: 'POST', headers: {} };
|
||||||
const req = { ...args, ...request, url, data: request.body };
|
const req = { ...args, ...request, url, data: request.body };
|
||||||
req?.body && delete req.body
|
req?.body && delete req.body;
|
||||||
return this.callServerMethod('http_request', req);
|
return this.callServerMethod('http_request', req);
|
||||||
},
|
},
|
||||||
executeInTab(tab: string, runAsync: boolean, code: string) {
|
executeInTab(tab: string, runAsync: boolean, code: string) {
|
||||||
|
|||||||
-1
@@ -1 +0,0 @@
|
|||||||
../prettier/bin-prettier.js
|
|
||||||
-22
@@ -1,22 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "decky-loader",
|
|
||||||
"lockfileVersion": 2,
|
|
||||||
"requires": true,
|
|
||||||
"packages": {
|
|
||||||
"node_modules/prettier": {
|
|
||||||
"version": "2.8.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.2.tgz",
|
|
||||||
"integrity": "sha512-BtRV9BcncDyI2tsuS19zzhzoxD8Dh8LiCx7j7tHzrkz8GFXAexeWFdi22mjE1d16dftH2qNaytVxqiRTGlMfpw==",
|
|
||||||
"dev": true,
|
|
||||||
"bin": {
|
|
||||||
"prettier": "bin-prettier.js"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10.13.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/prettier/prettier?sponsor=1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-6000
File diff suppressed because it is too large
Load Diff
-109
@@ -1,109 +0,0 @@
|
|||||||

|
|
||||||
|
|
||||||
<h2 align="center">Opinionated Code Formatter</h2>
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<em>
|
|
||||||
JavaScript
|
|
||||||
· TypeScript
|
|
||||||
· Flow
|
|
||||||
· JSX
|
|
||||||
· JSON
|
|
||||||
</em>
|
|
||||||
<br />
|
|
||||||
<em>
|
|
||||||
CSS
|
|
||||||
· SCSS
|
|
||||||
· Less
|
|
||||||
</em>
|
|
||||||
<br />
|
|
||||||
<em>
|
|
||||||
HTML
|
|
||||||
· Vue
|
|
||||||
· Angular
|
|
||||||
</em>
|
|
||||||
<br />
|
|
||||||
<em>
|
|
||||||
GraphQL
|
|
||||||
· Markdown
|
|
||||||
· YAML
|
|
||||||
</em>
|
|
||||||
<br />
|
|
||||||
<em>
|
|
||||||
<a href="https://prettier.io/docs/en/plugins.html">
|
|
||||||
Your favorite language?
|
|
||||||
</a>
|
|
||||||
</em>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<a href="https://github.com/prettier/prettier/actions?query=workflow%3AProd+branch%3Amain">
|
|
||||||
<img alt="Github Actions Build Status" src="https://img.shields.io/github/actions/workflow/status/prettier/prettier/prod-test.yml?label=Prod&style=flat-square"></a>
|
|
||||||
<a href="https://github.com/prettier/prettier/actions?query=workflow%3ADev+branch%3Amain">
|
|
||||||
<img alt="Github Actions Build Status" src="https://img.shields.io/github/actions/workflow/status/prettier/prettier/dev-test.yml?label=Dev&style=flat-square"></a>
|
|
||||||
<a href="https://github.com/prettier/prettier/actions?query=workflow%3ALint+branch%3Amain">
|
|
||||||
<img alt="Github Actions Build Status" src="https://img.shields.io/github/actions/workflow/status/prettier/prettier/lint.yml?label=Lint&style=flat-square"></a>
|
|
||||||
<a href="https://codecov.io/gh/prettier/prettier">
|
|
||||||
<img alt="Codecov Coverage Status" src="https://img.shields.io/codecov/c/github/prettier/prettier.svg?style=flat-square"></a>
|
|
||||||
<a href="https://twitter.com/acdlite/status/974390255393505280">
|
|
||||||
<img alt="Blazing Fast" src="https://img.shields.io/badge/speed-blazing%20%F0%9F%94%A5-brightgreen.svg?style=flat-square"></a>
|
|
||||||
<br/>
|
|
||||||
<a href="https://www.npmjs.com/package/prettier">
|
|
||||||
<img alt="npm version" src="https://img.shields.io/npm/v/prettier.svg?style=flat-square"></a>
|
|
||||||
<a href="https://www.npmjs.com/package/prettier">
|
|
||||||
<img alt="weekly downloads from npm" src="https://img.shields.io/npm/dw/prettier.svg?style=flat-square"></a>
|
|
||||||
<a href="#badge">
|
|
||||||
<img alt="code style: prettier" src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square"></a>
|
|
||||||
<a href="https://twitter.com/PrettierCode">
|
|
||||||
<img alt="Follow Prettier on Twitter" src="https://img.shields.io/twitter/follow/prettiercode.svg?label=follow+prettier&style=flat-square"></a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
## Intro
|
|
||||||
|
|
||||||
Prettier is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary.
|
|
||||||
|
|
||||||
### Input
|
|
||||||
|
|
||||||
<!-- prettier-ignore -->
|
|
||||||
```js
|
|
||||||
foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne());
|
|
||||||
```
|
|
||||||
|
|
||||||
### Output
|
|
||||||
|
|
||||||
```js
|
|
||||||
foo(
|
|
||||||
reallyLongArg(),
|
|
||||||
omgSoManyParameters(),
|
|
||||||
IShouldRefactorThis(),
|
|
||||||
isThereSeriouslyAnotherOne()
|
|
||||||
);
|
|
||||||
```
|
|
||||||
|
|
||||||
Prettier can be run [in your editor](https://prettier.io/docs/en/editors.html) on-save, in a [pre-commit hook](https://prettier.io/docs/en/precommit.html), or in [CI environments](https://prettier.io/docs/en/cli.html#list-different) to ensure your codebase has a consistent style without devs ever having to post a nit-picky comment on a code review ever again!
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**[Documentation](https://prettier.io/docs/en/)**
|
|
||||||
|
|
||||||
<!-- prettier-ignore -->
|
|
||||||
[Install](https://prettier.io/docs/en/install.html) ·
|
|
||||||
[Options](https://prettier.io/docs/en/options.html) ·
|
|
||||||
[CLI](https://prettier.io/docs/en/cli.html) ·
|
|
||||||
[API](https://prettier.io/docs/en/api.html)
|
|
||||||
|
|
||||||
**[Playground](https://prettier.io/playground/)**
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Badge
|
|
||||||
|
|
||||||
Show the world you're using _Prettier_ → [](https://github.com/prettier/prettier)
|
|
||||||
|
|
||||||
```md
|
|
||||||
[](https://github.com/prettier/prettier)
|
|
||||||
```
|
|
||||||
|
|
||||||
## Contributing
|
|
||||||
|
|
||||||
See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
||||||
-64
@@ -1,64 +0,0 @@
|
|||||||
#!/usr/bin/env node
|
|
||||||
"use strict";
|
|
||||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
||||||
var __commonJS = function(cb, mod) {
|
|
||||||
return function __require() {
|
|
||||||
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
// node_modules/semver-compare/index.js
|
|
||||||
var require_semver_compare = __commonJS({
|
|
||||||
"node_modules/semver-compare/index.js": function(exports2, module2) {
|
|
||||||
module2.exports = function cmp(a, b) {
|
|
||||||
var pa = a.split(".");
|
|
||||||
var pb = b.split(".");
|
|
||||||
for (var i = 0; i < 3; i++) {
|
|
||||||
var na = Number(pa[i]);
|
|
||||||
var nb = Number(pb[i]);
|
|
||||||
if (na > nb)
|
|
||||||
return 1;
|
|
||||||
if (nb > na)
|
|
||||||
return -1;
|
|
||||||
if (!isNaN(na) && isNaN(nb))
|
|
||||||
return 1;
|
|
||||||
if (isNaN(na) && !isNaN(nb))
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// node_modules/please-upgrade-node/index.js
|
|
||||||
var require_please_upgrade_node = __commonJS({
|
|
||||||
"node_modules/please-upgrade-node/index.js": function(exports2, module2) {
|
|
||||||
var semverCompare = require_semver_compare();
|
|
||||||
module2.exports = function pleaseUpgradeNode2(pkg, opts) {
|
|
||||||
var opts = opts || {};
|
|
||||||
var requiredVersion = pkg.engines.node.replace(">=", "");
|
|
||||||
var currentVersion = process.version.replace("v", "");
|
|
||||||
if (semverCompare(currentVersion, requiredVersion) === -1) {
|
|
||||||
if (opts.message) {
|
|
||||||
console.error(opts.message(requiredVersion));
|
|
||||||
} else {
|
|
||||||
console.error(
|
|
||||||
pkg.name + " requires at least version " + requiredVersion + " of Node, please upgrade"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (opts.hasOwnProperty("exitCode")) {
|
|
||||||
process.exit(opts.exitCode);
|
|
||||||
} else {
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// bin/prettier.js
|
|
||||||
var pleaseUpgradeNode = require_please_upgrade_node();
|
|
||||||
var packageJson = require("./package.json");
|
|
||||||
pleaseUpgradeNode(packageJson);
|
|
||||||
var cli = require("./cli.js");
|
|
||||||
module.exports = cli.run(process.argv.slice(2));
|
|
||||||
-15364
File diff suppressed because it is too large
Load Diff
-1473
File diff suppressed because one or more lines are too long
-2
File diff suppressed because one or more lines are too long
-29
File diff suppressed because one or more lines are too long
-26
File diff suppressed because one or more lines are too long
-35
File diff suppressed because one or more lines are too long
-27
File diff suppressed because one or more lines are too long
-15
File diff suppressed because one or more lines are too long
-36
File diff suppressed because one or more lines are too long
-76
File diff suppressed because one or more lines are too long
-19
File diff suppressed because one or more lines are too long
-76
File diff suppressed because one or more lines are too long
-257
File diff suppressed because one or more lines are too long
-150
File diff suppressed because one or more lines are too long
-116
File diff suppressed because one or more lines are too long
-38222
File diff suppressed because one or more lines are too long
-21
@@ -1,21 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "prettier",
|
|
||||||
"version": "2.8.2",
|
|
||||||
"description": "Prettier is an opinionated code formatter",
|
|
||||||
"bin": "./bin-prettier.js",
|
|
||||||
"repository": "prettier/prettier",
|
|
||||||
"funding": "https://github.com/prettier/prettier?sponsor=1",
|
|
||||||
"homepage": "https://prettier.io",
|
|
||||||
"author": "James Long",
|
|
||||||
"license": "MIT",
|
|
||||||
"main": "./index.js",
|
|
||||||
"browser": "./standalone.js",
|
|
||||||
"unpkg": "./standalone.js",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10.13.0"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"*.js",
|
|
||||||
"esm/*.mjs"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
-2
File diff suppressed because one or more lines are too long
-29
File diff suppressed because one or more lines are too long
-26
File diff suppressed because one or more lines are too long
-35
File diff suppressed because one or more lines are too long
-27
File diff suppressed because one or more lines are too long
-15
File diff suppressed because one or more lines are too long
-36
File diff suppressed because one or more lines are too long
-76
File diff suppressed because one or more lines are too long
-19
File diff suppressed because one or more lines are too long
-76
File diff suppressed because one or more lines are too long
-257
File diff suppressed because one or more lines are too long
-150
File diff suppressed because one or more lines are too long
-116
File diff suppressed because one or more lines are too long
-8978
File diff suppressed because it is too large
Load Diff
Generated
-35
@@ -1,35 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "decky-loader",
|
|
||||||
"lockfileVersion": 2,
|
|
||||||
"requires": true,
|
|
||||||
"packages": {
|
|
||||||
"": {
|
|
||||||
"devDependencies": {
|
|
||||||
"prettier": "2.8.2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/prettier": {
|
|
||||||
"version": "2.8.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.2.tgz",
|
|
||||||
"integrity": "sha512-BtRV9BcncDyI2tsuS19zzhzoxD8Dh8LiCx7j7tHzrkz8GFXAexeWFdi22mjE1d16dftH2qNaytVxqiRTGlMfpw==",
|
|
||||||
"dev": true,
|
|
||||||
"bin": {
|
|
||||||
"prettier": "bin-prettier.js"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10.13.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/prettier/prettier?sponsor=1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"prettier": {
|
|
||||||
"version": "2.8.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.2.tgz",
|
|
||||||
"integrity": "sha512-BtRV9BcncDyI2tsuS19zzhzoxD8Dh8LiCx7j7tHzrkz8GFXAexeWFdi22mjE1d16dftH2qNaytVxqiRTGlMfpw==",
|
|
||||||
"dev": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"devDependencies": {
|
|
||||||
"prettier": "2.8.2"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user