Skip to content

Commit 49e8c2b

Browse files
committed
chore: init project
0 parents  commit 49e8c2b

35 files changed

+7544
-0
lines changed

.github/dependabot.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "npm"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
day: "thursday"
8+
time: "00:00"
9+
timezone: "America/Costa_Rica"
10+
labels:
11+
- "dependencies"
12+
groups:
13+
dependencies:
14+
patterns:
15+
- "*"
16+
- package-ecosystem: "github-actions"
17+
directory: "/"
18+
schedule:
19+
interval: "weekly"
20+
day: "thursday"
21+
time: "00:00"
22+
timezone: "America/Costa_Rica"
23+
labels:
24+
- "actions"
25+
groups:
26+
dependencies:
27+
patterns:
28+
- "*"

.github/workflows/deploy-demo.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Deploy demo
2+
3+
"on":
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
build_and_deploy:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Install node
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: lts/*
18+
19+
- name: Install pnpm
20+
uses: pnpm/action-setup@v4
21+
with:
22+
version: latest
23+
24+
- name: Install dependencies
25+
run: pnpm install
26+
27+
- name: Build project
28+
run: pnpm build
29+
30+
- name: Deploy project to Firebase
31+
uses: FirebaseExtended/action-hosting-deploy@v0
32+
with:
33+
repoToken: "${{ secrets.GITHUB_TOKEN }}"
34+
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_ASTRO_LQIP }}"
35+
channelId: live
36+
entryPoint: ./demo
37+
projectId: astro-lqip
38+
env:
39+
FIREBASE_CLI_EXPERIMENTS: webframeworks

.github/workflows/release.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Release
2+
3+
permissions:
4+
id-token: write
5+
contents: write
6+
7+
on:
8+
push:
9+
tags:
10+
- "v*"
11+
12+
jobs:
13+
release:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- uses: actions/setup-node@v4
21+
with:
22+
node-version: lts/*
23+
registry-url: https://registry.npmjs.org/
24+
25+
- uses: pnpm/action-setup@v4
26+
with:
27+
version: latest
28+
29+
- run: pnpx changelogithub
30+
env:
31+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
32+
33+
- run: pnpm install
34+
35+
- run: pnpm publish -r --access public --no-git-checks
36+
env:
37+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
38+
NPM_CONFIG_PROVENANCE: true

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.cache
2+
.DS_Store
3+
.idea
4+
*.log
5+
*.tgz
6+
coverage
7+
dist
8+
lib-cov
9+
logs
10+
node_modules
11+
temp
12+
cache
13+
.eslintcache

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
save-exact=true

.vscode/settings.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"prettier.enable": false,
3+
"editor.formatOnSave": false,
4+
"editor.codeActionsOnSave": {
5+
"source.fixAll.eslint": "explicit",
6+
"source.organizeImports": "never"
7+
},
8+
"eslint.runtime": "node",
9+
"eslint.rules.customizations": [
10+
{ "rule": "style/*", "severity": "off", "fixable": true },
11+
{ "rule": "*-indent", "severity": "off", "fixable": true },
12+
{ "rule": "*-spacing", "severity": "off", "fixable": true },
13+
{ "rule": "*-spaces", "severity": "off", "fixable": true },
14+
{ "rule": "*-order", "severity": "off", "fixable": true },
15+
{ "rule": "*-dangle", "severity": "off", "fixable": true },
16+
{ "rule": "*-newline", "severity": "off", "fixable": true },
17+
{ "rule": "*quotes", "severity": "off", "fixable": true },
18+
{ "rule": "*semi", "severity": "off", "fixable": true }
19+
],
20+
"eslint.validate": [
21+
"javascript",
22+
"typescript",
23+
"json",
24+
"jsonc",
25+
"yaml",
26+
"github-actions-workflow"
27+
]
28+
}

CONTRIBUTING.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Contributing to astro-lqip
2+
3+
I'm excited that you are interested in contributing to this repository! This guide will help you get started with your contributions.
4+
5+
## Table of Contents
6+
7+
- [How to Contribute](#how-to-contribute)
8+
- [Setting Up Your Development Environment](#setting-up-your-development-environment)
9+
- [Submitting Changes](#submitting-changes)
10+
- [Reporting Issues](#reporting-issues)
11+
- [Getting Help](#getting-help)
12+
13+
## How to Contribute
14+
15+
There are several ways you can contribute to this project:
16+
17+
1. **Reporting Bugs**: If you find a bug, please report it by [creating an issue](https://github.com/felixicaza/astro-lqip/issues). Each package has a label to easily identify which package the issue corresponds to, so please use the appropriate labels.
18+
2. **Suggesting Features**: If you have an idea for a new feature, please open an [discussion](https://github.com/felixicaza/astro-lqip/discussions).
19+
3. **Improving Documentation**: Help improve documentation by making it clearer and more comprehensive.
20+
4. **Submitting Code Changes**: If you want to fix a bug or implement a new feature, follow the steps below to submit your changes.
21+
22+
## Setting Up Your Development Environment
23+
24+
1. **Fork the repository**:
25+
Click the "Fork" button at the top right corner of the repository page to create a copy of the repository in your GitHub account.
26+
27+
2. **Clone your fork**:
28+
```sh
29+
git clone https://github.com/yourusername/astro-lqip.git
30+
```
31+
32+
3. **Install dependencies**:
33+
Use `pnpm` as package manager. Install the project dependencies:
34+
```sh
35+
pnpm install
36+
```
37+
38+
4. **Create a new branch**:
39+
```sh
40+
git checkout -b your-branch-name
41+
```
42+
43+
## Submitting Changes
44+
45+
1. **Make your changes**:
46+
Ensure your code follows the project's coding standards and passes all tests.
47+
48+
2. **Commit your changes**:
49+
```sh
50+
git add .
51+
git commit -m "Description of your changes"
52+
```
53+
54+
3. **Push your changes to your fork**:
55+
```sh
56+
git push origin your-branch-name
57+
```
58+
59+
4. **Create a Pull Request**:
60+
Go to the original repository and click the "New Pull Request" button. Provide a clear and descriptive title and description for your pull request.
61+
62+
## Reporting Issues
63+
64+
If you encounter any issues while using the plugins, please report them by [creating an issue](https://github.com/felixicaza/astro-lqip/issues) in the repository. Provide as much detail as possible to help us understand and resolve the issue quickly.
65+
66+
## Getting Help
67+
68+
If you need help or have any questions, feel free to open an issue or reach out to the maintainer. I'm here to help!

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Felix Icaza
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<img src="./assets/cover.png" alt="Cover" width="896" height="280" style="object-fit: cover" />
2+
3+
# 🖼️ astro-lqip
4+
5+
[![GitHub Release](https://img.shields.io/github/v/release/felixicaza/astro-lqip?logo=npm)](https://www.npmjs.com/package/astro-lqip)
6+
[![GitHub License](https://img.shields.io/github/license/felixicaza/astro-lqip)](https://github.com/felixicaza/astro-lqip/blob/main/LICENSE)
7+
8+
A integration built over the native Astro component that generates low-quality image placeholders (LQIP) for your images.
9+
10+
## ⬇️ Installation
11+
12+
NPM:
13+
14+
```bash
15+
npm install astro-lqip
16+
```
17+
18+
PNPM:
19+
20+
```bash
21+
pnpm add astro-lqip
22+
```
23+
24+
Yarn:
25+
26+
```bash
27+
yarn add astro-lqip
28+
```
29+
30+
## 🚀 Usage
31+
32+
In your current Astro project, just replace the native Astro `<Picture>` component with the one provided by this integration.
33+
34+
```astro
35+
- import { Picture } from 'astro:assets';
36+
+ import { Picture } from 'astro-lqip/components';
37+
```
38+
39+
## 📝 ToDo
40+
41+
- [ ] Add support for Image component.
42+
- [ ] Add support for more lqip techniques.
43+
- [ ] Optimize current CSS usage.
44+
- [ ] Improve demo page.
45+
46+
## 💡 Knowledge
47+
48+
Since this integration is built on top of Astro's native `<Picture>` component, you can refer to the [Astro documentation](https://docs.astro.build/en/guides/images/#picture-) for more information on how to use it.
49+
50+
## 🤝 Contributing
51+
If you wish to contribute to this project, you can do so by reading the [contribution guide](https://github.com/felixicaza/astro-lqip/blob/main/CONTRIBUTING.md).
52+
53+
## 📄 License
54+
This project is licensed under the MIT License. See the [license file](https://github.com/felixicaza/astro-lqip/blob/main/LICENSE) for more details.

assets/cover.png

2.34 MB
Loading

0 commit comments

Comments
 (0)