Skip to content

Commit 76538c8

Browse files
Tahulgrunghishawn-mtycpreston321
authored
feat(v2): prepare v2 (#75)
Co-authored-by: Yaël Guilloux <[email protected]> Co-authored-by: Josef Jelínek <[email protected]> Co-authored-by: Shawn P M <[email protected]> Co-authored-by: Christian Preston <[email protected]>
1 parent 83dc886 commit 76538c8

File tree

148 files changed

+9573
-6553
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+9573
-6553
lines changed

.eslintrc

+53-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,55 @@
11
{
2-
"extends": "@antfu"
2+
"root": true,
3+
"env": {
4+
"browser": true,
5+
"node": true
6+
},
7+
"ignorePatterns": [
8+
"dist/**/*",
9+
".output/**/*",
10+
".nuxt/**/*",
11+
"*.css",
12+
"*.md"
13+
],
14+
"extends": [
15+
"@nuxtjs/eslint-config-typescript",
16+
"@antfu",
17+
"plugin:prettier-vue/recommended",
18+
"prettier"
19+
],
20+
"settings": {
21+
"import/ignore": [
22+
"vue"
23+
]
24+
},
25+
"rules": {
26+
"semi": "error",
27+
"antfu/if-newline": 0,
28+
"vue/static-class-names-order": "off",
29+
"vue/multi-word-component-names": "off",
30+
"vue/require-component-is": "off",
31+
"vue/no-multiple-template-root": "off",
32+
"vue/no-v-text-v-html-on-component": "off",
33+
"@typescript-eslint/no-unused-vars": [
34+
"off"
35+
],
36+
"@typescript-eslint/semi": [
37+
"error"
38+
],
39+
"@typescript-eslint/comma-dangle": [
40+
"error"
41+
],
42+
"comma-dangle": "error",
43+
"no-unused-vars": 0,
44+
"prettier-vue/prettier": [
45+
"error",
46+
{
47+
"printWidth": 180,
48+
"semi": false,
49+
"singleQuote": true,
50+
"tabWidth": 2,
51+
"trailingComma": "all"
52+
}
53+
]
54+
}
355
}

.github/workflows/ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test package
1+
name: Build and tests
22

33
on:
44
push:
@@ -29,10 +29,10 @@ jobs:
2929
with:
3030
version: 6.24.3
3131

32-
- name: Use Node.js ${{ matrix.node-version }}
32+
- name: Use Node.js ${{ matrix.node }}
3333
uses: actions/setup-node@v2
3434
with:
35-
node-version: ${{ matrix.node-version }}
35+
node-version: ${{ matrix.node }}
3636
registry-url: https://registry.npmjs.org/
3737
cache: "pnpm"
3838

.github/workflows/publish.yml

-40
This file was deleted.

.github/workflows/targets.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Build playgrounds
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
ci:
13+
runs-on: ${{ matrix.os }}
14+
15+
strategy:
16+
matrix:
17+
os: [ubuntu-latest] # macos-latest, windows-latest
18+
node: [16]
19+
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@master
23+
with:
24+
persist-credentials: false
25+
fetch-depth: 0
26+
27+
- name: Install PNPM
28+
uses: pnpm/[email protected]
29+
with:
30+
version: 6.24.3
31+
32+
- name: Use Node.js ${{ matrix.node }}
33+
uses: actions/setup-node@v2
34+
with:
35+
node-version: ${{ matrix.node }}
36+
registry-url: https://registry.npmjs.org/
37+
cache: "pnpm"
38+
39+
- name: Install dependencies
40+
run: pnpm install
41+
42+
- name: Build project (Vite)
43+
run: pnpm build:vite
44+
45+
- name: Build project (Nuxt)
46+
run: pnpm build:nuxt
47+
48+
- name: Build project (Vite SSG)
49+
run: pnpm build:ssg

.npmrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
shamefully-hoist=true
1+
ignore-workspace-root-check=true
2+
shamefully-hoist=true

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
14
1+
16

.vscode/settings.json

-5
This file was deleted.

README.md

+9-8
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@
77
**Vue Composables** putting your **components** in **motion**
88

99
- 🏎 **Smooth animations** based on [**Popmotion**](https://popmotion.io/)
10-
- 🎮 **Declarative** API
10+
- 🎮 **Declarative** API inspired by [**Framer Motion**](https://www.framer.com/motion/)
1111
- 🚀 **Plug** & **play** with **20+ presets**
12-
- ✅ Supports **Vue 2 & 3** using [**vue-demi**](https://github.com/antfu/vue-demi)
13-
- 🌐 Supports **SSR**
14-
- 🚚 Supports **Nuxt 3** and **@nuxt/bridge**
12+
- 🌐 **SSR Ready**
13+
- 🚚 First-class support for **Nuxt 3**
1514
- ✨ Written in **TypeScript**
1615
- 🏋️‍♀️ Lightweight with **<20kb** bundle size
1716

@@ -21,12 +20,12 @@
2120

2221
## Quick Start
2322

24-
Let's **get started** quick by **installing** the **package** and adding the **plugin**.
23+
Let's **get started** by **installing** the **package** and adding the **plugin**.
2524

2625
From your **terminal**:
2726

2827
```bash
29-
pnpm add @vueuse/motion
28+
yarn add @vueuse/motion
3029
```
3130

3231
In your **Vue** app **entry** file:
@@ -65,15 +64,17 @@ To see more about how to use **directives**, check out [**Directive Usage**](htt
6564

6665
To see more about what **properties** you can **animate**, check out [**Motion Properties**](https://motion.vueuse.org/motion-properties).
6766

68-
To see more about how to **create** your own **animations** styles, check out [**Transition Properties**](https://motion.vueuse.org/transition-properties).
67+
To see more about how to **create** your own **animation** styles, check out [**Transition Properties**](https://motion.vueuse.org/transition-properties).
6968

7069
To see more about what are **variants** and how you can **use** them, check out [**Variants**](https://motion.vueuse.org/variants).
7170

7271
To see more about how to **control** your declared **variants**, check out [**Motion Instance**](https://motion.vueuse.org/motion-instance).
7372

7473
## Credits
7574

76-
This package is **heavily** inspired by [**Framer Motion**](https://www.framer.com/motion/).
75+
This package is **heavily** inspired by [**Framer Motion**](https://www.framer.com/motion/) by [**https://twitter.com/mattgperry**].
76+
77+
If you are interested in using [WAAPI](https://developer.mozilla.org/fr/docs/Web/API/Web_Animations_API), check out [Motion.dev](https://motion.dev/)!
7778

7879
I would also like to **thank** [**antfu**](https://github.com/antfu), [**patak-dev**](https://github.com/patak-dev) and [**kazupon**](https://github.com/kazupon) for their kind help!
7980

build.config.ts

+8-14
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { copySync } from 'fs-extra'
2-
import consola from 'consola'
31
import { defineBuildConfig } from 'unbuild'
42

53
export default defineBuildConfig({
@@ -38,11 +36,19 @@ export default defineBuildConfig({
3836
format: 'cjs',
3937
ext: 'cjs',
4038
},
39+
// Copy runtime folder with mkdist
40+
{
41+
builder: 'mkdist',
42+
input: 'src/nuxt/runtime',
43+
outDir: 'dist/runtime',
44+
declaration: false,
45+
},
4146
],
4247
externals: [
4348
'@nuxt/kit',
4449
'@nuxt/schema',
4550
'nuxt3',
51+
'nuxt',
4652
'vue',
4753
'defu',
4854
'@vueuse/motion',
@@ -53,18 +59,6 @@ export default defineBuildConfig({
5359
'@vue/compiler-core',
5460
'@babel/parser',
5561
'@vue/shared',
56-
'vue-demi',
5762
'@vueuse/core',
5863
],
59-
hooks: {
60-
'build:done': () => {
61-
copySync(
62-
'src/nuxt/runtime',
63-
'dist/runtime',
64-
)
65-
66-
// eslint-disable-next-line no-console
67-
consola.info('Nuxt runtime copied to `dist/`!')
68-
},
69-
},
7064
})

demo/src/components/Block.vue

-5
This file was deleted.

docs/.vitepress/components/Home.vue

-38
This file was deleted.

0 commit comments

Comments
 (0)