Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Updating workflows for new scripts #95

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Mathys-Gasnier merged 5 commits into quicksnip-dev:main from Mathys-Gasnier:main
Jan 1, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Move consolidated to /public/consolidated Also updates CODEOWNERS t...
...o reflect change in folder structure.
  • Loading branch information
Mathys-Gasnier committed Jan 1, 2025
commit 5e61319a2631689df1a804160e9dd901811483fe
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/src/ @psychlone77 @saminjay

# Snippets maintainers
/public/data @Mathys-Gasnier
/snippets @Mathys-Gasnier


# ---------- What is a maintainer ----------
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/consolidate-snippets.yml
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ jobs:
run: |
git config --global user.name "GitHub Action"
git config --global user.email "action@github.com"
git add public/data/*
git add public/consolidated/*
git commit -m "Update consolidated snippets"
git push
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/hooks/useCategories.ts
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type CategoryData = {
export const useCategories = () => {
const { language } = useAppContext();
const { data, loading, error } = useFetch<CategoryData[]>(
`/data/${slugify(language.lang)}.json`
`/consolidated/${slugify(language.lang)}.json`
);

const fetchedCategories = useMemo(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useLanguages.ts
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useFetch } from "./useFetch";

export const useLanguages = () => {
const { data, loading, error } =
useFetch<LanguageType[]>("/data/_index.json");
useFetch<LanguageType[]>("/consolidated/_index.json");

return { fetchedLanguages: data || [], loading, error };
};
2 changes: 1 addition & 1 deletion src/hooks/useSnippets.ts
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type CategoryData = {
export const useSnippets = () => {
const { language, category } = useAppContext();
const { data, loading, error } = useFetch<CategoryData[]>(
`/data/${slugify(language.lang)}.json`
`/consolidated/${slugify(language.lang)}.json`
);

const fetchedSnippets = data
Expand Down
2 changes: 1 addition & 1 deletion utils/consolidateSnippets.js
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { parseAllSnippets, reverseSlugify } from './snippetParser.js';
import { join } from 'path';
import { copyFileSync, writeFileSync } from 'fs';

const dataPath = 'public/data/';
const dataPath = 'public/consolidated/';
const indexPath = join(dataPath, '_index.json');
const iconPath = 'public/icons/';
const snippetsPath = 'snippets/';
Expand Down
Loading

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /