Skip to content

Commit

Permalink
prettier integration
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsingal committed Jan 15, 2024
1 parent c9e8a4a commit 00ff490
Show file tree
Hide file tree
Showing 7 changed files with 172 additions and 14 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/deploy-coming-soon-page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
# Trigger the workflow every time you push to the `main` branch
# Using a different branch name? Replace `main` with your branch’s name
push:
branches: [ coming-soon-page ]
branches: [coming-soon-page]
# Allows you to run this workflow manually from the Actions tab on GitHub.
workflow_dispatch:

Expand All @@ -23,9 +23,9 @@ jobs:
- name: Install, build, and upload your site
uses: withastro/action@v1
# with:
# path: . # The root location of your Astro project inside the repository. (optional)
# node-version: 18 # The specific version of Node that should be used to build your site. Defaults to 18. (optional)
# package-manager: pnpm@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)
# path: . # The root location of your Astro project inside the repository. (optional)
# node-version: 18 # The specific version of Node that should be used to build your site. Defaults to 18. (optional)
# package-manager: pnpm@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)

deploy:
needs: build
Expand All @@ -36,4 +36,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v1
4 changes: 2 additions & 2 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { defineConfig } from 'astro/config';

import tailwind from "@astrojs/tailwind";
import tailwind from '@astrojs/tailwind';

// https://astro.build/config
export default defineConfig({
integrations: [tailwind()],
site: 'https://more4nature.eu',
});
});
133 changes: 133 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,10 @@
"astro": "^4.1.2",
"tailwindcss": "^3.4.1",
"typescript": "^5.3.3"
},
"devDependencies": {
"prettier": "^3.2.2",
"prettier-plugin-astro": "^0.12.3",
"prettier-plugin-tailwindcss": "^0.5.11"
}
}
11 changes: 11 additions & 0 deletions prettier.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/** @type {import("prettier").Config} */
const config = {
semi: true,
tabWidth: 2,
printWidth: 100,
singleQuote: true,
trailingComma: 'es5',
plugins: ['prettier-plugin-tailwindcss'],
};

export default config;
21 changes: 15 additions & 6 deletions tailwind.config.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
/** @type {import('tailwindcss').Config} */
const defaultTheme = require('tailwindcss/defaultTheme');

export default {
content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'],
theme: {
extend: {},
},
plugins: [],
}
content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'],
theme: {
extend: {
fontSize: {
'2xs': '.65rem', // 10px
},
fontFamily: {
sans: ['Lexend', ...defaultTheme.fontFamily.sans],
},
},
},
plugins: [],
};
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "astro/tsconfigs/strict"
}
}

0 comments on commit 00ff490

Please sign in to comment.