Skip to content

Commit

Permalink
Merge pull request #93 from irsooti/develop
Browse files Browse the repository at this point in the history
Cleaning up
  • Loading branch information
gregoriopalama authored Jan 25, 2024
2 parents b0f0a59 + 34ddf4f commit 131c53a
Show file tree
Hide file tree
Showing 287 changed files with 3,261 additions and 7,227 deletions.
58 changes: 58 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
module.exports = {
// ...
extends: [
"eslint:recommended",
"plugin:astro/recommended",
"plugin:jsx-a11y/recommended",
],
parser: "@typescript-eslint/parser",
settings: {
react: {
version: "detect", // React version. "detect" automatically picks the version you have installed.
},
},
env: {
browser: true,
node: true,
},
globals: {
window: true,
module: true,
google: true,
},
// ...
overrides: [
{
// Define the configuration for React files.
files: ["*.tsx"],
parser: "@typescript-eslint/parser",
extends: [
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:react-hooks/recommended",
],
rules: {
// override/add rules settings here, such as:
// "@typescript-eslint/no-explicit-any": "off",
},
},
{
// Define the configuration for `.astro` file.
files: ["*.astro"],
// Allows Astro components to be parsed.
parser: "astro-eslint-parser",
// Parse the script in `.astro` as TypeScript by adding the following configuration.
// It's the setting you need when using TypeScript.
parserOptions: {
parser: "@typescript-eslint/parser",
extraFileExtensions: [".astro"],
},
rules: {
// override/add rules settings here, such as:
// "astro/no-set-html-directive": "error"
},
},

// ...
],
};
52 changes: 0 additions & 52 deletions .github/workflows/google-cloudrun-docker.yml

This file was deleted.

4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,3 @@ package-lock.json*

# intellij
.idea/

# astro translations
src/pages/it/
src/pages/en/
17 changes: 12 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
{
"i18n-ally.localesPaths": [
"public/locales/it.json",
"public/locales"
],
"i18n-ally.sourceLanguage": "en",
"i18n-ally.localesPaths": [
"public/locales/it.json",
"public/locales"
],
"i18n-ally.sourceLanguage": "en",
"eslint.validate": [
"javascript",
"javascriptreact",
"astro", // Enable .astro
"typescript", // Enable .ts
"typescriptreact" // Enable .tsx
]
}
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,19 @@ Inside of your Astro project, you'll see the following folders and files:
├── public/
│ └── favicon.svg
├── src/
│ ├── components/
│ ├── feature-x/
│ │ └── ComponentName.astro
│ │ └── AnotherComponentName.astro
│ ├── shared/
│ │ └── Card.astro
│ ├── layouts/
│ │ └── Layout.astro
│ └── pages/
│ └── index.astro
└── package.json
```

Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.

There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
There's nothing special about `src/feature-x/`, (replace "x" with any component name that you want) but that's where we like to put any Astro/React/Vue/Svelte/Preact components or something related to the feature.

Any static assets, like images, can be placed in the `public/` directory.

Expand All @@ -38,13 +39,14 @@ All commands are run from the root of the project, from a terminal:
| `npm run astro -- --help` | Get help using the Astro CLI |

## Tools used

- [Tailwind CSS (Utility-First CSS Framework)](https://tailwindcss.com/)
- [DaisyUI (Tailwind CSS Components)](https://daisyui.com/)
- [astro-i18n](https://github.com/yassinedoghri/astro-i18next)

## Mockup

[Figma](https://www.figma.com/file/vGNg1oFEozLImMUl8vidyo/Landing-DevFest-2023?type=design&node-id=0%3A1&mode=design&t=i1jkPzTUHDnIPDi6-1)
TBD

## Code of Conduct
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)
Expand Down
8 changes: 4 additions & 4 deletions astro-i18next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ export default {
defaultLocale: "en",
locales: ["en", "it"],
defaultNamespace: "common",
namespaces: ["common", "landing", "agenda", "coc", "location", "team"],
// i18nextServer: {
// debug: true,
// }
namespaces: ["common"],
i18nextServer: {
debug: true,
},
};
18 changes: 18 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,22 @@ export default defineConfig({
adapter: nodejs({
mode: "standalone",
}),
image: {
domains: ["via.placeholder.com"],
},
i18n: {
defaultLocale: "en",
locales: ["en", "it"],
fallback: {
it: "en",
},
routingStrategy: "prefix-other-locales",
},
vite: {
resolve: {
alias: {
"~/": "/src/",
},
},
},
});
4 changes: 1 addition & 3 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{

}
{}
47 changes: 29 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,45 @@
"build": "pnpm generate-translations && astro build",
"preview": "astro preview",
"astro": "astro",
"generate-translations": "npx astro-i18next generate"
"generate-translations": "npx astro-i18next generate",
"prettier": "prettier --write . --plugin=prettier-plugin-astro"
},
"dependencies": {
"@astrojs/node": "^6.0.3",
"@astrojs/react": "^2.2.1",
"@astrojs/tailwind": "^5.0.0",
"@astrojs/vercel": "^5.0.2",
"@astrojs/node": "^8.0.0",
"@astrojs/react": "^3.0.9",
"@astrojs/tailwind": "^5.1.0",
"@astrojs/vercel": "^7.0.1",
"@googlemaps/js-api-loader": "^1.16.2",
"@googlemaps/react-wrapper": "^1.1.35",
"@splidejs/splide": "^4.1.4",
"@tailwindcss/typography": "^0.5.10",
"@types/react": "^18.0.21",
"@types/react-dom": "^18.0.6",
"astro": "^3.0.8",
"@types/react": "^18.2.38",
"@types/react-dom": "^18.2.17",
"astro": "^4.2.4",
"astro-firebase": "^0.0.3",
"astro-i18next": "1.0.0-beta.21",
"clsx": "^2.0.0",
"daisyui": "^3.1.6",
"daisyui": "^4.4.7",
"i18next": "^22.5.1",
"i18next-fs-backend": "^2.1.5",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"sharp": "^0.32.5",
"tailwindcss": "^3.0.24"
"i18next-fs-backend": "^2.3.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"sharp": "^0.32.6",
"tailwindcss": "^3.3.5"
},
"devDependencies": {
"@types/google.maps": "^3.54.0",
"@types/google.maps": "^3.54.9",
"@typescript-eslint/parser": "^6.13.1",
"eslint": "^8.55.0",
"eslint-plugin-astro": "^0.30.0",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"jsx-runtime": "link:plugin:react/jsx-runtime",
"postcss-nesting": "^12.0.1",
"prettier": "^3.0.3",
"prettier-plugin-astro": "^0.12.1",
"sass": "^1.63.6"
"prettier": "^3.1.0",
"prettier-plugin-astro": "^0.12.2",
"sass": "^1.69.5",
"tailwind-merge": "^2.0.0"
}
}
Loading

0 comments on commit 131c53a

Please sign in to comment.