Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
40 changes: 40 additions & 0 deletions .github/actions/setup/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Setup
description: Setup application development environment
inputs:
node-version:
description: Node.js version
required: true
default: "20"
pnpm-version:
description: pnpm version
required: true
default: "9"
runs:
using: "composite"
steps:
- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ inputs.node-version }}
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ inputs.pnpm-version }}
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Checkout
run: pnpm list --depth=0
shell: bash
- name: Install dependencies
run: pnpm install
shell: bash
57 changes: 57 additions & 0 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Pull Request
on: pull_request
jobs:
assign:
runs-on: ubuntu-latest
steps:
- run: gh pr edit $PR_NUMBER --add-assignee $ASSIGNEE
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
PR_NUMBER: ${{ github.event.pull_request.number }}
ASSIGNEE: ${{ github.actor }}
if: ${{ toJSON(github.event.pull_request.assignees) == '[]' }}
typecheck:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup
uses: ./.github/actions/setup
- name: Typecheck
run: pnpm run build
- name: Typecheck
run: pnpm run typecheck
format:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Setup
uses: ./.github/actions/setup
- name: Format
run: pnpm run format
- name: Check diff
id: diff
run: git diff --exit-code
continue-on-error: true
- name: Commit format
if: steps.diff.outcome == 'failure'
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git commit -am "Format"
git push
lint:
runs-on: ubuntu-latest
steps:
- run: echo "Do lint"
test:
runs-on: ubuntu-latest
steps:
- run: echo "Do test"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
29 changes: 22 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Changelog

## v0.3.0

[compare changes](https://github.com/Joepocalyptic/nuxt-particles/compare/v0.2.0...v0.3.0)

### 🩹 Fixes

- Opt in to `import.meta.*` properties ([5e07c8a](https://github.com/Joepocalyptic/nuxt-particles/commit/5e07c8a))
- Use proper import ([6a7f898](https://github.com/Joepocalyptic/nuxt-particles/commit/6a7f898))

### 🏡 Chore

- Require Nuxt >= 3.7.0 ([7ab3d1a](https://github.com/Joepocalyptic/nuxt-particles/commit/7ab3d1a))

### ❤️ Contributors

- Joey Pereira ([@Joepocalyptic](http://github.com/Joepocalyptic))
- Daniel Roe ([@danielroe](http://github.com/danielroe))

## v0.2.0

Expand Down Expand Up @@ -29,7 +46,7 @@

- Add renovate.json (560a936)

### ❤️ Contributors
### ❤️ Contributors

- Joey Pereira <contact@joeypereira.dev>

Expand All @@ -41,7 +58,7 @@

- Clean up docs (9f1c6da)

### ❤️ Contributors
### ❤️ Contributors

- Joey Pereira <contact@joeypereira.dev>

Expand All @@ -54,7 +71,7 @@
- Clean up (6bfdec8)
- Clean up (0826ac3)

### ❤️ Contributors
### ❤️ Contributors

- Joey Pereira <contact@joeypereira.dev>

Expand All @@ -71,21 +88,19 @@
- Fix docs prerendering (16462be)
- Add license (95f8b8d)

### ❤️ Contributors
### ❤️ Contributors

- Joey Pereira <contact@joeypereira.dev>

## v0.1.1


### 🏡 Chore

- Initial commit (729e9b3)
- Update README.md (8fc40c2)
- Add defu dependency (a5a41a0)
- Fix defu dependency (f6f6d32)

### ❤️ Contributors
### ❤️ Contributors

- Joey Pereira <contact@joeypereira.dev>

24 changes: 10 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@ npm install --save-dev nuxt-particles

```js
export default defineNuxtConfig({
modules: [
'nuxt-particles'
]
})
modules: ["nuxt-particles"],
});
```

That's it! You can now use the &lt;NuxtParticles&gt; component in your application! ✨
Expand All @@ -59,9 +57,9 @@ Example:
url="/path/to/particles.json"
@load="onLoad"
></NuxtParticles>

<!-- or -->

<NuxtParticles
id="tsparticles"
:options="options"
Expand All @@ -70,17 +68,17 @@ Example:
</template>

<script setup lang="ts">
import type { Container } from '@tsparticles/engine'
import type { Container } from "@tsparticles/engine";

const options = {
// See https://particles.js.org/docs/interfaces/tsParticles_Engine.Options_Interfaces_IOptions.IOptions.html
}
};

const onLoad = (container: Container) => {
// Do something with the container
container.pause()
setTimeout(() => container.play(), 2000)
}
container.pause();
setTimeout(() => container.play(), 2000);
};
</script>
```

Expand All @@ -107,14 +105,12 @@ pnpm run release
```

<!-- Badges -->

[npm-version-src]: https://img.shields.io/npm/v/nuxt-particles/latest.svg?style=flat&colorA=18181B&colorB=28CF8D
[npm-version-href]: https://npmjs.com/package/nuxt-particles

[npm-downloads-src]: https://img.shields.io/npm/dm/nuxt-particles.svg?style=flat&colorA=18181B&colorB=28CF8D
[npm-downloads-href]: https://npmjs.com/package/nuxt-particles

[license-src]: https://img.shields.io/npm/l/nuxt-particles.svg?style=flat&colorA=18181B&colorB=28CF8D
[license-href]: https://npmjs.com/package/nuxt-particles

[nuxt-src]: https://img.shields.io/badge/Nuxt-18181B?logo=nuxt.js
[nuxt-href]: https://nuxt.com
10 changes: 5 additions & 5 deletions docs/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module.exports = {
root: true,
extends: '@nuxt/eslint-config',
extends: "@nuxt/eslint-config",
rules: {
'vue/max-attributes-per-line': 'off',
'vue/multi-word-component-names': 'off'
}
}
"vue/max-attributes-per-line": "off",
"vue/multi-word-component-names": "off",
},
};
39 changes: 20 additions & 19 deletions docs/app.config.ts
Original file line number Diff line number Diff line change
@@ -1,37 +1,38 @@
export default defineAppConfig({
docus: {
title: 'Nuxt Particles',
description: 'The best place to start your documentation.',
image: 'https://user-images.githubusercontent.com/904724/185365452-87b7ca7b-6030-4813-a2db-5e65c785bf88.png',
title: "Nuxt Particles",
description: "The best place to start your documentation.",
image:
"https://user-images.githubusercontent.com/904724/185365452-87b7ca7b-6030-4813-a2db-5e65c785bf88.png",
socials: {
github: 'Joepocalyptic/nuxt-particles',
github: "Joepocalyptic/nuxt-particles",
nuxt: {
label: 'Nuxt',
icon: 'simple-icons:nuxtdotjs',
href: 'https://nuxt.com'
}
label: "Nuxt",
icon: "simple-icons:nuxtdotjs",
href: "https://nuxt.com",
},
},
github: {
dir: 'docs/content',
branch: 'main',
repo: 'nuxt-particles',
owner: 'Joepocalyptic',
edit: false
dir: "docs/content",
branch: "main",
repo: "nuxt-particles",
owner: "Joepocalyptic",
edit: false,
},
aside: {
level: 0,
collapsed: false,
exclude: []
exclude: [],
},
main: {
padded: true,
fluid: false
fluid: false,
},
header: {
logo: true,
showLinkIcon: true,
exclude: [],
fluid: false
}
}
})
fluid: false,
},
},
});
50 changes: 29 additions & 21 deletions docs/content/0.index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@ main:

:ellipsis{right=0px width=75% blur=150px}

::block-hero
---
## ::block-hero

cta:
- Get started
- /getting-started/setup
secondary:
- Star on GitHub →
- https://github.com/Joepocalyptic/nuxt-particles

- Get started
- /getting-started/setup
secondary:
- Star on GitHub →
- https://github.com/Joepocalyptic/nuxt-particles

---

#title
Expand All @@ -25,21 +27,27 @@ Nuxt Particles
Run lightweight, heavily customizable particle simulations in your Nuxt project with [tsParticles](https://particles.js.org).

#extra
::list
- Built for **Nuxt 3**
- **Lazy loading** by default
- Built-in full, slim, and basic bundles, or
- Use a custom bundle for extra performance
- All with just **one component**!
::list

- Built for **Nuxt 3**
- **Lazy loading** by default
- Built-in full, slim, and basic bundles, or
- Use a custom bundle for extra performance
- All with just **one component**!
::

#support
::terminal
---
content:
- pnpm i -D nuxt-particles
- Add 'nuxt-particles' to your 'modules' array in 'nuxt.config.ts'
- Profit!
---
::
::terminal

---

content:

- pnpm i -D nuxt-particles
- Add 'nuxt-particles' to your 'modules' array in 'nuxt.config.ts'
- Profit!

---

::
::
Loading