forked from federated-nexus/website
		
	Set up prettier
This commit is contained in:
		
					parent
					
						
							
								a49c4b9a15
							
						
					
				
			
			
				commit
				
					
						7c4ba81ef3
					
				
			
		
					 7 changed files with 4953 additions and 49 deletions
				
			
		
							
								
								
									
										76
									
								
								.github/workflows/astro.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										76
									
								
								.github/workflows/astro.yml
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -1,50 +1,50 @@
 | 
			
		|||
name: Deploy to Pages
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  push:
 | 
			
		||||
    branches: ["main"]
 | 
			
		||||
  workflow_dispatch:
 | 
			
		||||
    push:
 | 
			
		||||
        branches: ["main"]
 | 
			
		||||
    workflow_dispatch:
 | 
			
		||||
 | 
			
		||||
permissions:
 | 
			
		||||
  contents: read
 | 
			
		||||
  pages: write
 | 
			
		||||
  id-token: write
 | 
			
		||||
  
 | 
			
		||||
    contents: read
 | 
			
		||||
    pages: write
 | 
			
		||||
    id-token: write
 | 
			
		||||
 | 
			
		||||
concurrency:
 | 
			
		||||
  group: "pages"
 | 
			
		||||
  cancel-in-progress: false
 | 
			
		||||
    group: "pages"
 | 
			
		||||
    cancel-in-progress: false
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  build:
 | 
			
		||||
    name: Build
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v4
 | 
			
		||||
    build:
 | 
			
		||||
        name: Build
 | 
			
		||||
        runs-on: ubuntu-latest
 | 
			
		||||
        steps:
 | 
			
		||||
            - uses: actions/checkout@v4
 | 
			
		||||
 | 
			
		||||
      - name: Setup Node
 | 
			
		||||
        uses: actions/setup-node@v4
 | 
			
		||||
        with:
 | 
			
		||||
          node-version: "20"
 | 
			
		||||
            - name: Setup Node
 | 
			
		||||
              uses: actions/setup-node@v4
 | 
			
		||||
              with:
 | 
			
		||||
                  node-version: "20"
 | 
			
		||||
 | 
			
		||||
      - name: Install dependencies
 | 
			
		||||
        run: npm i
 | 
			
		||||
            - name: Install dependencies
 | 
			
		||||
              run: npm i
 | 
			
		||||
 | 
			
		||||
      - name: Build with Astro
 | 
			
		||||
        run: npm run astro build
 | 
			
		||||
        
 | 
			
		||||
      - name: Upload artifact
 | 
			
		||||
        uses: actions/upload-pages-artifact@v3
 | 
			
		||||
        with:
 | 
			
		||||
          path: dist
 | 
			
		||||
            - name: Build with Astro
 | 
			
		||||
              run: npm run astro build
 | 
			
		||||
 | 
			
		||||
  deploy:
 | 
			
		||||
    environment:
 | 
			
		||||
      name: github-pages
 | 
			
		||||
      url: ${{ steps.deployment.outputs.page_url }}
 | 
			
		||||
    needs: build
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    name: Deploy
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Deploy to GitHub Pages
 | 
			
		||||
        id: deployment
 | 
			
		||||
        uses: actions/deploy-pages@v4
 | 
			
		||||
            - name: Upload artifact
 | 
			
		||||
              uses: actions/upload-pages-artifact@v3
 | 
			
		||||
              with:
 | 
			
		||||
                  path: dist
 | 
			
		||||
 | 
			
		||||
    deploy:
 | 
			
		||||
        environment:
 | 
			
		||||
            name: github-pages
 | 
			
		||||
            url: ${{ steps.deployment.outputs.page_url }}
 | 
			
		||||
        needs: build
 | 
			
		||||
        runs-on: ubuntu-latest
 | 
			
		||||
        name: Deploy
 | 
			
		||||
        steps:
 | 
			
		||||
            - name: Deploy to GitHub Pages
 | 
			
		||||
              id: deployment
 | 
			
		||||
              uses: actions/deploy-pages@v4
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										6
									
								
								.prettierrc
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								.prettierrc
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,6 @@
 | 
			
		|||
{
 | 
			
		||||
    "plugins": ["prettier-plugin-astro"],
 | 
			
		||||
    "tabWidth": 4,
 | 
			
		||||
    "semi": false,
 | 
			
		||||
    "overrides": [{ "files": "*.astro", "options": { "parser": "astro" } }]
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										4
									
								
								.vscode/extensions.json
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.vscode/extensions.json
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
{
 | 
			
		||||
  "recommendations": ["astro-build.astro-vscode"],
 | 
			
		||||
  "unwantedRecommendations": []
 | 
			
		||||
    "recommendations": ["astro-build.astro-vscode"],
 | 
			
		||||
    "unwantedRecommendations": []
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										4896
									
								
								package-lock.json
									
										
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										4896
									
								
								package-lock.json
									
										
									
										generated
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							| 
						 | 
				
			
			@ -9,9 +9,11 @@
 | 
			
		|||
        "astro": "astro"
 | 
			
		||||
    },
 | 
			
		||||
    "devDependencies": {
 | 
			
		||||
        "@astrojs/starlight": "^0.34.3",
 | 
			
		||||
        "astro": "^5.1.8",
 | 
			
		||||
        "prettier": "^3.6.2",
 | 
			
		||||
        "prettier-plugin-astro": "^0.14.1",
 | 
			
		||||
        "sharp": "^0.33.5",
 | 
			
		||||
        "starlight": "^0.3.9",
 | 
			
		||||
        "@astrojs/starlight": "^0.34.3"
 | 
			
		||||
        "starlight": "^0.3.9"
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -36,7 +36,7 @@ import "../styles/login.css"
 | 
			
		|||
    const params = new URLSearchParams(window.location.search)
 | 
			
		||||
    for (const name of ["redirect_uri", "state", "nonce"]) {
 | 
			
		||||
        const input = document.querySelector(
 | 
			
		||||
            `input[name="${name}"]`
 | 
			
		||||
            `input[name="${name}"]`,
 | 
			
		||||
        ) as HTMLInputElement
 | 
			
		||||
        if (input && params.has(name)) input.value = params.get(name)!
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			@ -72,7 +72,7 @@ import "../styles/login.css"
 | 
			
		|||
                        identifier: { type: "m.id.user", user: username },
 | 
			
		||||
                        password,
 | 
			
		||||
                    }),
 | 
			
		||||
                }
 | 
			
		||||
                },
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            if (!res.ok) {
 | 
			
		||||
| 
						 | 
				
			
			@ -82,12 +82,12 @@ import "../styles/login.css"
 | 
			
		|||
            const data = await res.json()
 | 
			
		||||
 | 
			
		||||
            const id = form.querySelector(
 | 
			
		||||
                'input[name="user_id"]'
 | 
			
		||||
                'input[name="user_id"]',
 | 
			
		||||
            ) as HTMLInputElement
 | 
			
		||||
            id.value = data.user_id
 | 
			
		||||
 | 
			
		||||
            const token = form.querySelector(
 | 
			
		||||
                'input[name="access_token"]'
 | 
			
		||||
                'input[name="access_token"]',
 | 
			
		||||
            ) as HTMLInputElement
 | 
			
		||||
            token.value = data.access_token
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
{
 | 
			
		||||
  "extends": "astro/tsconfigs/strict",
 | 
			
		||||
  "include": [".astro/types.d.ts", "**/*"],
 | 
			
		||||
  "exclude": ["dist"]
 | 
			
		||||
    "extends": "astro/tsconfigs/strict",
 | 
			
		||||
    "include": [".astro/types.d.ts", "**/*"],
 | 
			
		||||
    "exclude": ["dist"]
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue